InDesign CS5 export bug or feature for applescript?

Hi guys,

I am exporting certain pages from InDesign CS5 to PDF. Outside of InDesign I need to gain access to the streams of text and replace them with different text (i.e. the PDF becomes a template and using PDFBox to change text values for the final printable document). I have run into a scenario that has me stumped…

I have a preformatted PDFPreset.joboptions file and a transparency flattener file that are called from applescript. It successfully exports a PDF. When I use the File->Adobe PDF Preset or File->Export… they produce a file that looks the same but is constructed differently than the export function in applescript. The difference being the availability of streams of text in the PDF.

Has anybody seen this problem before - using the same presets and getting different results from applescript vs GUI? I have included my export code that generates a PDF without accessible text. (Note I haven’t included the preset or transparency flattener but the basic settings are X1a:2003, PDF1.3).


global PDFPreset
global myExportFile
set PDFPreset to "myPDFPreset" as string
set myExportFile to "File1.pdf" as string
tell application "Adobe InDesign CS5"
	set myPDFExportPreset to PDF export preset PDFPreset
        set page range of PDF export preferences to page 1
		tell active document to set blending space of transparency preferences to CMYK
		tell active document
			export format PDF type to myExportFile using myPDFExportPreset without showing options
		end tell
end tell

Hi (i’m french)

I have a similar problem with GUI vs Applescript

With GUI (with big documents) there are missing graphics (grey mark on graphic box) in the exported PDF
No problem with manual export !

I search the reason and found a little interresting thing
It work in applescript if you write this :

export format PDF type to myExportFile using myPDFExportPreset with showing options

(instead of ‘without showing’)
Just a strange thing, the export preset i’ve selected (in the applescript) is not selected when the export window appear…

Have you found anything ?

Regards

AppleScript: 1.10.7
Operating System: Mac OS X (10.4)

Reopening this thread as I have a similar issue. We’re using a script to export a PDF and actually call the name of the PDF Export preset. When comparing the scripted export vs. a GUI export, we find differences in the gradient areas of our PDFs. Has anyone else seen this issue or other issues with the PDF comparison between scripted and GUI? If so, what has been your solution?
Thanks!

Hi,

syntax of the above scripts seems to right. Have you tested a export by Javascript against it?
Does it behave the same?

Strange, I produce thousands of PDFs a year using this syntax:

export format PDF type to destination_folder & document_name using my_pdf_export_preset without showing options

and never noticed any difference compared to GUI

One thing though, just before exporting to PDF I make sure I assign the appropriate CMYK profile for untagged elements with this syntax:

set CMYK profile to “SWOP2006_Coated3v2.icc”

Hope this helps