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

Hi All,

I want to add XMP metadata and set Initial view in the existing pdf. For that i have tried PDF::API2 and other such modules, but i am helpless.

In existing PDF, i have Bookmarks, Tags, hyperlinks, internal links, Annotation popups, Text insertion icons, everything. When i try to add XMP metadata in my pdf, everything got disappeared from my output pdf.

Is there any module or option to achieve my requirement by retaining all the existing features in my input pdf?

regards,

Srikrishnan

Replies are listed 'Best First'.
Re: Adding XMP metadata in a pdf
by marto (Cardinal) on Feb 21, 2025 at 15:36 UTC

    You don't show what you've tried or how it failed...

Re: Adding XMP metadata in a pdf
by Marshall (Canon) on Mar 04, 2025 at 02:38 UTC
    https://metacpan.org/pod/PDF::API2 shows how to open an existing pdf file and further down the page many metadata methods are documented.

    I have no idea what "set Initial view in the existing pdf" means?

    please show some actual code even if it doesn't work.

Re: Adding XMP metadata in a pdf
by cavac (Prior) on Feb 24, 2025 at 16:07 UTC