Skip to main content
Participating Frequently
August 5, 2019
Answered

make the pdf presentation with unsaved open document

  • August 5, 2019
  • 3 replies
  • 1422 views

Hi all,

how to make the pdf presentation with unsaved open document ? below code only work for saved document with file path

//

var inputFiles =[];  
for(var a =0;a< app.documents.length;a++){ 
  inputFiles
.push(app.documents[a].fullName); 
  
} 
var outputFile = File("~/Desktop/JavaScriptPresentation.pdf");  
var options = new PresentationOptions; 
options
.presentation = true;  
options
.view = true; 
options
.autoAdvance = true;  
options
.interval = 5;  
options
.loop = true;  
options
.transition = TransitionType.RANDOM; 
app
.makePDFPresentation(inputFiles, outputFile, options);  
alert
("Presentation file saved to: \n" + outputFile.fsName);

//

This topic has been closed for replies.
JJMack
Community Expert
Community Expert
August 6, 2019

It look like r-bin code works open documents un-saved and saved.  The only thing I found is the export to PDF presentation seems the resize images based on the current  resolution setting and will fail to do files the would resize too large.  It seems to resize open images like Place resizes  image files when rendering pixels for smart objects layers.

JJMack
JJMack
Community Expert
Community Expert
August 5, 2019

That code is using open document's backing files to create the inputFiles array.  New document that have not been saved do not have a baking file. I would also think if all open document have been saved if any have unsaved changes the PDF Presentation created would not contain the unsaved image changes. So you may be better off doing a saved before getting the backing files path you would need to do a Save As for Unsaved document you would need to have some default folder to save them into.

JJMack
Participating Frequently
August 6, 2019

if do like this way will take more time to save the pdf ? because need proceed heavy file like A1 A0 size, no other way just add the open document and save to pdf ?

JJMack
Community Expert
Community Expert
August 6, 2019

There is no way to add open document that have not been save to a PDF Presentation.  Photoshop Automate PDF Presentation  creates the PDF Presentation using source image files. Photoshop can  add any open document backing file to the PDF Presentation File list.  New Documents that have not been saved have no backing file on disk. One has not been written Photoshop edits documents not files.  So if you have new open documents that have not been saved you need to save them before you can create a PDF Presentation the the open document content..  Open Document that were open from a file or have been saved  do not need to be saved.  The File on disk can  be used. However the  Open Document may have un-saved changes in Photoshop.  Those changes will not be in  the PDF Presentation if you do not save them before creating the PDF presentation.

JJMack