Is it possible to force auto-pst-pdf or pst-pdf to create PDF images and include them if I’m using xelatex?


I have to typset a Book that needs OpenType fonts so I choose xelatex. The autor made her graphics with pstricks. Everything works fine and I can compile the file and get the PDF with the graphics all right. But the PDF must be converted with Acrobat Pro (color conversion to gray scale—I didn’t choose this workflow …) and I get an error when the PDF contains material creadet by PSTricks. My idea to solve this is to export all {pspictures} as a PDF image and include these images back to the main file. Thats exactly what auto-pst-pdf does when it is used with pdflatex but not together with xelatex :-(

I have only a german Acrobat but with this images you maybe see my what I mean:
adobe workflow

Example Code

The following code works fine with xelatex but I need the graphic to be exported and reimported as PDF image.




I asked the question at the german board typografie.info. Maybe there’s a PDF expert who knows how to fix the PDF …

  • 1
    You can use pstricks with XeLaTeX without packages like auto-pst-pdf. Nov 7, 2011 at 18:45
  • @MarcoDaniel: Yea I know, but Acrobat isn’t happy with that ;-)
    – Tobi
    Nov 7, 2011 at 19:45
  • @Tobi: Did you try post-processing your PDF with GhostScript (PDF-to-PDF)? This tends to make the files smaller (which is why people to do it), but also fixes a number of complaints in my experience.
    – Joseph Wright
    Nov 8, 2011 at 9:50
  • @JosephWright: No I didn’t. I have gs installed but can’t use it. Could you please tell me the command for this conversion?
    – Tobi
    Nov 8, 2011 at 17:05
  • 1
    @Tobi Usually something like gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf works.
    – Joseph Wright
    Nov 8, 2011 at 17:23

3 Answers 3


" ... But the PDF must be converted with Acrobat Pro (color conversion to gray scale—I didn’t choose this workflow …) and I get an error when the PDF contains material created by PSTricks."

The following process using Acrobat Pro 9 (Mac version) converts the pdf file containing the image generated by your minimal code to a pdf file containing a grayscale image.

(1) Open the file with Acrobat Pro.

(2) Select Export > Postcript > Postcript

(3) Select "Settings"

(4) Select "Generic Gray Profile" for Color Profile.

(5) Save the file.

(6) Now open the .ps file (either in Acrobat Distiller or in Preview) and save it as a pdf.

The following is the output.

enter image description here

  • 1
    Thank you very much! It worked fine :-) Unfortunately a few hours too late for the first bounty, but I started a second one ;-)
    – Tobi
    Nov 18, 2011 at 0:12

This is not the answer to your actual question, but rather an advice about your underlying problem.

  1. You may want all figures, including the ones created by pstrick, to use cmyk color model by specifying \usepackage[cmyk]{xcolor}. This might make Acrobat Pro happy (it might dislike the fact that different parts of PDF use different color models).

  2. You may want to create grayscale or monochrome PDF using \usepackage[gray]{xcolor} or \usepackage[monochrome]{xcolor}. In this case you might not need Acrobat Pro at all.

  • Thanks, but I tried this already and it doesn’t change anything …
    – Tobi
    Nov 8, 2011 at 16:55
  • You mean option 1 or option 2? I have a strong suspicion that if option 1 does not work, Acrobat would not like the files from auto-pst-pdf either, and you are left with option 2...
    – Boris
    Nov 8, 2011 at 17:16
  • I tried only option 1 because option 2 is no option (I can’T influence the work flow for this project). But why does Acrobat have a problem. If I use colors (with xcolor) and no PSTricks Acrobat is happy …
    – Tobi
    Nov 8, 2011 at 20:56

it works with lualatex:





lualatex -shell-escape <file>

By the way: you can convert the file into gray scale also by ghostscript

gs -sOutputFile=<grayscale.pdf> -sDEVICE=pdfwrite -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH <color.pdf>
  • With lualatex I get the desired output with external PDF images but it doesn’t work too. There must be a problem with PSTricks … Can I convert the PDF to grayscale with gs and use the Gamma Grey 1.8 profile as Acrobat does?
    – Tobi
    Nov 9, 2011 at 11:34
  • There is no problem with PSTricks. It is acrobat! For gs see edit
    – user2478
    Nov 9, 2011 at 11:45
  • In my eyes it’s PSTricks because Acrobat works fine with PDF without PSTricks graphics :-P
    – Tobi
    Nov 9, 2011 at 12:05
  • The gray conversion worked but I must check if the colors are matching the other parts, which come from MS Word (not my choice!), of the book …
    – Tobi
    Nov 9, 2011 at 12:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .