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

Why does scaling during preflight not work on all documents?

Explorer ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

Hi,

 

I have an action wizard which scales pages for numerous pdf documents to a specified size (see action wizard below). It is able to scale most of the documents. However, for some documents, it doesn't scale them at all.  I accidentally figured out that the documents that do not scale conjure up the following error when I try to "Edit PDF" from the Tools menu, which leads me to believe the problematic documents have security. Is there a work around for this? Is there something that can be done to the documents ahead of time to prep them for scaling? I need to be able to scale pages for over 50 plus documents so I cannot save a copy of each one separately and then scale. 

 

suemo22_4-1729043596169.png

 

Action Wizard:

suemo22_2-1729042354776.png

Here are the settings for the Preflight:

 

suemo22_1-1729042279972.png

 

Thx.

Sue

 

 

TOPICS
JavaScript , PDF

Views

606

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 ,
Oct 15, 2024 Oct 15, 2024

Copy link to clipboard

Copied

That error means the document was saved as a "Reader Extended PDF".  Do what the error message says and Save A Copy first.

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 ,
Oct 16, 2024 Oct 16, 2024

Copy link to clipboard

Copied

TY for explaining. Is there a javascript that can sort through all of the documents to see which ones were saved as "Reader Extended PDFs" and then only save a copy of those, without overwriting its respective existing documents, and use the newly saved copies for subsequent steps? If overwriting its respective existing documents is not possible, it's fine as long as it is only making copies of those documents which were saved as "Reader Extended PDFs". 

 

Sue

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 ,
Oct 16, 2024 Oct 16, 2024

Copy link to clipboard

Copied

You can create an Action with a script to "Save A Copy" and then save to a different folder.  It won't overwrite the existing file so you either have to change the file name, or save to a different folder.  The documents that were Reader Extended will be exact copies of the originals with the Reader Extended removed.  Those that weren't Reader Extended will simply be copies of the originals.  So you will end up with a new folder of all your documents and none will be Reader Extended.  You can then run your Action one the new folder.  Here's an example of the Action script to run on the folder of PDFs

 

 

//Here's an example of a path to the folder you will run the action on:
//"/C/Users/User/Desktop/Original Folder/Document1.pdf"
//Add another folder ("New Folder") for the output in the same directory as Original Folder (Desktop in this example)
//Use the following script in the action:

