.fw files.wiki
PDF

PDF Files

Adobe Portable Document Format

PDF is a fixed-layout document format for reliably sharing, printing, archiving, and signing paginated documents.

Portable Document Format

Developer
Adobe Systems; maintained as ISO 32000 by ISO/TC 171/SC 2
Category
Documents
MIME type
application/pdf
Format
Binary
Magic bytes
25 50 44 46 2D
First released
1993
Latest version
PDF 2.0 (ISO 32000-2:2020)
Open standard
Yes

Open a .PDF file online

Reading file…

What is a .PDF file?

The content of a .pdf file includes Portable Document Format (PDF). PDF is a fixed-layout document format invented in 1993 by Adobe Systems in order to enable platform-independent viewing and printing. PDF is standardized as ISO 32000 and is maintained by ISO/TC 171/SC 2 and it uses MIME type application/pdf.

.PDF files store all pages including information such as text, fonts, vectors, images, annotations, form, digital signatures, attachments, etc. Typical examples when people use .pdf files may include invoices, bank statement, instruction, scientific work, government documents, e-books, boarding pass, tickets for event, shipping labels, proof, contracts, etc.

Moreover, extension of ".pdf" not only stands for Portable Document Format, but may stand for specific profiles of PDF files as well (PDF/A, PDF/X, PDF/E, etc.) that serve different purposes, however their recognition by software can be done on a basis of special PDF metadata, output intents and other technical information. In any case there is no wide-spread unrelated contemporary formats which have this particular name. Therefore the .pdf file should be checked for the %PDF- signature in spite of the fact that the name and extension can be easily falsified.

How to open a .PDF file

Open a .PDF file on Windows

  1. 1 Go to the folder with your file in File Explorer. Usually, downloaded files end up in Downloads.
  2. 2 Double-click your .PDF file if you have an app for .pdf files on your computer. In case it does not open, move on to step three.
  3. 3 Right-click your .PDF file -> select Open with -> Choose another app.
  4. 4 Choose Adobe Acrobat Reader in the list (Windows 11: choose Always). For Windows 10 -> put a check on "Always use this app to open .pdf files" and click OK.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Windows

Open a .PDF file on macOS

  1. 1 In the Finder app, locate your .PDF file.
  2. 2 Just double-click your .PDF file in order to automatically launch the program which is connected with it.
  3. 3 Need another app on your Mac? Control-click the file (or right-click with a mouse). In the pop-up menu select Open With -> Apple Preview.
  4. 4 If it isn't in the list, choose Other… and find the application manually.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for macOS

Open a .PDF file on Linux

  1. 1 Launch your file manager. Depending on the desktop it may be named Files (GNOME), Dolphin (KDE Plasma), Nemo (Cinnamon) or Thunar (Xfce).
  2. 2 Double-click the file.
  3. 3 Or choose another program by right-clicking the file -> Open With -> Okular.
  4. 4 Install Okular (if it is not installed on your computer) from the software centre, repository or Flathub.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Linux

Open a .PDF file on Android

  1. 1 Launch Files or another file management app.
  2. 2 In Downloads, find the .PDF file and open it by tapping.
  3. 3 A list of apps capable of opening the file will be shown. Tap Adobe Acrobat Reader and press Always to permanently connect the file type with this app.
  4. 4 No apps able to open this file? Download Adobe Acrobat Reader from the Google Play Store.

Still not opening? See common problems and fixes, or view it in your browser.

Open a .PDF file on iPhone / iPad

  1. 1 Use the Files app and go to On My iPhone, iCloud Drive or Downloads.
  2. 2 Tap the .PDF file you want to open.
  3. 3 If the file can be opened by a built-in iOS app (supported format), it opens automatically.
  4. 4 Touch and hold the file to get the context menu -> choose Share -> select Adobe Acrobat Reader from the list of apps.
  5. 5 If there is no such option, download the app first from the App Store and then tap the document again.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for iPhone / iPad

Open a .PDF file online

  1. 1 Move to the online viewer at the top of this page.
  2. 2 Drag the file there or select it, and its contents will appear in your browser tab. The file is not uploaded.

Still not opening? See common problems and fixes, or view it in your browser.

Programs for Online

More details about opening .PDF files

Clicking on the file .pdf in Windows opens the application that may include the following: Microsoft Edge; Google Chrome; Mozilla Firefox; Adobe Acrobat Reader; Foxit PDF Reader; PDF-XChange Editor; SumatraPDF; Okular; LibreOffice Draw; Adobe Acrobat Pro - depending on the program association with .pdf set up on the computer by users themselves or administrators. Edge, Chrome, Firefox, SumatraPDF, and Acrobat Reader will be enough for simple reading of content, for printing, for search and filling typical forms; Acrobat Pro and PDF-XChange are appropriate for OCR processes, redaction, document comparison, converting or preflight operations.

Preview, the native PDF viewer of macOS, can be used for reading of documents, markup, arranging pages within one document, exporting the document via File menu in the top left corner of the window. There are more advanced programs such as Adobe Acrobat Reader/Pro, PDF Expert, Firefox, Chrome and LibreOffice Draw or Okular.

As for Linux, Evince/Okular will be good as viewer; the browser PDF-engines for Firefox, Chrome and chromium-browser allow for quick viewing of document. There is LibreOffice Draw for modification of many objects and qpdf, Ghostscript and/or poppler-utils for standard command-line viewing and converting. It is more appropriate to download these packages with apt, dnf, pacman, zypper commands in case of package management or from distributions' own application stores.

iOS device opens the .pdf files in its native viewer or in any browser-app, Android does so too, among available options for opening the document there could be Adobe Acrobat Reader, Xodo PDF Viewer and Editor, Foxit mobilePDF reader, Google Drive, Apple Books reader and file explorer, PDF Expert and other PDF editors. There are web-viewers too, which include the mentioned browsers with their PDF engines and service like Acrobat or Xodo online converters but sensitive data mustn't be sent there because of security considerations.

When double-clicking doesn't do anything - try right-clicking on it and opening using context-menu of OS or reinstall/restart the associated application or reset .pdf-file association (right-click .pdf in File Explorer - choose 'Always open this with' option), then use your browser. Or check your file with Adobe Acrobat Reader for dynamic forms and signatures, then try qpdf in command line for checking for problems or decoding issues; Ghostscript is able to rewrite the document as a new .pdf - but first check with a hex viewer first if the first 5-bytes equal 25 50 44 46 2D "%PDF-".

Technical details

The PDF document has structured, binary content with syntax at the top level consisting mostly of ASCII-compatible token names, numbers, arrays, dictionaries, objects with object streams, operators and indirect object pointers to streams that contain unstructured binary data within those streams. The standard file header will start by including %PDF- with the version number, like %PDF-1.7 or %PDF-2.0. The magic bytes will be 25 50 44 46 2D for “%PDF-” ASCII characters at location byte offset 0; some applications might allow leading header bytes in older and incorrectly formatted PDF documents.

Traditional internal structure includes the header, followed by the numbered objects in the body, cross-reference table, trailer dictionary, byte-offset startxref pointer, and final marker %%EOF. The trailer will typically feature /Root with reference of the document catalog. Newer formats use cross-reference streams instead of cross-reference tables and compressed object streams; incremental updates to an existing document will have additional object numbers, cross-reference information and trailers for editing, redaction, saving of forms data and applying a digital signature to keep previous revision intact.

Description of the pages contains contents in content streams using drawing commands as a syntax. Page content will use references to resources described in their dictionaries, such as font, image and form object, color space, pattern and other graphic states.

Navigational elements of page display and interactive functionality may use annotations, outlines, named destinations, AcroForm fields, XFA forms, attachments, page labels, optional content groups for layers, output intents, and logical structure trees.

Possible stream filters include FlateDecode for data that is encoded in zlib/deflate format (compressed), DCTDecode (for JPEG data), JPXDecode for JPEG2000 data format, CCITTFaxDecode, JBIG2Decode, LZWDecode, RunLengthDecode, ASCII85Decode and also Crypt. Encoding of the text may employ various options such as WinAnsiEncoding, MacRomanEncoding, PDFDocEncoding, UTF-16BE strings, CID fonts, CMaps, and ToUnicode maps, whose absence may cause wrong characters during text copying operations from a PDF file.

Optional metadata can exist both in the document information dictionary of a PDF document, and as XMP metadata in packet structure in the PDF stream. The official MIME-type of PDF file format is application/pdf. Typical sizes for textual PDF documents are under 100 KB; scanned images stored in PDF files can have tens or even hundreds of MB of data. PDF 2.0 was defined and standardized in ISO 32000-2:2020 standard.

