Highlighted

Extendscript for PDF taking around an hour to execute on server

New Here ,
Sep 17, 2020

Copy link to clipboard

Copied

I'm working on a script to export an inDesign document that consists of placeholders to a PDF file.

I'm using the below code to export the pdf file:

var opFileLow=new File(filesPath.OutputPDFFileLow);

var preset2 = app.pdfExportPresets.itemByName("[Smallest File Size]");

doc.exportFile(ExportFormat.pdfType, opFileLow, preset2);

 

This code is working fine when I'm running on my local machine and it's giving me the final output in less than 2 min.

But when same code is hosted on server, it's taking around an hour to finish the job.

I have tried dataMergeProperties as well but that's not helping me either.

 

I am running version 2019 for both Server and inDesign.

 

Can anyone suggest any solutions or workarounds that may assist me with this script?

 

Many thanks

Ramandeep

 

Adobe Community Professional
Correct answer by Peter Kahrel | Adobe Community Professional

I still think you need to do something about rellinking your images after transferring the document to the server You may have a folder 'Links' there, but it's a different folder. Other than that I can't think of any advice.

 

P.

TOPICS
Publish online, Scripting, SDK, Server developers

Views

125

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

Extendscript for PDF taking around an hour to execute on server

New Here ,
Sep 17, 2020

Copy link to clipboard

Copied

I'm working on a script to export an inDesign document that consists of placeholders to a PDF file.

I'm using the below code to export the pdf file:

var opFileLow=new File(filesPath.OutputPDFFileLow);

var preset2 = app.pdfExportPresets.itemByName("[Smallest File Size]");

doc.exportFile(ExportFormat.pdfType, opFileLow, preset2);

 

This code is working fine when I'm running on my local machine and it's giving me the final output in less than 2 min.

But when same code is hosted on server, it's taking around an hour to finish the job.

I have tried dataMergeProperties as well but that's not helping me either.

 

I am running version 2019 for both Server and inDesign.

 

Can anyone suggest any solutions or workarounds that may assist me with this script?

 

Many thanks

Ramandeep

 

Adobe Community Professional
Correct answer by Peter Kahrel | Adobe Community Professional

I still think you need to do something about rellinking your images after transferring the document to the server You may have a folder 'Links' there, but it's a different folder. Other than that I can't think of any advice.

 

P.

TOPICS
Publish online, Scripting, SDK, Server developers

Views

126

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
Sep 17, 2020 0
Most Valuable Participant ,
Sep 17, 2020

Copy link to clipboard

Copied

Not completely clear whether you are running InDesign Server on the server, or just the regular InDesign app? Please clarify.

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 17, 2020 0
New Here ,
Sep 17, 2020

Copy link to clipboard

Copied

I am running both. When I'm running the script with inDesign App on my local machine which is Windows, it's working fine.

 

When I host script on the server and execute it from there it's taking longer to generated the output. Server is also a Windows system.

 

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 17, 2020 0
Adobe Community Professional ,
Sep 17, 2020

Copy link to clipboard

Copied

Do you have a lot of links in the indd? Resolving links on networks can be very slow on Windows system. An seems excessive though.

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 17, 2020 0
New Here ,
Sep 17, 2020

Copy link to clipboard

Copied

Yes, there are lot of links in the indd which are put up as images and PDFs.

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 17, 2020 0
New Here ,
Sep 17, 2020

Copy link to clipboard

Copied

Sorry, I missed to add that the links are kept at the same location where the inDesign document is. And links are inside a folder named as Links.

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 17, 2020 0
Adobe Community Professional ,
Sep 18, 2020

Copy link to clipboard

Copied

But when you transfer the document to the server it still has you local desktop paths.

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 18, 2020 0
New Here ,
Sep 24, 2020

Copy link to clipboard

Copied

Can you suggest best way for this kind of inDesign files which have lots of links and images in it as most of our clients have files with about 300-400 pages. These files too are with lots of links and sometimes PDF files.

We want to write our own script to generate PDF files.

 

Thanks in advance.

 

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 24, 2020 0
Adobe Community Professional ,
Sep 25, 2020

Copy link to clipboard

Copied

I still think you need to do something about rellinking your images after transferring the document to the server You may have a folder 'Links' there, but it's a different folder. Other than that I can't think of any advice.

 

P.

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 25, 2020 0