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

JPEG quick tool - AA Pro DC

Community Beginner ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

So basically I take PDF's and make them into images so that I can place them in documents. And I do this quite a few times a day.

Looking to find a way to create a quick tool that will do that with one press in Adobe Acrobat Pro DC. Any help would be great, as I tried to make one... but couldn't find my way after navigating all the sub menus.

[Moved from non-technical Forum Lounge to an Acrobat forum... Mod]

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

TOPICS
Edit and convert PDFs

Views

373

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

correct answers 1 Correct answer

Community Expert , Feb 09, 2017 Feb 09, 2017

OK, in order to be able to do it you need to create a js file (for example, SaveAsJpeg.js) and place it under Acrobat's JavaScripts folder.

In the file place this code:

app.addMenuItem({cName: "SaveAsJPEG", cUser: "Save As JPEG", cParent: "File", nPos: 5,

    cExec: "myTrustedSaveAsAndConvert(this, this.path.replace(/pdf$/i, \"jpg\"), \"com.adobe.acrobat.jpeg\");",

     cEnable: "event.rc = (event.target != null);"

});

safeSaveAsAndConvert = app.trustPropagatorFunction(function(doc,vPath,vConv){

    a

...

Votes

Translate

Translate
Community Expert ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

It's possible to do it using a script. I'll post the code in a moment...

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 ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

OK, in order to be able to do it you need to create a js file (for example, SaveAsJpeg.js) and place it under Acrobat's JavaScripts folder.

In the file place this code:

app.addMenuItem({cName: "SaveAsJPEG", cUser: "Save As JPEG", cParent: "File", nPos: 5,

    cExec: "myTrustedSaveAsAndConvert(this, this.path.replace(/pdf$/i, \"jpg\"), \"com.adobe.acrobat.jpeg\");",

     cEnable: "event.rc = (event.target != null);"

});

safeSaveAsAndConvert = app.trustPropagatorFunction(function(doc,vPath,vConv){

    app.beginPriv();

    doc.saveAs({cPath:vPath, cConvID: vConv});

    app.endPriv();

});

myTrustedSaveAsAndConvert = app.trustedFunction(function(doc,vPath,vConv){

    app.beginPriv();

    safeSaveAsAndConvert(doc,vPath,vConv);

    app.endPriv();

});

This will add a new menu item to the File menu of Acrobat, called "Save As JPEG", which will export all the pages in the currently open file as JPEG images in the same folder and using the same name (with a "_Page_X" suffix) as the original file. You can play around with the values of the nPos parameter if you want to move it up or down the menu items. You'll need to restart Acrobat after every change you make to it, though.

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 Beginner ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

Thank you so much... that was super awesome. One more question, tried finding the code to add a shift + ctrl (key modifier) to do it quickly. Cant seem to find it and place it.

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 ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

That's not possible, I'm afraid. Best you can is add a keyboard accelerator so you could access it using a specific key.

To do that change this part of the code:

cUser: "Save As JPEG"

To this:

cUser: "Save As &JPEG"

You'll then be able to execute it by pressing Alt+F, and then J.

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 Beginner ,
Feb 09, 2017 Feb 09, 2017

Copy link to clipboard

Copied

LATEST

That's even better. Thank you again for the code and short cut! You are awesome!

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