Copy link to clipboard
Copied
Hi All,
I am using the below code for import the PDF into Photoshop. It is working fine with 72 resolution and produce the correct output. But if we fix for 400 resolution, script produce the wrong output (image stretched vertically).
Please do the needful to get correct output and 400 resolution.
Thanks!
var inputFiles = File.openDialog("Choose the Input PDF File", "*.pdf", false);
var pdfOption = new PDFOpenOptions();
pdfOption.cropPage = CropToType.TRIMBOX;
pdfOption.antiAlias = true;
pdfOption.constrainProportions = true;
pdfOption.resolution = 400;
pdfOption.mode = OpenDocumentMode.RGB;
pdfOption.bitsPerChannel = BitsPerChannelType.EIGHT;
pdfOption.suppressWarnings = true;
app.open(inputFiles, pdfOption, false);
Copy link to clipboard
Copied
@Prabu I wrote:
Hi @c.pfaffenbichler , @Stephen Marsh , Is there any possible way to get PDF width and height using javascript before opening into the photoshop.
Thanks
I'm guessing, but perhaps using BridgeTalk? PDF uses points as the native unit of measure, which is what Adobe Bridge also shows under dimensions for a PDF file.
EDIT: Discussed in more detail in this Bridge forum topic:
Copy link to clipboard
Copied
Hi @Stephen Marsh , @c.pfaffenbichler , Is there any way to get the width and height values from PDF open dialog panel in photoshop?
Thanks
Copy link to clipboard
Copied
Because pdfs can contain pages of different dimensions I am not exactly optimistic.
But maybe someone else knows a reliable approach.
Copy link to clipboard
Copied
Hi, I want to change the resolution for if width is more than 32000px while importing the PDF. Is there any way to do this.
Thanks
Copy link to clipboard
Copied
Does it mean your task was viable with last given tips?