How to convert .PDF files

Export of files to PDF is most common because the document has to keep its exact layout after creation or editing, i.e. pages that cannot reflow. When the file is transferred or filed somewhere for future use or just viewing, PDFs exported from Word, Excel, and even LibreOffice preserve their page layout. For shell processing, you can convert files of DOCX to pdf in Linux using command line instructions such as: libreoffice --headless --convert-to pdf --outdir out input.docx, or similar command lines for different conversions. HTML, Markdown, LaTeX - can also be converted to pdf with differences in how CSS style sheet is implemented, font management, etc.

If it is a legal file consisting of 300 pages submitted for viewing and containing only text for future search but no pictures - this job can be accomplished using Poppler, the set of tools for reading and working with various PDF files: pdftotext -layout input.pdf output.txt works perfectly with digital-born PDF. Otherwise, before processing, OCRmyPDF, Tesseract, Acrobat Pro and others should be used. To extract previews, thumbnails, slides, etc. the process consists of rasterizing document pages. You can do so using following code snippet: magick -density 300 input.pdf -quality 90 output-%03d.png. Keep in mind that all types of output (png or jpg) destroy the selectable content.

Use PDF->docx only when the source material was lost or not available. Commercial tools, MS Word and similar software try to reformat the text heuristically, i.e. columns and tables will likely look differently, hyphenation could be changed, fonts may be substituted etc. Ghostscript can convert PDF into archival PDF/A form, but whether this operation will pass the verification depends on various features. PDF to SVG/EPS allows one extracting vectors and the command line pdftocairo -svg input.pdf output.svg does well with simple pages while complex transformations like transparencies result in non-editable graphics.

Convert toToolCommand / note
TXT Poppler pdftotext pdftotext -layout input.pdf output.txt Extracts real text when the PDF has a usable text layer; scanned pages require OCR first.
PNG images ImageMagick magick -density 300 input.pdf -quality 90 output-%03d.png Rasterizes each page; vector text and searchable text are lost in the image output.
SVG Poppler pdftocairo pdftocairo -svg input.pdf output.svg Best for single-page vector artwork; complex transparency, fonts, and multi-page documents may need manual cleanup.
PDF/A Ghostscript gs -dPDFA=2 -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sColorConversionStrategy=RGB -sOutputFile=output.pdf input.pdf Creates an archival-oriented PDF/A attempt; validate with veraPDF because conversion can fail if fonts, color profiles, or transparency are unsuitable.
DOCX Adobe Acrobat Pro or Microsoft Word Useful for editing recovered content; page layout, columns, tables, hyphenation, and exact fonts often change.
PDF from DOCX/ODT/PPTX/XLSX LibreOffice libreoffice --headless --convert-to pdf --outdir out input.docx Batch-converts office documents to PDF using LibreOffice’s import/export filters; results depend on installed fonts.
PDF from Markdown Pandoc pandoc input.md -o output.pdf Requires a PDF engine such as LaTeX, wkhtmltopdf, or WeasyPrint depending on the Pandoc setup.
PS Poppler pdftops pdftops input.pdf output.ps Produces PostScript for older print workflows; interactive PDF features, forms, and attachments are not preserved.

Common problems and fixes

"Failed to load PDF document" occurs often in Chrome, Edge, and Firefox in cases where download is incomplete, web server returns HTML or error in a .pdf container and where the file actually is not PDF file. Redownload and examine size of the file and make sure that first 5 bytes of your PDF file are identical to bytes 25 50 44 46 2D corresponding to ASCII "%PDF-".

Message in Acrobat Reader "There was an error opening this document, the file is damaged and could not be repaired". In case if there are problems in cross reference table, startxref or last marker %%EOF caused by file truncation get another copy from your supplier. If clean copy does not help try to fix with qpdf repair or rewrite file using pdfwrite of Ghostscript.

"Please wait... If this message is not eventually replaced..." happens while you try to open XFA forms dynamically. You just have to open file in a newer version of Adobe Acrobat Reader.

Password request means that document was encrypted by user's password. Restrictions on actions like printing, editing or copying are done according to owner permissions which is a separate password and have to be requested by the file receiver.

