Penguin

Differences between current version and revision by previous author of CreatingPDFs.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 23 Last edited on Wednesday, August 10, 2005 12:42:03 pm by JohnMcPherson
Older page: version 20 Last edited on Sunday, October 17, 2004 6:14:09 am by AristotlePagaltzis Revert
@@ -1,6 +1,4 @@
-''InNeedOfRefactor: we have too many different pages with partly overlapping information on creating [PDF]s.''  
-  
 !!! Under [Linux] 
  
 !! From any PostScript document 
  
@@ -19,23 +17,32 @@
 !! From OpenOffice 
  
 Version 1.0 of OpenOffice allows you to set up a special [PDF] printer. From the correct installation directory (such as __/usr/lib/openoffice/program__), run __./spadmin__, select ''New Printer'' and then ''Connect a PDF converter'' and then OpenOffice will see its own special extra printer. Debian has a wrapper script called __oopadmin__ that you can run from any directory. 
  
-Version 1.1 of OpenOffice does [PDF] "natively" - it is merely another filetype you can save as, rather than setting up fake printers. It also has ''Export to PDF...'' which allows you to save optimised for ''Size'', ''Print'', or ''Press''. 
+Version 1.1 of ~ OpenOffice does [PDF] "natively" - it is merely another filetype you can save as, rather than setting up fake printers. It also has ''Export to PDF...'' which allows you to save optimised for ''Size'', ''Print'', or ''Press''. 
  
-__Hint__: ! OpenOffice will embed TrueType fonts into the PDF file it creates. You may get better results if you use fonts with the same name as the "core" fonts built into the PDF file format. For example, use "Times" instead of "Times New Roman" for your serif font, "Helvetica" as your sans-serif font, and "Courier" as your monotype font. If you do this, then no font information needs to be embedded in the PDF (which some viewers might have problems with), and the PDF file is smaller as a result. 
+__Hint__: ~ OpenOffice will embed TrueType fonts into the PDF file it creates. You may get better results if you use fonts with the same name as the "core" fonts built into the PDF file format. For example, use "Times" instead of "Times New Roman" for your serif font, "Helvetica" as your sans-serif font, and "Courier" as your monotype font. If you do this, then no font information needs to be embedded in the PDF (which some viewers might have problems with), and the PDF file is smaller as a result. 
  
 ---- 
 !!ps2pdf hints 
  
 * ps2pdf is really just a wrapper script that calls gs(1) with the correct options, such as -sDEVICE=pdfwrite (meaning to use the "pdfwrite" output device). Make sure you are using the most recent version of GNU ghostscript, since each version seems to improve greatly on previous versions. (Current version in debian testing at time of writing is 7.07). 
-* If you are trying to make a pdf from a postscript file that has a funny size (ie, using "gv" shows it is using the ! BoundingBox), use the __"-dEPSCrop"__ option. Otherwise it will default to landscape A4 and probably things wrong.  
-* If your document is black-and-white/grayscale, you might be able to make use of some optimisations by adding __"-dProcessColorModel=/! DeviceGray"__ as a command-line option. 
+* If you are trying to make a pdf from a postscript file that has a funny size (ie, using "gv" shows it is using the BoundingBox), use the __"-dEPSCrop"__ option. Otherwise it will default to landscape A4 and probably things wrong. Or you could try the ''epstopdf'' wrapper script (part of [LaTeX]) .  
+* If your document is black-and-white/grayscale, you might be able to make use of some optimisations by adding __"-dProcessColorModel=/~ DeviceGray"__ as a command-line option. 
 * You can add a -r''<n>'' option for the resolution... eg a low resolution like -r75 if you are only creating a PDF designed to be viewed on-screen. 