this.saveAs({cPath:this.path.replace("Original,"New"),bCopy:true});

//The script above is the only thing you need to do in the action.  Don't create another Save action.


 

 

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
New Here ,
Oct 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

Hi,

TY for example.  Is there a javascript that can sort through all of the documents to see which ones were saved as "Reader Extended PDFs"? Thx.

 

Sue

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 ,
Oct 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

Reader Extended does not allow cropping of pages.  This script, that you can run as an Action (Execute JavaScript) on the folder, will print the document file name of those that don't allow cropping, to the console.  Clear the console before running then open the console after to see the list:

 

try{var cb=this.getPageBox("Crop",0);
this.setPageBoxes("Crop",0,0,[cb[0]-1,cb[1]+1,cb[2]+1,cb[3]-1]);
}catch(e){console.println(this.documentFileName)}

 

Make sure you have this Save setting so you don't get prompted to save for the documents that the cropping succeeds:

PDFAutomationStation_0-1729179400739.png

 

 

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
New Here ,
Oct 19, 2024 Oct 19, 2024

Copy link to clipboard

Copied

Hi,

Where is the "Don't Save Changes" action in the "Choose tools to add:" column? I could not find it so I could add it to the action wizard. I am using Adobe Acrobat Pro.

Sue

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
New Here ,
Oct 21, 2024 Oct 21, 2024

Copy link to clipboard

Copied

Hi,

 

I tried the following code 

try{var cb=this.getPageBox("Crop",0);
this.setPageBoxes("Crop",0,0,[cb[0]-1,cb[1]+1,cb[2]+1,cb[3]-1]);
}catch(e){console.println(this.documentFileName)}

 

to identify documents (saved as "Reader Extended PDFs") which generate the following error when try to edit pdf:

s_6425_1-1729534792000.png

but it did not work for me. Do you have any other suggestions?

 

Sue

 

 

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 ,
Oct 21, 2024 Oct 21, 2024

Copy link to clipboard

Copied

Did you open the console after running the Action?  What did it say?

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
New Here ,
Oct 21, 2024 Oct 21, 2024

Copy link to clipboard

Copied

Hi,

 

Here are the details of action wizard (I copied javascript code you provided and added Don't save changes). 

 

 

s_6425_0-1729538753802.png

 

This is what is produced when I select "Full Report" I am assuming that's what you mean by console?

s_6425_1-1729538806980.png

 

 

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 ,
Oct 21, 2024 Oct 21, 2024

Copy link to clipboard

Copied

No.  Press Ctrl + j to open the console before you run the Action, and clear the console by clicking the recycle bin icon at the bottom.  Close the console.  Run the Action.  Press Ctrl + j again and there should be a list of files that the script would not work on, which you can assume are Reader Extended.

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
New Here ,
Oct 22, 2024 Oct 22, 2024

Copy link to clipboard

Copied

Hello,

 

TY for the instructions. My console correctly identified the Reader Extended files. Is there a way these files can be displayed at the end of the Action Wizard instead of in this console? That would be optimal, as the users can then easily figure out which ones are reader extended and should be saved differently in order to be labeled with the labeling action wizard (purpose of my action wizard is to label documents...Add Exhibit #, page #, etc. to bottom right).

 

s_6425_0-1729621586309.png

Sue

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 ,
Oct 22, 2024 Oct 22, 2024

Copy link to clipboard

Copied

Everything you do in an action gets done to every file.  This is the easiest way to make a list that you can copy and paste.  If you need them saved differently, why not use the technique in my other answer.  You can have the console open automatically be adding the following line to the end of the Action:

console.show();

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
New Here ,
Oct 22, 2024 Oct 22, 2024

Copy link to clipboard

Copied

LATEST

Perfect.  The console now comes up automatically. Thank you.

 

Sue

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 ,
Oct 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

See edited post above.

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
New Here ,
Oct 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

Oh, this is very useful. Thank you.  This way the user can be alerted that the Acrobat Reader documents just won't be able to be scaled and to deal with them separately and the other documents can be processed accordingly.

I will try this out.

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 ,
Oct 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

Honestly, I think my first script is better as it saves the copies to a separate folder with Reader Extended removed.  They can then be dragged back into the original folder and replaced so they can be scaled, but I don't know the details of your process or your restrictions.

Reader Extended is pretty much useless these days.  It's a holdover from when form field data could not be saved with free Reader.  This extended the rights so that form field data could be saved using Reader, and some other things could be done.  It also took some features away, as you can see.  Anybody with a free updated Reader has been able to save form field data for a decade or more (I'm guessing) without extended Reader rights.  Also, Adobe has specific licensing restrictions on how many forms can be Reader extended and how they are distributed.

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
New Here ,
Oct 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

Thx for the insights. I don't control how these are saved. Hence, I am trying to account for documents which are saved as Reader Extended. Thank you for your help. I will try these methods and if I have any questions, I will post.

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 ,
Oct 17, 2024 Oct 17, 2024

Copy link to clipboard

Copied

My second Action should give you a list then.  I suggest communicating the info on Reader Extended to the party doing the saving.

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
New Here ,
Oct 19, 2024 Oct 19, 2024

Copy link to clipboard

Copied

When I run 

this.saveAs({cPath:this.path.replace("Original,"New"),bCopy:true});

it prompts me to save after each file. How do I avoid this?

Sue

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
New Here ,
Oct 19, 2024 Oct 19, 2024

Copy link to clipboard

Copied

NVM about my post above, it doesn't prompt me to save. However, when I run the following script:

 

this.saveAs({cPath:this.path.replace("Original","New"),bCopy:true});

 

it doesn't save my files to the New folder or anywhere. I am not sure why it is not working.

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 ,
Oct 19, 2024 Oct 19, 2024

Copy link to clipboard

Copied

Are the files in a folder called "Original Folder"?  Is there another folder in the same directory called "New Folder"?  Are there any errors in the console?

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
New Here ,
Oct 20, 2024 Oct 20, 2024

Copy link to clipboard

Copied

I wrongfully had the "New" folder in the "Original" folder.  I see this was the wrong setup. I now created the "Original" and "New" folders in the same directory and it worked. Can you tell me where is the "Don't Save Changes" action in the "Choose tools to add:" column? I could not find it so I could add it to the action wizard. I am using Adobe Acrobat Pro.

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
New Here ,
Oct 20, 2024 Oct 20, 2024

Copy link to clipboard

Copied

The reason I need to know where the "Don't Save Changes" action is is b/c when I run the new copies of the documents through the rest of the action wizard steps, I get a message asking me if I want to save. I want to avoid this. Thx.

 

Sue

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 ,
Oct 20, 2024 Oct 20, 2024

Copy link to clipboard

Copied

PDFAutomationStation_0-1729446791494.png

 

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