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

Colour conversion - pdf setting preference - apple script

Community Beginner ,
Nov 28, 2021 Nov 28, 2021

Copy link to clipboard

Copied

Hello community,

 

I'm trying depsratly to convert my pdfs using CMYK settings which is in export PDF settings (output>Colour conversion (value : convert to destination)

 

I'm using indesign server and apple script but I can't make it work as it is throwing an error 

'A identifier can’t go after this identifier'

 

how can I please make it work. Here my code:

 

 

tell application "InDesignServer"
set myDocument to open "%s:%s.idml"
set myWorkingSpaceCMYK to working space CMYK of color settings
tell PDF export preferences
set colour Conversion to Convert to Destination
set Destination to Generic CMYK Profile
end tell
tell myDocument
export format PDF type to "%s:%s.pdf"
end tell
close myDocument
end tell

 

TOPICS
How to , Import and export , Scripting

Views

200

Translate

Translate

Report

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 Expert ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

Hi,

 

the problem is with the lines

"set colour conversion to conver to destination"

and

"set destination to generic CMYK Profile"

 

I am not sure what you are trying to do here but they don't appear to be properties of the PDF Export Preferences.

 

In the "Script Editor" you can select File-> Open Dictionary

And then search for "PDF Export Prefernces" and it will show you what options you have.

Votes

Translate

Translate

Report

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 Expert ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

Hi Mohamed,

 

maybe I misunderstand what you like to do.

Even if your code will work I would not recommend this workflow.

Color conversions of existing PDFs should be done with the appropriate software.

And that is not InDesign.

 

You should use a tool that can do the conversion with Device Link technology.

Just to give you a hint, the Callas pdfToolbox is one of some tools you could use for this:

https://help.callassoftware.com/m/pdftoolbox/l/726681-devicelink-conversion

 

If you want to convert simple pages with simple contents, not placed PDFs for example, then you could use InDesign.

Otherwise you would risk to convert the color of e.g. plain text in 100% Black inside placed PDFs or EPSs to a mix of CMYK.

 

First describe step by step what you want to do with an example document using the desktop version of InDesign.

Then we could help you with scripting. Especially tell us what kind of PDF you want to export. PDF/X-1a ? PDF/X-4? Something else?  You need color management turned on to do this right. "Destination to Generic CMYK Profile" cannot be the right workflow.

 

Regards,
Uwe Laubender

( ACP )

Votes

Translate

Translate

Report

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 Expert ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

Hi @mohamedd31070598 , try something like this:

 

 

 

 

tell application id "com.adobe.indesign"
	set myDocument to active document
	--set myWorkingSpaceCMYK to working space CMYK of color settings
	tell PDF export preferences
		set PDF color space to CMYK
		--Repurpose CMYK sets Color Conversion to Convert to Destination (Preserve Numbers) 
		--set PDF color space to Repurpose CMYK
		set PDF destination profile to use document
		--set PDF destination profile to "Generic CMYK"
	end tell
	set p to file path of myDocument
	set thePath to p & "myPDF.pdf" as string
	export myDocument format PDF type to thePath
	close myDocument
end tell

 

 

 

 

The Generic CMYK profile isn’t a profile for any CMYK device, so you might want to use the document CMYK profile instead. Also, I’m using the active doc in my example, the export to has to be to a full file path (a colon delimited file path), so in my example I’m getting the path to the document’s parent folder  as a string and adding the PDF’s name.

Votes

Translate

Translate

Report

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 ,
Nov 29, 2021 Nov 29, 2021

Copy link to clipboard

Copied

many thanks all for your quick answer the help you are providing. very much appreciated. just to make more clarification. I have an IDML with a link to an eps file with transparency. however when trying to print the document, it is printed black. the only way I found is to convert the file to CMYK when I export it to PDF.

am I doing it the wrong way or should I convert the links to CMYK in phostoshop for example?

Votes

Translate

Translate

Report

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 Expert ,
Nov 30, 2021 Nov 30, 2021

Copy link to clipboard

Copied

Hi @mohamedd31070598 , EPS doesn’t allow transparency. Have you tried saving as to a different format? Try .PSD for bitmap or .AI for vectors

Votes

Translate

Translate

Report

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 Expert ,
Nov 30, 2021 Nov 30, 2021

Copy link to clipboard

Copied

Mohamed said: "I have an IDML with a link to an eps file with transparency. however when trying to print the document, it is printed black."

 

What's wrong with printing black?

Maybe the EPS file contains only items in black.

 

Can you show a screenshot of the EPS placed on an InDesign page where Overprint Preview is turned on?

Did you consider to distill the EPS file to PDF and inspect that in Acrobat Pro DC?

If you open the EPS in a text editor like Notepad++ what is the PostScript code showing as creator software?

 

Thanks,
Uwe Laubender

( ACP )

Votes

Translate

Translate

Report

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 ,
Nov 30, 2021 Nov 30, 2021

Copy link to clipboard

Copied

LATEST

Guys,

 

again many thanks for your help. The code from rob day worked!!! you saved my day

Votes

Translate

Translate

Report

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