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.
Action Wizard:
Here are the settings for the Preflight:
Thx.
Sue
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.
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
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.
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
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:
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
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:
but it did not work for me. Do you have any other suggestions?
Sue
Copy link to clipboard
Copied
Did you open the console after running the Action? What did it say?
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).
This is what is produced when I select "Full Report" I am assuming that's what you mean by console?
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.
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).
Sue
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();
Copy link to clipboard
Copied
Perfect. The console now comes up automatically. Thank you.
Sue
Copy link to clipboard
Copied
See edited post above.
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.
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.
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.
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.
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
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.
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?
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.
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
Copy link to clipboard
Copied