LEADTOOLS Support
Document
Document SDK FAQ
How do I load Annotations with your SDK?
#1
Posted
:
Friday, April 7, 2017 9:06:13 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 39
Thanks: 2 times
Was thanked: 3 time(s) in 3 post(s)
With LEADTOOLS, loading annotations is done through the AnnCodecs Class
This class supports loading and saving annotation objects from/to XML strings as well as getting information about previously saved annotations data.
This class also supports saving and loading multi-page annotation data where each page contains a full Annotation Container.
Use the
AnnCodecs.LoadAll or
LoadAllFromString methods to load all the annotation containers from a multi-page XML file or data.
https://www.leadtools.com/help/sdk/dh/ac/anncodecs--members.htmlLoading annotations is as simple as the following:
Code:AnnContainer container = new AnnContainer();
AnnCodecs codecs = new AnnCodecs();
container = codecs.Load("PATH TO XML file", 1);
LEADTOOLS also has support for embedded annotations in formats like TIFF and PDF.
For TIFF it should be sufficient to pass the TIFF into the AnnCodecs.Load() call.
For PDF, when parsing you should set the PDFParsePagesOptions to All or Annotations. Doing so will populate the PdfDocumentPage.Annotations collection if any PDF Annotations are found.
https://www.leadtools.com/help/sdk/dh/pdf/pdfparsepagesoptions.htmlCode:// Parse everything and for all pages
PDFParsePagesOptions options = PDFParsePagesOptions.All;
document.ParsePages(options, 1, -1);
Edited by moderator Wednesday, December 27, 2023 3:41:33 PM(UTC)
| Reason: Updated
Roberto Rodriguez
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
Document
Document SDK FAQ
How do I load Annotations with your SDK?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.