Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

create PDF compatible file

Community Beginner ,
Feb 07, 2019 Feb 07, 2019

I have a client that wants to get a warning (in certain cases) that a file is not saved with 'create PDF compatible file' turned on.

I have been looking at the information I can get from the document, but I do not find that info anywhere.

And/or is it possible to enable this option when using WriteDocumentWithOptions ?!

Thanks

Frank

TOPICS
SDK
3.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Feb 14, 2019 Feb 14, 2019

You are not going to find anything in the document, you might be able to intercept the AIFileFormatMessage and get the information from there. The other options are:

1. Provide your own way of saving documents that always saves with PDF compatibility turned on.

2. Use the kAIDocumentWritePostprocessNotifier to get a notification when a file has been saved, and then examine the saved file to see if it is PDF compatible and if not either resave with PDF compatibility or pop up an error.

Translate
Adobe
Guide ,
Feb 11, 2019 Feb 11, 2019

I'm not sure it's possible to do what you want unfortunately. You can get notification that a Save event has happened, but it doesn't come with details about the save.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 12, 2019 Feb 12, 2019

A.

Thanks for the reply

but it's not only on save that I need this info... I would also need it simply if someone opens a document. So I would need it on the front/open document.

I already check the document dictionary etc, and I do find a lot of info, but not about PDF compatibility...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 12, 2019 Feb 12, 2019

You can ask for a notifier when a document opens, that's quite straight forward. Should be a notifier example in the SDK. The ones you want will be in AIDocument.h

I don't know if you'll find out information about PDF compatibility though. I'm not sure what information is stored in an accessible way, if any.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 13, 2019 Feb 13, 2019

PDF compatibility is an option on saving a document from Illustrator that saves the document in a format that can be read by other applications that read PDF files. Any document can be saved with or without PDF compatibility and there is nothing in the document itself to say how it will be saved, it is just an Illustrator document. If you open the same file saved with or without PDF compatibility in Illustrator, the document will be exactly the same.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 13, 2019 Feb 13, 2019

LeoTaro,

the use case the customer is looking for is not related to Illustrator itself, but the customer has a workflow that will pick up the file after saving, and that workflow only processes PDF files. Hence, an Illustrator file without compatibility does not work in the flow. And so the intention is to alert the operator that he should enable the 'PDF compatibility' when saving first

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 13, 2019 Feb 13, 2019

You can use the kAIDocumentWritePreprocessNotifier to get a notification that the user is about to save. You could then pop up a message telling them to ensurePDF compatibility is turned on. This will probably become annoying after a while, so you could add a don't show again check box, or you might be able to get the setting for the last save from the preferences and only pop up the message if it was previously turned off (but that wouldn't catch them turning it off for the current save).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 14, 2019 Feb 14, 2019

LeoTaro,

My inquiry is really directed towards finding out if PDF compatibility is turned on for a given document.

I did a lot of experiments investigating the dictionaries associated with the document, but nothing helps me there.

I assume the information is probably linked in the file-format-data block, but that information is a non-documented block, and even investigating it does not really give a hint IF it is there at all.

Hence the question remains: is there a way in the Illustrator API/SDK to check if an illustrator file/document is configured to be saved with PDF compatibility on-or-off.

The first thing to check is of course the file format used for saving (that is easy by looking at the associated file format name).

But the second thing then is the actual setting, and that is the thing I cannot find

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 14, 2019 Feb 14, 2019
LATEST

You are not going to find anything in the document, you might be able to intercept the AIFileFormatMessage and get the information from there. The other options are:

1. Provide your own way of saving documents that always saves with PDF compatibility turned on.

2. Use the kAIDocumentWritePostprocessNotifier to get a notification when a file has been saved, and then examine the saved file to see if it is PDF compatible and if not either resave with PDF compatibility or pop up an error.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines