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?
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.
...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?
Copy link to clipboard
Copied
Photoshop changes proportions, enlarges width or height. I use Photoshop because it allows me to print without margins.
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?
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.
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.
Copy link to clipboard
Copied
Hi
In Acrobat, what do you have in the Print dialog for Page Size and Handling?
~ Jane
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.
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.
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
};
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
File(activeDocument.path).execute()