Line breaks change, presence of squares, unreadable print output may be an effect if substitute fonts were not used in your PDF. Download the fonts and generate file in case of missing or embed fonts into original. "Copy/Paste garbage content", inability to find some text, errors with Unicode symbols are results of lack of ToUnicode tables and images scanning only. You have to do OCR operation and regenerate PDF.

Blank page appears due to big images, use of transparency and layers, incorrect JBIG2 or JPEG 2000 objects streams and sometimes GPU. Check in newer versions of Acrobat Reader, disable hardware acceleration in Adobe PDF engine. Signatures warning such as "At least one signature has problems..." you need check the signature panel to see if there is untrusted signing certificate, any modification in file after signing and absence of revocation information. Document that opens in gibberish mode and generates ZIP message can be archive renamed incorrectly.

Security considerations

Not only can PDFs include content from a variety of sources but also active objects, among others JavaScript actions, OpenAction and other AA triggers, files that come embedded with the PDF, multimedia, launch and submit form actions, external links, and older workflows, like that of using XFA scripts. Several serious vulnerabilities have been found regarding such issues in fonts, image decoders, the implementation of a JavaScript engine, JBIG2 decoding, forms, and sandbox escapes; therefore, all PDF processing engines including Adobe Acrobat Reader, browser-based PDF viewers, Poppler and Ghostscript among others need to be patched.

A phishing attack can come by means of very life-like forms, fake invoices and documents containing links and/or QR codes leading victims, for instance, to a website pretending it is a bank or any organization that needs sensitive information such as login information for an online service that the user is known to use. Sensitive data can hide in /Info metadata and XMP metadata, the content of the embedded files (including multimedia, etc.), comments in forms and scanned images (such as an OCR text layer beneath a scanned page); redact information with proper methods; use encryption to avoid disclosure at rest but beware of the security of the password.

History and versions

John Warnock outlined the concept of “Camelot” in 1991. His concept entailed a universal electronic document exchange system with which one may save document appearances through applications and even operating systems. The Adobe company released Acrobat and its corresponding format (named PDF) with versions 1.0 in 1993. Nevertheless, there were not many people willing to adopt them until Adobe Reader became free and web distribution made downloadable documents routine.

There was an increased capability in working with colors and prepress, among many other functions for printing and publishing. This made it possible for many proprietary delivery formats and proof systems to be replaced easily in 1996 (version 1.2) and 1999 (version 1.3). In version 1.4 (released in 2001), there appeared some key features such as transparency and expanded tagged-PDF accessibility support, among others.

In PDF version 1.7 (2006) and PDF version 1.6 (2004), there were many enhancements such as 3D and Engineering-oriented features. In 2003 (1.5), there were improvements related to object streams and cross-reference streams, for better compression. The subsets PDF/X under ISO 15930 and PDF/A-1 under ISO 19005-1:2005 became standards in PDF before this format became a full one. In the years 2008 and 2017, the standards of these PDF versions 1.7 and 2.0 became ISO 32000-1:2008 and ISO 32000-2:2017, respectively, with the latter later updated as ISO 32000-2:2020.

The PostScript (.ps), Encapsulated PostScript (.eps) formats are used for page description and programming in relation to graphic design, whereas the Portable Document Format (PDF) format is more preferable for distribution, as it was intended. Microsoft XPS (.xps) and OpenXPS (.oxps) are two Windows-integrated, fixed layout rivals; however, PDF allows more convenient usage of tools, cross-platform support, and institutional adoption.

Word-processing formats like (.docx), and (.odt), are preferable formats for editing documents; the PDF format should be used instead as final format after text reflowing process is completed, when signing or archiving of documents is needed. Although (.html) and (.mhtml) document types allow reflowing of documents, and have many interactive features, PDF documents are better for distribution and exact pagination requirements. EPUB (.epub) file type is preferable for creation and storage of eBooks; for example manuals and documents with forms are better for PDF format.

Image formats like (.tif) (.jpg) (.png); they allow representation of scanned content; however, pdf may contain more than one page or include OCR text, hyperlinks and metadata. DjVu (.djvu) files are capable of reducing amount of data necessary to download book scans but pdf format enjoys more popularity and is well supported. PDF/A still uses .pdf and complies with archival requirements and it is better choice to preserve documents.

Comments (0)

Replying to

No comments yet. Be the first to share your experience with this file type.