Skip to main content
Known Participant
May 9, 2022
Question

PDF import in photoshop

  • May 9, 2022
  • 1 reply
  • 5852 views

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);

 

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
May 9, 2022

Please porvide a pdf for which the problem happens. 

Prabu IAuthor
Known Participant
May 10, 2022

Hi @c.pfaffenbichler  i have attached the sample pdf document and also attached manual output and script produced output screen shot.

Manual output:

 

Script produced output:

  

c.pfaffenbichler
Community Expert
Community Expert
May 10, 2022

I suspect you hit limits when trying to convert a pdf at 400ppi that’s more than 4m broad.