Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Open specific folder containing pdf files

Community Beginner ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

I have a folder containing only pdf files. All of them are 2437 single-page pdf documents. I use Photoshop java script to open and print these files. The script opens my specific folder's Open dialog and I can select one of pdf.

But sometimes when opening, Photoshop changes size of pdf image !

So I need a script to open specific directory and open/select only documents with "*.pdf" extensions and To keep the size of pdf unchanged, with original size.

 

Can anyone help me?

 

P.S.: Now I use this script:

 

 var dir = Folder('F:/Personal');
var files = dir.openDlg('This is always the same folder?','',true);
if( files !=null ){
for(var f = 0;f< files.length;f++){
// really should check that the file object is an image file
// that Photoshop can open
open(files[f]);
}
}

How to change this script or to write new one?

TOPICS
Actions and scripting

Views

1.4K

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
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Feb 06, 2020 Feb 06, 2020
A script can filter by file type. however if you will be using a system File Open dialog there are differences between Platforms though so the file open dialog code must be coded to handle Mac and Windows systems.  I also do not process PDF files with Photoshop Scripts for there seems to be different formats of PDF files some are opened directly by photoshop's File>Open  where on other PDF files  File>Open opens a  Import PDF dialog where you can import Pages and Images into Photoshop Documents....

Likes

Translate

Translate
LEGEND ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

How do you check the size of the PDF, to compare against the printed image?

Why do you rasterise your PDFs instead of printing with Acrobat?

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
community guidelines
Community Beginner ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

Photoshop changes proportions, enlarges width or height. I use Photoshop because it allows me to print without margins.

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
community guidelines
Adobe Community Professional ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

HEllo, on which PDFs does it do that, when, in Ps, or just at printing?

Does it change the proportions to fit to page?

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
community guidelines
Community Beginner ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

PS does on all pdfs when opening. Yes it changes proportion to fit to the page of document opened eariler, from other folder, with different size.

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
community guidelines
Community Beginner ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

All I want is the opening only pdf file in specific directory, keeping its size equal to mediabox, and with resolution 300 dpi.

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
community guidelines
Adobe Community Professional ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

Hi

In Acrobat, what do you have in the Print dialog for Page Size and Handling?

~ Jane

2.png

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
community guidelines
Community Beginner ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

Acrobat does not change actual size. And I don't use it to print. I use PS to print exactly without margins, on the edge of the paper.

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
community guidelines
Adobe Community Professional ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

A script can filter by file type. however if you will be using a system File Open dialog there are differences between Platforms though so the file open dialog code must be coded to handle Mac and Windows systems.  I also do not process PDF files with Photoshop Scripts for there seems to be different formats of PDF files some are opened directly by photoshop's File>Open  where on other PDF files  File>Open opens a  Import PDF dialog where you can import Pages and Images into Photoshop Documents.

image.png

 

Paul Riggott has some PDF Processor scripts on the web you may want to look at PDF Processor script 

 

The File.openDialog can filters for particular image file type  however how it is done varies between Windows and Mac operating systems.  Here is a  files selection function  I use to process image file types other than PDF,

 

 

function selectFile (multi) {   
	if (multi == true) {var theString = "please select files"}   
	else {var theString = "please select one file"};   
	if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog (theString, '*.nef;*.cr2;*.crw;*.dcs;*.raf;*.arw;*.orf;*.dng;*.psd;*.tif;*.tiff;*.jpg;*.jpe;*.jpeg;*.png;*.bmp', multi)}   
	else {var theFiles = File.openDialog (theString, getFiles, multi)};   
	////// filter files  for mac //////   
	function getFiles (theFile) {   
		if (theFile.name.match(/\.(nef|cr2|crw|dcs|raf|arw|orf|dng|psd|tif|tiff|jpg|jpe|jpeg|png|bmp)$/i) || theFile.constructor.name == "Folder") {  
			return true   
			};   
	};   
	return theFiles   
};			

 

 

JJMack

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
community guidelines
Community Beginner ,
Feb 06, 2020 Feb 06, 2020

Copy link to clipboard

Copied

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
community guidelines
Explorer ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

How to open  image source  Reveal in Explorer Windows 10 Windows 7 and folder Actions and .jsx Script

Reveal in Explorer.jpg

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
community guidelines
Adobe Community Professional ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

File(activeDocument.path).execute()

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
community guidelines
Explorer ,
Aug 07, 2021 Aug 07, 2021

Copy link to clipboard

Copied

Thank you so much sir

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
community guidelines
Explorer ,
Aug 07, 2021 Aug 07, 2021

Copy link to clipboard

Copied

LATEST

time wasted for me and helped me a lot  thank you very much for that

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
community guidelines