Skip to main content
Known Participant
November 15, 2024
해결됨

Is it possible to make a script that creates a PDF out of images in a folder?

  • November 15, 2024
  • 2 답변들
  • 739 조회

Hey, I have learned that Photoshop has a very annoying bug in its "File > Automate > PDF Presentation" tool.

By default, PDF presentation comes with "Advance Every 5 seconds" ON even though you're on the Multi-Page Document part and it's unclickable as it is. This means if you create a PDF without turning it off when you open the PDF in fullscreen mode it will advance every 5 seconds, which causes me problems.

So in order to turn it off you need to Change it to Presentation, uncheck the "Advance Every 5 seconds" and then change back to the Multi-Page Document, if you don't go back then the file will be a presentation and will give out an automatic message on Adobe Acrobat asking to go fullscreen, which also causes problems.

This choice doesn't stick, so every time I have to make a new PDF I always have to click on it again, it has been annoying to keep checking it every time. I was wondering if it's possible to create a script that automatizes the creation of PDFs avoiding this bug. 

A script that would ask for the user to select a folder and then it would take all the images inside the folder and turn them into a Multi-Page PDF without the advance every 5 seconds option. Then save the PDF in the same folder that was selected that contained the images. There are also some Compression presets on the PDF section, I usually use "Image Quality" as "Medium", would it be possible to control this through the script?


Is a script like this possible? If it is it would save me a bunch of time having to manually go through this whole process every time and it would also be a workaround to the "bug".



이 주제는 답변이 닫혔습니다.
최고의 답변: sttk3

ExtendScript has a dedicated command for PDF presentation. Here is the script.

2 답변

Stephen Marsh
Community Expert
Community Expert
November 16, 2024

I have a script here as well (input is a multi-layer file, you would first need to run the "load layers into stack" script):

 

https://community.adobe.com/t5/photoshop-ecosystem-ideas/new-feature-request-layers-to-pdf/idc-p/14901556

 

And one here or files rather than layers:

 

sttk3답변
Legend
November 16, 2024

ExtendScript has a dedicated command for PDF presentation. Here is the script.

Participant
December 8, 2024

Could be great unless... it tells me "Array is not a function" for some reason... (Windows, PS19). 

Could you please help?

Stephen Marsh
Community Expert
Community Expert
December 9, 2024

I tested without error in v2021 and 2024.

 

Double check that you are copy/pasting from the raw source code:

 

https://gist.githubusercontent.com/sttk3/2271490bf99bb0c33121ac026154465e/raw/584d5ee0d865a4085d09962cbcbb47b8eb36fea9/makePDFPresentation.jsx

 

I also have a script to combine multiple files into a multi-page PDF:

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/tiff-to-pdf-converter/td-p/12540527

 

It currently works for pairs of images, but that could be changed.