PDF export without revealing in Finder

Community Beginner ,
Oct 27, 2020

Copy link to clipboard

Copied

I have a setup where I am running a script to do some data merging and PDF export. Every time I run the script to export, Indesign does reveal the PDF in Finder, but I don't want it to. The checkbox "View PDF after exporting" is unchecked in all my presets. Are there any other settings that I am unaware of that might cause this?

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Try setting the property exportAsSinglePages to false

-Manan

 

TOPICS
Import and export, Print, Scripting

Views

73

Likes

Translate

Translate

Report

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

PDF export without revealing in Finder

Community Beginner ,
Oct 27, 2020

Copy link to clipboard

Copied

I have a setup where I am running a script to do some data merging and PDF export. Every time I run the script to export, Indesign does reveal the PDF in Finder, but I don't want it to. The checkbox "View PDF after exporting" is unchecked in all my presets. Are there any other settings that I am unaware of that might cause this?

Adobe Community Professional
Correct answer by Manan Joshi | Adobe Community Professional

Try setting the property exportAsSinglePages to false

-Manan

 

TOPICS
Import and export, Print, Scripting

Views

74

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 27, 2020 0
Adobe Community Professional ,
Oct 27, 2020

Copy link to clipboard

Copied

Try setting the property exportAsSinglePages to false

-Manan

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2020 0
Community Beginner ,
Oct 27, 2020

Copy link to clipboard

Copied

Yes, that was it. Thank you! The only problem is I need them to be as single pages. Will that require them to open the folder?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2020 0
Adobe Community Professional ,
Oct 27, 2020

Copy link to clipboard

Copied

I think in that case you will have to export single pages in a loop, using this feature opens up the folder even when done manually. Did you try setting userInteractionLevel to false and see if it makes any difference.

-Manan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2020 0
Community Beginner ,
Oct 27, 2020

Copy link to clipboard

Copied

Yes, it still opens a new window. But good to know that this is a standard behaviour. I'll see if I put it in a loop as you suggest or just create a macro to close the Finder windows. Thanks!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2020 0
Contributor ,
Oct 27, 2020

Copy link to clipboard

Copied

Standard behaviour? Not on my machine...

Try setting the viewPdf option in your script (since it is a per app setting and NOT per preset)

app.pdfExportPreferences.viewPDF = false;

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2020 0
Adobe Community Professional ,
Oct 27, 2020

Copy link to clipboard

Copied

Hi @Jens Trost 

It's not about the pdf being opened after export, but the folder where the export is made is opened when using the SingePages option. I tried on a MAC CC2020 and could not stop the finder window from opening when this option is selected, even when exporting manually. Is this not the case on your end?

-Manan

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 27, 2020 0
Contributor ,
Oct 28, 2020

Copy link to clipboard

Copied

Hi @Manan Joshi 

yea I realized that after my post, but thought "maybe give it a try anyway" 😄

How exactly are you exporting?
I just verified it again with this one liner – no Finder window.

app.activeDocument.dataMergeProperties.exportFile("~/Desktop/test.pdf",app.pdfPresets.itemByName("test"));


So no it is not the case on my end, but maybe you're doing it in a different way.
In fact I had to code an extra execute() line in my script since I specifically wanted an option in my script to show the PDF in Finder 😄

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 28, 2020 0
Contributor ,
Oct 28, 2020

Copy link to clipboard

Copied

Okay I'm sorry, forget all I've said.
I totally confused exportAsSinglePages with exportReaderSpreads... so YES I do get the Finder window.

So you propably have to loop through the pages after all.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 28, 2020 0