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

PDF import in photoshop

Explorer ,
May 09, 2022 May 09, 2022

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
5.4K
Translate
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

@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-...

Translate
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

Hi @Stephen Marsh , @c.pfaffenbichler , Is there any way to get the width and height values from PDF open dialog panel in photoshop?

 

Thanks

Translate
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

Because pdfs can contain pages of different dimensions I am not exactly optimistic. 

But maybe someone else knows a reliable approach. 

Translate
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
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

Translate
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

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

Translate
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