PostScript versus PDF as an output format

倖福魔咒の 提交于 2020-01-01 01:39:23

问题


I'm currently writing a typesetting application and I'm using PSG as the backend for producing postscript files. I'm now wondering whether that choice makes sense. It seems the ReportLab Toolkit offers all the features PSG offers, and more. ReportLab outputs PDF however.

Advantages PDF offers:

  • transparancy
  • better support for character encodings (Unicode, for example)
  • ability to embed TrueType and even OpenType fonts
  • hyperlinks and bookmarks

Is there any reason to use Postscript instead of directly outputting to PDF? While Postscript is a full programming language as opposed to PDF, as a basic output format for documents, that doesn't seem to offer any advantage. I assume a PDF can be readily converted to PostScript for printing?

Some useful links:

  • Wikipedia: PDF
  • Adobe: PostScript vs. PDF

回答1:


If you're planning on only outputting to a PostScript printer, then use PostScript. Otherwise, use PDF.

PDF is more widely supported by non-printer devices. And for your purposes, there aren't any technical advantages of PS over PDF (other than not being able to dump the file directly to a printer).




回答2:


Here are some things to consider:

  • gzipped postscript is often much smaller than an equivalent PDF
  • PDF is basically a generalized container format, if you didn't know that you can embed videos in PDF, that should give you pause
  • PDF contains scripts that have been used for exploits (though this may be more the fault of bad PDF reader software)



回答3:


PDF is a much more self-contained format and a high level of functionality. It also has more tools. UNless you specifically need Postscript, stick to PDF.




回答4:


Avoid PDF like the plague. Adobe invented PDF and pushed PDF to the consumers to make more money from suckers who believed all the hype about PDF that Adobe told its users. PDF is a bloated format that requires a slow and non-free reader to read and process correctly. Most free readers do not support 100% of Adobe features and likely support a subset of features that is are found in Postscript. For instance reportlab does not support 100% of PDF features.

Historical fake technical arguments to use PDF have been

  • No loops in PDF which stops helps processing, False as other formats such as XML without loops have memory and processing issues.
  • More fully feature, False argument as Postscript is more powerful and can do what PDF can do with less features.
  • Postscript has to load all of the pages as it is a language. This is of course not true as C,C++, Java and many other language can load code at runtime.
  • Postscript is missing feature X, True but mostly because of
    Adobe inventing a new format to make money not because feature X cannot be added to Postscript.

The real reason to use PDF instead of Postscript is that PDF readers are more common than Postscript readers.



来源:https://stackoverflow.com/questions/4619079/postscript-versus-pdf-as-an-output-format

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!