Illustrator and PDF compatibility

The question came up the other day regarding how Adobe Illustrator and PDF files are related. After all, Illustrator files have a %PDF header and start out with XMP metadata syntax that suggests strongly that Illustrator files are PDF files. Also, Illustrator seems to default to saving files in a PDF-compatible mode. While in some cases Illustrator files can be processed like they are PDF files, it is important to note that they are not PDF files and the number of cases they can be treated like PDF files is very limited.

Adobe Illustrator (here I’m using CS5, but this should apply to other recent versions also) offers users the choice of saving AI files as PDF compatible files in its Save dialog. Whether or not this option is selected, the resulting AI file begins like a PDF file and has a header indicating PDF compliance. An example of an Illustrator document saved with PDF compatibility turned off still looks remarkably like a PDF file:

%PDF-1.5 %âãÏÓ
 1 0 obj
 <</Metadata 2 0 R/Pages 3 0 R/Type/Catalog>>
 2 0 obj
 <</Length 58568/Subtype/XML/Type/Metadata>>stream
 <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>

[and so on]. You’d be readily forgiven for looking at this and assuming that this AI file is really a PDF file. Technically, the file is indeed a PDF file. However, all of its useful content and attributes is hidden inside Illustrator-specific data streams. Opening this file in Acrobat, one does not see what is expected at all. Instead, one gets one page with a repeated block of text:

This is an Adobe® Illustrator® File that was
saved without PDF Content.
To Place or open this file in other
applications, it should be re-saved from
Adobe Illustrator with the “Create PDF
Compatible File” option turned on. This
option is in the Illustrator Native Format
Options dialog box, which appears when
saving an Adobe Illustrator file using the
Save As command.

Some readers may have seen a very similar situation when opening up PDF files that are Dynamic XFA forms with a non-Reader, non-Acrobat PDF viewer: a file that claims to be a PDF and is in technical compliance with the PDF specification, but still completely useless and containing only some text that says the file is not useable.

Turning the “Create PDF Compatible File” option on and saving, one immediately notices that the Illustrator file that results is much larger than the Illustrator file saved without this option. The file that is generated starts off a lot like the previous version, but we can tell immediately there’s more to it:

%PDF-1.5 %âãÏÓ
 1 0 obj
 <</Metadata 2 0 R/OCProperties<</D<</ON[7 0 R]/Order 8 0 R/RBGroups[]>>/OCGs[7 0 R]>>/Pages 3 0 R/Type/Catalog>>
 2 0 obj <</Length 58970/Subtype/XML/Type/Metadata>>stream
 <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>

[and so on]. Unlike the Illustrator file saved without PDF compatibility, there are some layer (optional content groups) present in the document catalog. Opening the AI file up in Reader or Acrobat, we see the file looks compatible: unlike the warning text from the other version, the page that is drawn looks like the Illustrator artboard this was saved from. In fact, the AI file generated is a PDF compatible file and contains a page that appears like our Illustrator file. However, the private Illustrator data streams are still present in the PDF file. This is because the Illustrator file is a PDF that’s not necessarily going to be treated like a PDF by Illustrator.

If you edit the PDF Compatible AI file in Acrobat and re-import this into Illustrator, you’ll quickly see Illustrator detect that the file has been edited outside of Illustrator and offer the ability to discard the changes or to keep the changes and reduce the editability of the AI file. Illustrator parses both the PDF representation and its private data and detects that they are different; from this it offers two possibilities. Either, the Illustrator file can be treated like an Illustrator file and the private data in the file (the Illustrator data) can be used, or the PDF data can be used and the capabilities of Illustrator that are not representable directly in an editable PDF format are then not available and the file is treated as if a PDF file. For example, the Swatches for the file are discarded when keeping the PDF representation of the file.

In summary: when you save an Adobe Illustrator file in PDF compatible mode, the resulting AI file can be used in read-only PDF workflows such as PDF viewers and text extraction tools. However, altering the PDF data does not alter the private application data that Illustrator keeps in the PDF and that represents the actual Illustrator file data. Altering the PDF file outside of Illustrator leads to a difficult decision when bringing the file back to Illustrator: either discarding the changes and using the Illustator file data, or keeping the changes and losing the Illustrator-specific file features.

About Matt Kuznicki

Matt Kuznicki, Chief Technical Officer of Datalogics, has been actively involved with PDF solutions and technologies since 2000. He is a recognized expert in technical PDF and imaging matters and an active participant in PDF standards committees and forums. He takes a special interest in ensuring the reliable communication of information across different computing systems and communities, as well as the long-term ability to retrieve information from electronic documents.

5 thoughts on “Illustrator and PDF compatibility

  1. How do i turn this on? It is driving me nuts i cant create a PDF file for some reason and Im getting this exact message and I dont know how to change it Im not the best at using this software ive tried so many things an still cant get it.

    Can you please help me…

    1. Beau, in Illustrator CS 6 for Windows – if you select “File | Save As” and save as an Adobe Illustrator (.ai) file, you’ll get a set of options for saving. Turning on the “Create PDF compatible file” checkbox under “Options” in that dialog will create an Illustrator file that can also be opened as a PDF file.

      1. I’m having the same issue with Ai. When I saved the first one I made sure “Create PDF compatible file” was checked. I then tried to “save as” a pdf and got the above repeated block of text. I have saved before with no issues, so not sure why this is happening.

        Any ideas?

  2. Can anyone help me please…

    I am updating metadata details (title, author, subject, keyword) in illustrator. But when I am creating pdf out of illustrator file, metadata title automatically changes to current file name. Why this is happening?

Leave a Reply

Your email address will not be published. Required fields are marked *