Skip to main content
September 8, 2011
Answered

[CS5] Exporting PDF with PDF/X-1a:2001, get CMYK Error

  • September 8, 2011
  • 2 replies
  • 3532 views

Hello,

I'm trying to create a new PDF Export Preset that specifies the PDF/X-1a:2001 standard. All I'm trying to test with is a brand new document with all default values. It works fine if I use my preset in my desktop InDesign, however, if I run a script that attempts to export the same exact document on our InDesign Server, I get an error "warning" which causes the script to fail:

WARN [Server] Color in one or more placed graphics cannot be represented as CMYK. Non-CMYK color is not compliant with the PDF/X-1a standard. You can click OK to produce a valid PDF, but it will not be a PDF/X-1a compliant file.

So my question would be, 1) what part of a blank document is not CMYK compliant? and 2) is there a way to force a conversion of anything non-CMYK to CMYK?

I should also note that I don't think the issue is with my Preset that I made, I've tried using the built-in [PDF/X-1a:2001] Preset as well in my script, which returns the same error.

Thanks in advance!

-Lloyd

This topic has been closed for replies.
Correct answer

Thats what I thought, but when my script specifies the built-in preset for PDF/X-1a like this:

myDoc.exportFile(ExportFormat.pdfType, myNewFile, app.pdfExportPresets.item('[PDF/X-1a:2001]'));

It fails on the server and I see this message:

WARN [Server] Color in one or more placed graphics cannot be represented as CMYK. Non-CMYK color is not compliant with the PDF/X-1a standard. You can click OK to produce a valid PDF, but it will not be a PDF/X-1a compliant file.

But I can run the script locally, exporting the exact same document using the exact same preset, and it works just fine?


I've decided that the problem is likely the watermark that our dev InDesign server applies to each PDF. When I try this on our Live server it's not an issue, so I'll just have to come up with a work-around for our dev server!

Thanks for the help!

2 replies

Harbs.
Legend
September 8, 2011

You probably added an RGB color the the app of your server at one point.

Remove all app.swatches which are RGB (or remove them all except for the ones that can't be removed), and your problem should go away.

September 8, 2011

Is there a way I can convert those app swatches to CMYK in my script? There are going to be times when we have documents with RGB graphics that need to be exported as a PDF using PDF/X-1a. It would be ideal if I could convert any that are RGB to CMYK before export.

I tried something like this, but no luck:

var myColors = app.colors.everyItem().getElements();

        for (var i = 0; i < myColors.length; i++) {

           

            if (myColors.space == ColorSpace.rgb) {

                color.space = ColorSpace.cmyk;

            }

        }

Harbs.
Legend
September 8, 2011

Why don't you just convert the color to CMYK in your PDF Preset?

The default PDF/X1a preset does exactly that...

Harbs

September 8, 2011

I should also mention that I can run this script locally via ExtendScript Tool Kit, and it works fine if I specify the [PDF/X-1a:2001]  and it also works with my own Preset. Is there anything on the server that I could check, or maybe something differently I need to do with my script?