Skip to main content
Participating Frequently
October 29, 2018
Question

Acrobat DC crashes printing to PostScript

  • October 29, 2018
  • 2 replies
  • 500 views

I have a PDF with many layers that are hidden or shown based on javascripts and field values. I'm trying to print to post script and the application freezes and then crashes about 30 seconds later. I'm able to print to post script with another pdf, but this one in particular will not work. It's a pretty large file (13mb), so I thought I would try to flatten it and reduce the file size, but I still have the same problem. Below is the function I'm using to print:

function PrintThis(){

var pp = this.getPrintParams();

pp.fileName = "/filepath/something.ps";

pp.printerName = "";

pp.interactive = pp.constants.interactionLevel.silent;

pp.pageHandling = pp.constants.handling.none;

    if(typeof(PrintToLoc) == "function"){

        PrintToLoc(this, pp);

    }

    else{

        app.alert("Missing system access priviledges. " + "Please contact administrator.");

    }

}

Are there any types of fields, images, layers, etc. that are post script unfriendly? I'm not sure why I can print to post script with another pdf, but not this one in any form.

This topic has been closed for replies.

2 replies

Legend
October 29, 2018

Hmm, looks as if printername "" triggers Export to PS functionality. However, you could try just printing to file with a PostScript printer driver from the UI (even to Adobe PDF which is PostScript; print to file will not make a PDF file). The aim is to see if JavaScript is the problem.

Participating Frequently
October 29, 2018

It shouldn't be related to the javascript since the function works with another PDF. It's just this PDF in particular, so I was thinking that there are objects within the PDF that may be causing the issue. The PDF is also 13MB, so I don't know if that should make a difference or not.

try67
Community Expert
Community Expert
October 29, 2018

Instead of printing trying the saveAs command and set the cConvID parameter to "com.adobe.acrobat.ps".

It's a more reliable way of converting the file to a PostScript file than printing it, I believe.

try67
Community Expert
Community Expert
October 29, 2018

Post the code of PrintToLoc, please.

By the way, there's no "d" in "privileges"...

Participating Frequently
October 29, 2018

Thanks. Spelling changed.

var PrintToLoc = app.trustedFunction(

  function(oDoc, pp)

  {

      app.beginPriv();

          

      try{

          oDoc.print(pp);

      }catch(e){

        app.alert("Error in Printing");

      }

      app.endPriv();

  }

);

Legend
October 29, 2018

Can you print this file manually? to PostScript?