I'm trying to override the default page targeting in the PdfPage.AddDocumentLink, where it doesn't change the page display to the top of the page. I found the following on a really old post:

["null null" tells Adobe Reader not to change the display of the current page. You can try "null 0" or "null 841" (for DIN A 4) instead of "null null". Or replace "/XYZ null null 0" with "/FitB" to have Reader display the complete page.]

My question would be if I want to modify the targeting within my application's code (not by modifying the line in the PdfLinkAnnotation.cs file), is that possible?

Well, it is supposed to be the only link annotation in the document. So I'll hope that I don't have duplicates.

I saw the WorkOnPdfObjects example and while instructive, I didn't see a way to assign that dictionary to the correct page. Hence case A started with the LinkAnnotation, which can be assigned directly to the page object. Is there a way to add a dictionary object directly to a page (or perhaps I am misunderstanding the structure)?

Case A also lists all of the items required by the Adobe spec (section 12.3.2.2). Or so I think based on my reading. I'll re-read that section to make sure I am not missing something.

I have two files (zipped into one) modified here that may allow for the custom targeting.

The PdfLinkAnnotation.cs file is complete, and has the custom targeting.

The PdfPage.cs file is a very small partial, and is meant to have the custom targeting AddDocumentLink extended function added to the original PdfPage.cs file (I didn't feel the need to duplicate the entire file).

Could these get added to the source code, and included in the next NuGet Package release?

Who is online

Users browsing this forum: No registered users and 5 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum