Highlighted

Automate conditional text versions export to .pdf

Community Beginner ,
Jun 21, 2018

Copy link to clipboard

Copied

Happy Thursday everyone, I'm using Indesign CC (v 13.1) & was wondering if anyone had an updated script, or another option, of how to automate/batch export .pdfs with each version of conditional text turned on/off accordingly. I see this script from 2012 but since conditional text has been updated since then, I'm not sure if this is the best option. Thanks! https://forums.adobe.com/thread/1079387

TOPICS
Scripting

Views

1.0K

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

Automate conditional text versions export to .pdf

Community Beginner ,
Jun 21, 2018

Copy link to clipboard

Copied

Happy Thursday everyone, I'm using Indesign CC (v 13.1) & was wondering if anyone had an updated script, or another option, of how to automate/batch export .pdfs with each version of conditional text turned on/off accordingly. I see this script from 2012 but since conditional text has been updated since then, I'm not sure if this is the best option. Thanks! https://forums.adobe.com/thread/1079387

TOPICS
Scripting

Views

1.0K

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
Jun 21, 2018 0
Valorous Hero ,
Jun 22, 2018

Copy link to clipboard

Copied

Well, seems perfectly functional here on CC18.

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...
Jun 22, 2018 1
Community Beginner ,
Jun 22, 2018

Copy link to clipboard

Copied

Then it's user error because I'm a scripting novice. I get an error on line 1, no matter what .pdf setting I put in, or how I enter it. Someone told me to delete line 1, so I did, & then I get a line 3 error. How are you entering the .pdf settings where it says MyPdfPreset'?  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...
Jun 22, 2018 0
Adobe Community Professional ,
Jun 22, 2018

Copy link to clipboard

Copied

Hi,

The entry on line one comes for the InDesign UI ( file->Adobe PDF Presets ), you need to replace "MyPdfPreset" with one of the presets from that list or a default one such as "[High Quality Print]" ( assuming your machine is in English).

Hope this helps

Malcolm

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...
Jun 22, 2018 0
Community Beginner ,
Jun 22, 2018

Copy link to clipboard

Copied

Thanks! Maybe I'm not being clear — I know that I need to replace 'MyPdfPreset', but I've tried many different things. I have a specialty setting named Company_PDF that I'm working with. I've tried Company_PDF, 'Company_PDF', PDF/X-1a:2001, 'PDF/X-1a:2001', and any other way I could think to format. It's all erroring on me. Should it be in the apostrophes? Should it be quotes, like in your answer? Should it have neither? Does it need the brackets, like you put in "[High Quality Print]"? Ideally, I need to use the Company_PDF one.

Thanks for the help.

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...
Jun 22, 2018 0
Adobe Community Professional ,
Jun 22, 2018

Copy link to clipboard

Copied

Hi,

It should be as it appears in the menu, have included the code below for [High Quality Print],  the only change I made was to the string and as previous members have said it works without any problems.

var nameOfThePDFExportPresetYouWantToUse = '[High Quality Print]' //please don't forget to set! 

 

var currDoc = app.activeDocument; 

var currFilePath = currDoc.filePath.absoluteURI + '/'; 

var currFileName = currDoc.name.replace(/.indd/, ''); 

var currConditions = currDoc.conditions; 

//set all conditions visible to false 

currConditions.everyItem().visible = false; 

 

l = currConditions.length; 

//cycle thru conditions 

while(l--){ 

currCondition =     currConditions

//set actual condition visible to true 

currCondition.visible = true; 

 

currConditionName = currCondition.name 

//set pdfName 

var exportTo = File(currFilePath + currFileName + '_' + currConditionName +'.pdf'); 

 

//Have a look here: 

//export PDF. to choose backgroundexport. use the second line of code 

currDoc.exportFile(ExportFormat.PDF_TYPE, exportTo,false,  nameOfThePDFExportPresetYouWantToUse); 

//currDoc.asynchronousExportFile(ExportFormat.PDF_TYPE, exportTo,false,  nameOfThePDFExportPresetYouWantToUse); 

 

 

//set actual condition visible to false 

currCondition.visible = false; 

Note - code taken from - https://forums.adobe.com/thread/1079387

Can you try that as let us know what happens?

Regards

Malcolm

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...
Jun 22, 2018 2
Community Beginner ,
Jun 22, 2018

Copy link to clipboard

Copied

This works! (kind of.)  The script runs, and it'll output each version of the conditional text that I have, but it doesn't output a version with all the conditions off, which I need as well for this to be an effective tool for me. Is there something I'm missing? I've tried changing the trues to false & vice versa.

But I can get it to run w/[High Quality Print], & [PDF/X-1a:2001] (I didn't try the brackets!!), and with the 'Company_PDF' one. So that's awesome.

Thank you for your help. It's very appreciated.

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...
Jun 22, 2018 0
Adobe Community Professional ,
Jun 23, 2018

Copy link to clipboard

Copied

Hi,

you may contact the author of the script, Hans-Gerd Claßen: -hans-

Original code found here:

Re: A Script for Conditional Text Batch Export

Regards,
Uwe

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...
Jun 23, 2018 0
Advocate ,
Jun 23, 2018

Copy link to clipboard

Copied

Hi Uwe,

Some times ago, a client asked to me about a similar script but I preferred to play with "conditions sets", allowing more complex conditions associations!

Capture d’écran 2018-06-23 à 15.13.58.png

With the UI-palette, he could:

• choose the "pdf export preset",

• choose the "conditions set" to be taken in account or decide to export "all" the conditions sets,

• include (or not) "virtual watermarks" [by choosing one in a drop list the user can build himself].

Last point, the UI allows a "live-update" of the active conditions set in the doc [kind of last control before export].

Capture d’écran 2018-06-23 à 15.34.35.png

Best,

Michel, for FRIdNGE

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...
Jun 23, 2018 1
Community Beginner ,
Jun 23, 2018

Copy link to clipboard

Copied

Aaaah! Got it to do what I wanted by just making a condition that mimiced the Unconditional. Now it's perfect. Thanks for your help Malcom — have a great weekend.

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...
Jun 23, 2018 0
Community Beginner ,
Jun 23, 2018

Copy link to clipboard

Copied

Oh, that looks really cool! Nice work Michel.

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...
Jun 23, 2018 0
New Here ,
Dec 21, 2018

Copy link to clipboard

Copied

Michel: This is amazing! Would you please provide a link for download and/or purchase? Thank you

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...
Dec 21, 2018 0
New Here ,
Sep 11, 2020

Copy link to clipboard

Copied

Hi Michel.

Is that script "Export Conditions set to pdf" still available or for sale?

Best regards René

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...
Sep 11, 2020 0