Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

create Seperate PDF Files opens a window every time I need it to stop

Engaged ,
Mar 05, 2019 Mar 05, 2019

I am wondering if this is possible. I don't want the window to automatically open when I export the pdf's...

I am automating and this would create so many windows in the system.

Any ideas on how I could get this to stop?

TOPICS
Scripting
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 05, 2019 Mar 05, 2019

Hi,

what window do you mean? Does your pdf viewer opens every pdf after its creation?

To change this use this:

app.pdfExportPreferences.viewPDF = false;

Greetings

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2019 Mar 07, 2019

Hi bagonterman ,

does "opens a window" mean that you are seeing a new window of a folder in the file system showing the exported PDF ?

If so you are using method execute() on the parent of the File that is constructed for the export method.

Regards,
Uwe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 28, 2019 Mar 28, 2019

I did mean that. I got around this by not exporting that way. And instead just exported multiple times.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 28, 2019 Mar 28, 2019

> I got around this by not exporting that way. And instead just exported multiple times.

I completely do not understand this. Could elaborate?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 29, 2019 Mar 29, 2019
  app.interactivePDFExportPreferences.usePDFStructureForTabOrder;

   app.interactivePDFExportPreferences.exportAsSinglePages = true;

   app.interactivePDFExportPreferences.rasterResolution = RasterResolutionOptions.NINETY_SIX_PPI;

   app.interactivePDFExportPreferences.pdfMagnification = PdfMagnificationOptions.FIT_VISIBLE;

   app.interactivePDFExportPreferences.viewPDF = false;

   try {

   doc.exportFile("Adobe PDF (Interactive)", filePath + "/" + job_Num + dataGrade + ".pdf", false);

  }

   catch (err) { $.writeln(err) }

This changed to this.

app.interactivePDFExportPreferences.usePDFStructureForTabOrder;

   app.interactivePDFExportPreferences.exportAsSinglePages = false;/////exports multiple pages but opens a window by default.

   app.interactivePDFExportPreferences.rasterResolution = RasterResolutionOptions.NINETY_SIX_PPI;

   app.interactivePDFExportPreferences.pageRange = "1-1";

   app.interactivePDFExportPreferences.viewPDF = false;

   app.interactivePDFExportPreferences.pdfMagnification = PdfMagnificationOptions.FIT_VISIBLE

   try {

   doc.exportFile("Adobe PDF (Interactive)", filePath + "/" + job_Num + property + "_interactive" + ".pdf", false);

  }

   catch (err) { $.writeln(err) }

   app.interactivePDFExportPreferences.pageRange = "2-2";

   try {

   doc.exportFile("Adobe PDF (Interactive)", filePath + "/" + job_Num + property + "_print" + ".pdf", false);

  }

   catch (err) { $.writeln(err) }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2019 Mar 30, 2019
LATEST

Hi bagonterman ,

see into the first argument of exportFile().

For exporting PDF Interactive you'd better use the enumerator: 

ExportFormat.INTERACTIVE_PDF or its corresponding enumeration number 1952409936 .

Adobe InDesign CS6 (8.0) Object Model JS: Document

Adobe InDesign CS6 (8.0) Object Model JS: ExportFormat

If that is not working try method asynchronousExportFile() where you can also define ExportFormat.INTERACTIVE_PDF as first argument:

Adobe InDesign CS6 (8.0) Object Model JS: Document

Regards,

Uwe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 07, 2019 Mar 07, 2019

Check the object model. The document.exportFile() function has a parameter to suppress the PDF export dialog:

exportFile (format, to, showingOptions, using versionComments, forceSave)

So you would use false as the third parameter.

P.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines