• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

PDF import in photoshop

Explorer ,
May 09, 2022 May 09, 2022

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

 

TOPICS
Actions and scripting , macOS

Views

4.2K

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 Expert ,
May 10, 2022 May 10, 2022

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:

 

https://community.adobe.com/t5/bridge-discussions/dimensions-of-documents-in-bridge-metadata-window-...

Votes

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 ,
May 11, 2022 May 11, 2022

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

Votes

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 Expert ,
May 11, 2022 May 11, 2022

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. 

Votes

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 ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

LATEST

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

Votes

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
LEGEND ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Does it mean your task was viable with last given tips?

Votes

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