Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PDF
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Technical details == A PDF file is often a combination of [[vector graphics]], text, and [[bitmap graphics]]. The basic types of content in a PDF are: * Typeset text stored as content streams (i.e., not encoded in [[plain text]]); * Vector graphics for illustrations and designs that consist of shapes and lines; * Raster graphics for photographs and other types of images; and * Other multimedia objects. In later PDF revisions, a PDF document can also support links (inside document or web page), forms, JavaScript (initially available as a plugin for Acrobat 3.0), or any other types of embedded contents that can be handled using plug-ins. PDF combines three technologies: * An equivalent subset of the PostScript page description programming language but in declarative form, for generating the layout and graphics. * A [[font embedding|font-embedding]]/replacement system to allow fonts to travel with the documents. * A structured storage system to bundle these elements and any associated content into a single file, with [[data compression]] where appropriate. === PostScript language === [[PostScript]] is a [[page description language]] run in an [[Interpreter (computing)|interpreter]] to generate an image.<ref name="Pfiffner_Page_137" /> It can handle graphics and has standard features of [[programming language]]s such as [[conditional (computer programming)|branching]] and [[loop (computing)|looping]].<ref name="Pfiffner_Page_137" /> PDF is a subset of PostScript, simplified to remove such [[control flow]] features, while graphics commands remain.<ref name="Pfiffner_Page_137" /> PostScript was originally designed for a drastically different [[use case]]: transmission of one-way linear print jobs in which the PostScript interpreter would collect a series of commands until it encountered the <code>showpage</code> command, then execute all the commands to render a page as a raster image to a printing device.<ref name="Pfiffner_Page_139">{{cite book |last1=Pfiffner |first1=Pamela |title=Inside the Publishing Revolution: The Adobe Story |date=2003 |publisher=Peachpit Press |location=Berkeley |isbn=0-321-11564-3 |page=139}}</ref> PostScript was not intended for long-term storage and real-time interactive rendering of [[electronic document]]s to [[computer monitor]]s, so there was no need to support anything other than consecutive rendering of pages.<ref name="Pfiffner_Page_139" /> If there was an error in the final printed output, the user would correct it at the application level and send a new print job in the form of an entirely new PostScript file. Thus, any given page in a PostScript file could be accurately rendered only as the cumulative result of executing all preceding commands to draw all previous pages—any of which could affect subsequent pages—plus the commands to draw that particular page, and there was no easy way to bypass that process to skip around to different pages.<ref name="Pfiffner_Page_139" /> Traditionally, to go from PostScript to PDF, a source PostScript file (that is, an executable program) is used as the basis for generating PostScript-like PDF code (see, e.g., [[Adobe Distiller]]). This is done by applying standard [[compiler]] techniques like [[loop unrolling]], [[inline expansion|inlining]] and removing unused branches, resulting in code that is purely declarative and static.<ref name="Pfiffner_Page_139" /> The result is then packaged into a [[container format]], together with all necessary [[Dependency (computer science)|dependencies]] for correct rendering (external files, graphics, or fonts to which the document refers), and [[Data compression|compressed]]. Modern applications write to printer drivers that directly generate PDF rather than going through PostScript first. As a document format, PDF has several advantages over PostScript: * PDF contains only static [[Declarative programming|declarative]] PostScript code that can be processed as data, and does not require a full program [[Interpreter (computing)|interpreter]] or [[compiler]].<ref name="Pfiffner_Page_139" /> This avoids the complexity and security risks of an engine with such a higher complexity level. * Like [[Display PostScript]], PDF has supported [[transparency (graphic)|transparent graphics]] since version 1.4, while standard PostScript does not. * PDF enforces the rule that the code for any particular page cannot affect any other pages.<ref name="Pfiffner_Page_139" /> That rule is strongly recommended for PostScript code too, but has to be implemented explicitly (see, e.g., the [[Document Structuring Conventions]]), as PostScript is a full programming language that allows for such greater flexibilities and is not limited to the concepts of pages and documents. * All data required for rendering is included within the file itself, improving portability.<ref>{{cite web |url=https://www.adobe.com/content/dam/acom/en/devnet/actionscript/articles/PLRM.pdf|title=PostScript Language Reference|archive-url=https://web.archive.org/web/20210724120635/https://www.adobe.com/content/dam/acom/en/devnet/actionscript/articles/PLRM.pdf|archive-date=2021-07-24|url-status=dead}}</ref> Its disadvantages are: * A loss of flexibility, and limitation to a single use case.{{citation needed|date=December 2023}} * A (sometimes much) larger file size.<ref>{{cite web |last1=Anton Ertl |first1=Martin |title=What is the PDF format good for? |url=https://www.complang.tuwien.ac.at/anton/why-not-pdf.html |website=complang.tuwien.ac.at |publisher=Vienna University of Technology |access-date=8 April 2024|archive-url=https://web.archive.org/web/20240404031526/https://www.complang.tuwien.ac.at/anton/why-not-pdf.html|archive-date=4 April 2024|url-status=live}}</ref> PDF since v1.6 supports embedding of interactive 3D documents: 3D drawings can be embedded using [[U3D]] or [[PRC (file format)|PRC]] and various other data formats.<ref name="3d#1">{{cite web |url=https://www.adobe.com/manufacturing/resources/3dformats/ |title=3D supported formats |publisher=Adobe Systems Inc. |date=July 14, 2009 |access-date=February 21, 2010 |url-status=dead |archive-url=https://web.archive.org/web/20100212072951/http://www.adobe.com/manufacturing/resources/3dformats/ |archive-date=February 12, 2010 }}</ref><ref>{{Cite web|date=November 11, 2022|url=https://helpx.adobe.com/acrobat/kb/supported-file-formats-acrobat-reader.html#main_2D_and_3D_formats__Acrobat_9_Pro_Extended__Adobe_3D_Reviewer_|title=Supported file formats in Acrobat and Reader|publisher=Adobe Systems Inc.|access-date=January 12, 2023|archive-date=December 21, 2022|archive-url=https://web.archive.org/web/20221221111958/https://helpx.adobe.com/acrobat/kb/supported-file-formats-acrobat-reader.html#main_2D_and_3D_formats__Acrobat_9_Pro_Extended__Adobe_3D_Reviewer_|url-status=live}}</ref><ref>{{Cite web|url=https://www.adobe.com/devnet/acrobat/javascript_acrobt_3d.html|title=JavaScript for Acrobat 3D {{!}} Adobe Acrobat Developer Center|publisher=Adobe Systems Inc.|access-date=January 12, 2023|url-status=dead|archive-url=https://web.archive.org/web/20091112231130/https://www.adobe.com/devnet/acrobat/javascript_acrobt_3d.html|archive-date=November 12, 2009}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)