+* Apparently, the default options for ghostscript's "pdfwrite" device changed with ghostscript 7, and it now defaults to using DCT/[JPEG] compression on images, which isn't very good for screenshots or other low-res images. Add the  
+<pre>  
+__-dColorImageFilter=/~FlateEncode -dAutoFilterColorImages=false__  
+</pre>  
+and/or  
+<pre>__-dGrayImageFilter=/~FlateEncode -dAutoFilterGrayImages=false__  
+</pre>  
+options to your ps2pdf/gs command.  
 * You can join (ie concatenate) multiple PostScript and PDF files together, for example: 
+<verbatim>  
  gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite \ 
  -sOutputFile=/tmp/merged.pdf file1.ps file2.pdf file3.pdf ... 
-  
+</verbatim>  
 ---- 
  
 !!! Under [Windows] 
  
@@ -45,17 +52,19 @@
 !!Via a special Printer Queue 
 The [SambaPDFPrinter] described above can almost certainly be shared via samba and printed to from Windows Applications, something similar can probably be done for the CUPS version mentioned above as well. If I ever get around to setting this up I'll wiki the results. 
  
 [PDF-creator|http://sourceforge.net/projects/pdfcreator/] is a special 
-PDF printer driver for Windows, based on GhostScript. (Released under [GPL]). This method has an advantage of the other [Free] methods in that it allows you to set access/print/copy permissions on the generated PDF. One disadvantage is that it must be installed by an Administrator. (In contrast, you can install and run OpenOffice as a normal windows user.) 
+PDF printer driver for Windows, based on GhostScript. (Released under [GPL]). This method has an advantage over the other [Free] methods in that it allows you to set access/print/copy permissions on the generated PDF. One disadvantage is that it must be installed by an Administrator. (In contrast, you can install and run OpenOffice as a normal windows user.) 
  
 !! From Word documents 
  
 If you don't have any PDF software installed (either [Adobe] or other), and just want to convert a Word document to PDF, there's an easy-to-use service at [http://www.fastpdf.com]. You upload your document, and enter your email address, and the service sends you a note when the conversion is done. (You then pick up the conversion from the website.) The service is free for short documents, and relatively inexpensive for longer docs ('much' cheaper than purchasing Adobe's software!). Note: this is a somewhat shameless plug (since I built the thing), but many people do find it convenient. 
  
 As with any PDF conversion service, Fast PDF can get confused by unusual fonts found in Word docs. But if you embed the fonts you use in your document prior to submitting it to the service, the service works very well. 
  
-;: __ Note:__ Anyone considering using the above website should be aware of the following from the terms of service: ''You acknowledge and agree that Fast PDF, LLC may at its discretion insert advertising material into the file or files resulting from the conversion process.'' In practice, the service adds a ''Converted at Fast PDF'' watermark in the margins of conversions done for free (but not those paid for). 
+__ Note:__ Anyone considering using the above website should be aware of the following from the terms of service::  
+ ''You acknowledge and agree that Fast PDF, LLC may at its discretion insert advertising material into the file or files resulting from the conversion process.''  
+ In practice, the service adds a ''Converted at Fast PDF'' watermark in the margins of conversions done for free (but not those paid for). 
  
 !! [PDF]s with [Macron]s from Word documents 
  
 This can be a problem when the document contains [Macron]s and other characters not in all the standard character sets. The following technique appears to work at least in some cases where you have a PostScript printer visible and [Adobe] PDFWriter installed. 
@@ -82,6 +91,8 @@
 !!! Under [MacOSX] 
  
 The following have been tested under OSX 10.3 (Panther) only; someone else might want to confirm them on earlier versions. 
  
-* From most applications (Safari, iCal, ! TextEdit and Preview etc...), you can select ''Print'' from the ''File'' menu and click on the ''Save As PDF...'' button and select your destination for your [PDF]. 
+* From most applications (Safari, iCal, ~ TextEdit and Preview etc...), you can select ''Print'' from the ''File'' menu and click on the ''Save As PDF...'' button and select your destination for your [PDF]. 
 * From ''Preview'', you can also select ''Export'' from the ''File'' menu, select [PDF] from the ''Format'' pulldown menu and select your destination for your [PDF]. 
+  
+----