Showing posts with label adobe. Show all posts
Showing posts with label adobe. Show all posts

Thursday, February 19, 2009

Creating PDF for free from any program with printer support

This is a short manual how to replace any commercial and/or closed source PDF distilling product. What you need:
Why would you need that?
There were many reasons we decided to replace Adobe Distiller and Acrobat:
  • Programmatic control of these programs!
  • Incompatibility of different versions of Framemaker/Distiller/Acrobat!!!
  • Adobe bugs!!!
  • Price!
  • Page size limits*
  • Different page sizes in one document*
  • Page inserting/removing bugs
  • Language/Font problems*
How to print?
First, install the postscript driver (PPD). Change the PPD file for your needs, we changed limits for maximum paper size (maps). The printer should print into file. When printer is installed, you can print from any program with printing support, just choose this printer and the output will be saved as postscript (ps). Converting postscript to PDF is easy with Ghostscript:

gswin32c.exe -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf

We suggest to set embedding of fonts into postscript/pdf as ghostscript fonts can be buggy.
The same process can be done very easily even programmatically, just use google/msdn how to set printer to use.

Monday, February 9, 2009

Ghostscript Font alignment problems

We use Ghostscript for creating PDF documents, it is a much cheaper solution than buying special printer drivers, Adobe Distiller or any other. We changed Distiller for Ghostscript because of many reasons, but first of all bugs and control problems from other soft. But this is a different story.

Ghostscript uses free URW fonts for PDF creating and as we found out, theese fonts are buggy! As there won't be soon any update, we had to find another solution. We convert postscript (ps) files to PDF, so the solution was to embed the used font in the postscript instead of using the built in fonts.

In windows: printer preferences -> TrueType font: Download as SoftFont

From C/C++ set PRINTER_INFO_2 pDevMode->dmTTOption = DMTT_DOWNLOAD;

Good luck

Thursday, October 2, 2008

Adobe Framemaker - Czech and Slovak language patch

Uspesne sa mi podarilo vytvorit patch pre Adobe Framemaker, ktory prida podporu cestiny a slovenciny. Je to univerzalny patcher, co znamena ze funguje so vsetkymi verziami Framemaker od verzie 5.* az po 7.*. Osmicka uz ma podporu unicode, tam je to nepotrebne. Skorsie verzie som nemal moznost odskusat, ale mohlo by to ist. Ak to niekoho zaujima, nech sa ozve (vlavo je contact me). Alebo mi nechaj odkaz, keby to neslo, niekedy to vypadava.

Thursday, October 25, 2007

Speed up PDF distilling in Framemaker

Hi, recently we faced a problem that distilling framemaker documents into pdf took really long time. We have large maps in documents so it could be understood. But, we tried alternative solutions. First saving the FM document into postscript. That wasn't quick also :) But what was interesting is the fact that to converting the postscript into pdf was in a reasonable time.

What is framemaker doing that takes so long?

After analyzing a examining we found out that when distiller is waiting with text "Relocating files..." framemaker is doing something with the pdf. The responsible was the fmpdfreflow.dll. This library does some postprocessing, called reflowing the document. We don't really need this feature so we needed to disable it somehow.

We found no menu option to do this. But fortunately there is a framemaker initialization file called maker.ini. By editing this file you can remove or comment the line when this library gets loaded.

The result? The pdf distilling is faster by cca 60-70%. The resulted pdfs are bit smaller and the flows we don't care ;-)