![]() ![]() ![]() Popup popup( page.AddAnnot ( Annot :: e_Popup, RectF (300,450,500,550))) popup.SetBorderColor (0x00FF00) popup.SetOpenStatus (false) popup.SetModifiedDateTime ( GetLocalDateTime ()) note.SetPopup (popup). annots :: Note note( page.AddAnnot ( Annot :: e_Note, RectF (10,350,50,400))) note.SetIconName ("Comment") note.SetSubject ( L"Note ") note.SetTitle ( L"Foxit SDK") note.SetContent ( L"Note annotation.") note.SetCreationDateTime ( GetLocalDateTime ()) note.SetModifiedDateTime ( GetLocalDateTime ()) note.SetUniqueID ( WString :: FromLocal ( RandomUID ())) // Create a new popup annot and set it to the new note annot. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |