1

I'm on windows and am trying to convert 6000 PDF files in batch to postscript files. The reason is I'm trying to do pdf imposition as asked here, first wanted to do in R as asked here. I found a library grImport to handle vector graphics in R, but it needs .ps files.

I could already convert batch .pdf files to .eps using Inkscape using this script. However, I need .ps for the R package. I was unable to do it using Adobe Acrobat Pro Action (it simply doesn't work on the folder, and freezes when I try it on an individual file.)

I have also tried ghostscript but setting -sDEVICE=pswrite throws an error saying the device is unknown. Also, I really could not get my head around GS.

How can I do this? (If you happen to know a solution to the main problem, sharing it is very appreciated.) Thanks in advance.

psyguy
  • 312
  • 3
  • 16

1 Answers1

0

The pswrite device was deprecated years ago (it only produced level 1, big, ugly, unscalable output). You want to use the ps2write device which produces level 2 PostScript.

A simple command line for Ghostscript woudl be:

gs -sDEVICE=ps2write -o out.ps input.pdf

There are tools for imposing PDF files, you can even (with some effort) do it with Ghostscript.

KenS
  • 30,202
  • 3
  • 34
  • 51