PDF to PostScript Using Ghostscript: Large Files Having Printing Problems

I am currently using Ghostscript to convert 500 page PDFs to PostScript.

I am using Windows 7, Ghostscript x64 v 9.16, and a Kodak Digimaster commercial printer.

I am using the following arguments for GhostScript to convert PDF to PS:

C:\Program Files\gs\gs9.16\bin\gswin64c.exe" 


Then I add commands %KDK

(proprietary) to specify which pages to print on which paper using a command %KDKSlip

based on the printer documentation.

The example below will print all pages in Letter duplex except pages 1/2 and 5/6. 1/2 pages will be printed on paper named "YellowPerf" and pages 5/6 on "TriPerf":

 %%BoundingBox: 0 0 612 792
 %%HiResBoundingBox: 0 0 612.00 792.00
 %%Creator: GPL Ghostscript 916 (ps2write)
 %%LanguageLevel: 2
 %%CreationDate: D:20150506143059-05'00'
 %%Pages: 8
 %%DocumentMedia: Letter 612 792 0 white ()
 %%+ YellowPerf 612 792 0 yellow ()
 %%+ TriPerf 612 792 0 white ()
 %KDKRequirements: duplex
 %KDKSlip: YellowPerf duplex 1
 %%+ TriPerf duplex 5


It is then sent to the Digimaster Kodak printer using the Windows command:

> COPY PostScript.ps PrinterName


This works great with smaller documents, but I'm having problems with large sets of pages.

When I tried to print to Digimaster using a 500-page Postscript PDF file, the errors were "Busy, do not reset RIP".

File size of those that don't work:

PostScript file size: 52 MB
PDF File size: 41 MB

The file sizes of those that worked:

File size PostScript 1MB
PDF File size: .8 MB

Why does this work fine with smaller files, but access larger files?

Does anyone have any tips?


source to share

1 answer

It is not necessary that the PostScript file size is causing your problem:

  • It could be PostScript itself, or
  • You may have made a mistake while editing PS files while pasting (proprietary) %KDK


Are you sure your text editor doesn't change your linefeed characters ?! It can also change the PostScript binary parts!

Also, I'm not sure if the command is copy

handling print jobs as it should. I would prefer the command lpr

(ah ... is this what's still available in your version of Windows ?!)

To debug this and learn a few different ways to print successfully, I would try a few different steps:


  • Send the original PostScript without adding %%KDK

    DSC header comments to the printer.

    There is a nice feature in this printer model that you can use: you can check if it completely processes the input RIP file without having to output 500 pages on (wrong) paper and wasting it so (you will also need to discard it afterwards - too much work also). Just press the red "Stop" button on your user interface monitor.

    Has he completed the RIP process successfully?

    Yes? Now you can even print it. Before you do that, you can even change the job settings to select a specific paper tray by pressing a button on the interface (can't remember the exact button label). Then "release" the job and it will be printed.

    If that works, you can turn your attention back to getting the rows %%KDK


    If you didn't need to try another route.

Check if another PDF-PS converter works.

  • Create PostScript file with pdftops

    (see here for version pdftops.exe

    - read README to see what options are available).

    Follow the analogue above: first check if it completes the RIP process. Then continue your manipulations %KDK


Check if PDF direct printing works

  • Digimaster model can use PDF directly. (Well, internally it uses its own PDF-to-PS converter, but it can't be seen from the outside, so it doesn't really count as a PDF RIP ...)

  • If that works, you can even add your pertinent comments %KDK

    to the PDF file, similar to the lines below (don't rely on me to get it right, this is head-on, and memory for decades!):

    %%DocumentMedia: ..........
    %KDKRequirements: .........
    %KDKInserts: ..............
    %KDKSlip: .................
    %KDKBody: .................
    %KDKCovers: ...............
    %KDKPDFPrintAnnotations: on 
    %KDKPDFFitToPage: on
    %KDKBinaryOK: on 
    %%Emulation: pdf
    %...here follow the lines of the original PDF file...

Submitting Jobs Using the Kodak Printfile Downloader (KPD)

  • For Windows, the so-called "Kodak Print File Downloader" (KPD) was previously used. KPD is an application, not a printer driver. Not sure if it's still available.

  • You can open your GUI and then load a PS, PDF, PCL or TIFF file into your job list. Then select multiple job options (for example, trays, stapling, sort, etc.). Finally, submit the assignment to Digimaster ...

  • KPD essentially does what you want to achieve: insert %KDK

    commands into the header of the file. But you want to do it with a script or editor (and maybe automatically through a batch process as soon as it is running).

  • KPD requires interactive user activity and cannot be scripted.

  • But you can (ab-) use it to intercept the files it creates from the Windows buffering system, examine them, and then adapt your scripts to make them work as well.


(I wanted to add this already in my original answer, but time is up, so I skipped it for a while ..)

Pay attention to the RIP processing directly in the printer interface

  • Digimaster printers have their own built-in touch or flat screen or tube monitor (depending on model age). They also usually have a full-time operator who knows the machine and its settings and features. The machine may be located some distance from the user submitting the job.

  • When debugging a printing problem, follow these steps:

    • Ask the operator to set the printer to "stop printing" but still "receive new jobs".
    • Submit any job (s) you want.
    • Go to the printer and its operator.
    • Release the RIP Ping Job and watch what happens:
      • You can see that everything goes well and ends up to the last page (you know how many pages you have submitted, right?)
      • Or, you may see that work is interrupted at a specific page number.
      • Or you may see the RIP printer chew a certain page (or several pages) for a very long time, but finally exits.
      • Or you can see the RIP printer is constantly hanging on a certain page.
      • Or...

    In any case, the details that can be observed here can provide important clues about where to look for the next ...



All Articles