Skip navigation
Currently Being Moderated

[JS CS5] Preflight reports sometimes not generating, preflight PDF only 1 page

Apr 2, 2012 7:59 AM

Tags: #javascript #scripting #preflight

Hi there,

 

I've got some scripts which generate books and documents, and as part of this process, they create PDF preflight reports for each of the documents. I've only just started using the preflight reports properly so I hadn't noticed this before, but it seems that sometimes, the preflight report for one document doesn't generate, despite the fact that no errors are thrown. If I try to manually generate reports for this document, the PDF only has 1 page of info, despite there being many errors (75). Stranger still, the one page is marked as page 2 (i.e. page 1 and all pages after page 2 of the pdf report are missin) If I generate a txt report then all of the errors are mentioned in the report.

 

I've looked around and can't find much about whether this is to do with a built-in limit or if there's some option I can change to make this work. Is there something I'm missing, or is it just a strange bug, like it seems (seeing as it works on some docs but not others)?

 

Thanks,

 

Dan

 

Edit: Here's the specific code, in case it helps...

 

if(preflightProfile.isValid){

  var process = app.preflightProcesses.add(this.Document, preflightProfile);

  process.waitForProcess();

  results = process.processResults;

  if (results != "None")

  {

  //Export the file to PDF

  //The "true" value selects to open the file after export.

  process.saveReport(File(GF.BookFolder + "/Output/" + this.SectionName + "_preflight.pdf"), true);

  }

  //Cleanup

  process.remove();

}

else{

  GF.WriteError("Error processing preflight");

}

 
Replies
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Apr 2, 2012 10:13 PM   in reply to DuffelBoat

    What exact version of InDesign and what platform?

     

    I have seen serious corruption problems with the preflight database in most releases of CS5 and CS5.5, primarily manifesting in the user interface, sometimes leading to crashes and sometimes leading to hard hangs. It would not surprise me if this manifested as inconsistencies in the scripting interface as well.

     

    Or your problem could be completely different.

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Apr 4, 2012 5:51 AM   in reply to DuffelBoat

    Yes, 553 is up to date. I think the problem is less bad there than in some earlier versions, but it's definitely still present.

     

    Is there any way to rebuild the preflight databse or determine if this is the problem?

    If you are seeing hangs or crashes, then there is additional data we could look at.

    But if you're just seeing anomalous behavior, then I am really not sure.

    You may have an independent bug.

     
    |
    Mark as:
  • John Hawkinson
    5,572 posts
    Jun 25, 2009
    Currently Being Moderated
    Apr 4, 2012 5:59 AM   in reply to DuffelBoat

    Well, you could certainly try CS5.5. My preflight problems were....different in 7.5.2.318. Harder to trigger, and more crashes than hangs, if I recall correctly.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points