Copy link to clipboard
Copied
Hi,
I'm trying to do something very specific that seems to have been asked many times, but much information appears to be out of date in today's world of security precautions.
I am trying to create a button on the last page of a PDF document that will allow a user, using Adobe Reader, to save the last page of the document to a separate PDF file preferably under the same folder as the current PDF that it was "extracted" from.
In running the this.extractPages() function, I do not believe that a user has the ability to actually execute this function without going through some major configuration hoops to their Adobe Reader.
It would be ideal to have the single page PDF open in a new tab and bring up the dialogue box for the Adobe Reader user to save to a location where they want it to be, and that may sound like it’s a bit more "security-minded" in that the script therefore is not saving the document itself.
Using:
this.extractPages({nStart:5, nEnd:5, CPath:'profile.pdf'});
this.extractPages(5, 5, 'profile.pdf'});
Seems to be a method that is no longer allowed by a normal user and it seems to be more complex of how to achieve the desired outcome that I want for the users.
Any thoughts?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
[bug in forum duplicated my reply]
Copy link to clipboard
Copied
Reader can't extract pages. Really, it can't. This is by design, like most of the limitations of Reader, because what Adobe really want to do is sell licenses to Acrobat.
So, Reader cannot do this at all. As a programmer you still can't do it. A button can't be added to make Reader do what it is designed not to do. (The documentation of extractPages tells you this, via the "quick bar"; always check it!)
Second issue. You have NEVER been able to embed JavaScript in a PDF that saves a file. This is not a new security limitation, but a vital one which has always been there - at least 20 years anyway. Imagine if a file you downloaded from the internet could start reading and writing files on your system!!