Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

PDF Document Level Script

by Arik123 (Beadle)
on Dec 19, 2017 at 10:33 UTC ( #1205849=perlquestion: print w/replies, xml ) Need Help??

Arik123 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Monks!

I want to modify a PDF, preferrebly with CAM::PDF. Specifically, I need to alter the Document Level Script (simply to edit that script). I couldn't find any reference in CAM::PDF documentation on how to do that. Any idea?

Thanks!

Replies are listed 'Best First'.
Re: PDF Document Level Script
by marto (Cardinal) on Dec 19, 2017 at 11:01 UTC

    By 'document level script' you mean the JavaScript content PDFs can have? I know that PDF::Reuse can work with this to some degree, I've no idea if CAM::PDF provides this. See also PDF::Reuse::Tutorial.

    Update: missing word.

      Thanks.... PDF::Reuse works to some degree, but it can handle only functions in the documents level script. I want some of the code there to be executed once the document is opened, and PDF::Reuse doesn't provide that capability. My template PDF did have such code, but PDF::Reuse simply deletes it (it doesn't recognize any JS code that isn't a function).

      So I'm still looking for a better solution. Any ideas? Maybe I can somehow locate that stream object, using CAM::PDF, and manually edit its content?

        As far as better solutions go, I've no further ideas I'm afraid, in order to provide any I'd have to do the same research as you. Feel free to report back with your findings.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1205849]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2023-02-06 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (33 votes). Check out past polls.

    Notices?