Create a new note annot and set the properties for it. Assuming the annnots in the page have been loaded. How to set the popup information when creating markup annotations #include "include/common/ fs_common.h " #include "include/pdf/actions/ fs_action.h " #include "include/pdf/ annots / fs_annot.h " #include "include/pdf/ fs_pdfdoc.h " #include "include/pdf/objects/ fs_pdfobject.h " #include "include/pdf/ fs_pdfpage.h " using namespace foxit using namespace foxit :: common using namespace pdf using namespace annots // Assuming PDFPage page has been loaded and parsed. annots :: Highlight highlight(page.AddAnnot(Annot::e_Highlight,RectF(10,450,100,550))) highlight.SetContent ( L"Highlight ") annots :: QuadPoints quad_points quad_ points.first = PointF (10, 500) quad_ cond = PointF (90, 500) quad_ points.third = PointF (10, 480) quad_ points.fourth = PointF (90, 480) annots :: QuadPointsArray quad_points_array quad_points_ array.Add ( quad_points ) highlight.SetQuadPoints ( quad_points_array ) highlight.SetSubject ( L"Highlight ") highlight.SetTitle ( L"Foxit SDK") highlight.SetCreationDateTime ( GetLocalDateTime ()) highlight.SetModifiedDateTime ( GetLocalDateTime ()) highlight.SetUniqueID ( WString :: FromLocal ( RandomUID ())) // Appearance should be reset. How to add a highlight annotation to a page and set the related annotation properties #include "include/common/ fs_common.h " #include "include/pdf/actions/ fs_action.h " #include "include/pdf/ annots / fs_annot.h " #include "include/pdf/ fs_pdfdoc.h " #include "include/pdf/objects/ fs_pdfobject.h " #include "include/pdf/ fs_pdfpage.h " using namespace foxit using namespace foxit :: common using namespace pdf using namespace annots // Assuming PDFPage page has been loaded and parsed. annots :: Link link( page.AddAnnot ( Annot :: e_Link, RectF (350,350,380,400))) link.SetHighlightingMode ( Annot :: e_HighlightingToggle ). Usually, PSI is for handwriting features and Foxit SDK treats it as a PSI annotation so that it can be handled by other PDF products.Įxample: How to add a link annotation to another page in the same PDF #include "include/common/ fs_common.h " #include "include/pdf/actions/ fs_action.h " #include "include/pdf/ annots / fs_annot.h " #include "include/pdf/ fs_pdfdoc.h " #include "include/pdf/objects/ fs_pdfobject.h " #include "include/pdf/ fs_pdfpage.h " using namespace foxit using namespace foxit :: common using namespace pdf using namespace annots // Assuming PDFPage page has been loaded and parsed. Foxit SDK supports a customized annotation type called PSI (pressure sensitive ink) annotation.This type of widget is only used in the module as a ‘form filler’ and the watermark in the module of ‘watermark’. They aren’t supported in the module of ‘Annotation’. The annotation widget and watermark are special.PDF SDK provides APIs of annotation creation, properties access and modification, appearance setting and drawing. The ‘ Markup ’ column in Table 3-1 shows whether an annotation is a markup annotation.įoxit PDF SDK supports most annotation types defined in PDF reference. These annotations have text that appears as part of the annotation and may be displayed in other ways by a conforming reader, such as in a Comments pane. Among these annotation types, many of them are defined as markup annotations for they are used primarily to mark up PDF documents. PDF includes a wide variety of standard annotation types as listed in Table 3-1. It provides a way to interact with users by means of the mouse and keyboard. An annotation associates an object such as note, line, and highlight with a location on a page of a PDF document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |