logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Post a reply
From:
Message:

Maximum number of characters in each post is: 32767
Bold Italic Underline   Highlight Quote Choose Language for Syntax Highlighting Insert Image Insert an existing Attachment or upload a new File... Create Link   Unordered List Ordered List   Left Justify Center Justify Right Justify   Outdent Indent   More BBCode Tags
Font Color Font Size
Security Image:
Enter The Letters From The Security Image:
  Preview Post Cancel

Last 10 Posts (In reverse order)
bav Posted: Wednesday, March 15, 2023 3:35:52 PM(UTC)
 
Nice job! This seems to work as expected. Much simpler. Thank you.
Paul Rayman Posted: Wednesday, March 15, 2023 1:50:39 AM(UTC)
 
Hello,

Please update to the latest version.
The page label functionality is now implemented in a few easy-to-understand classes.
Here are the details: https://pdfium.patagames...orkingSDK_PageLabels.htm
bav Posted: Tuesday, February 14, 2023 9:02:23 AM(UTC)
 
One of my requirements is to be able to set page labels as pages get added to my output document. Is this possible with Patagames pdfium SDK?

If the page label entry already exists (document.Root.GetBy("PageLabels") then I can see it in the dictionary, but I cannot figure out how to parse them properly.

var dictionary = Document.Root;
var pageLabelTreeIndirect = (PdfTypeIndirect)dictionary.GetBy(pageLabelsKey);
var pageLabelTree = (PdfTypeDictionary) pageLabelTreeIndirect.Direct;


The pageLabelTree object is a dictionary that only supports strings as keys. The only key I see in the dictionary is "Nums". I did try adding an entry into the dictionary, but it doesn't seem to do anything.

var thisPagesLabelDictionary = PdfTypeDictionary.Create();
thisPagesLabelDictionary["P"] = PdfTypeString.Create("TEST PAGE");
pageLabelTree.Add("0", thisPagesLabelDictionary);


Has anyone gotten this to work? It's very straight forward with iText, but they obviously mask the complexity.