Loading...
Searching...
No Matches
PDFDoc.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software Inc. All Rights Reserved.
3// Consult legal.txt regarding legal and license information.
4//---------------------------------------------------------------------------------------
5#ifndef PDFTRON_H_CPPPDFPDFDoc
6#define PDFTRON_H_CPPPDFPDFDoc
7
8#include <Common/BasicTypes.h>
9#include <FDF/FDFDoc.h>
10#include <PDF/PDFDocInfo.h>
11#include <PDF/PageLabel.h>
12//#include <PDF/OCG/Config.h>
13#include <C/PDF/TRN_PDFDoc.h>
14#include <PDF/PDFDocViewPrefs.h>
15#include <SDF/SDFDoc.h>
16#include <PDF/Page.h>
17#include <PDF/PageSet.h>
18#include <PDF/DiffOptions.h>
19#include <PDF/TextDiffOptions.h>
20#include <PDF/Annot.h>
21#include <Common/Iterator.h>
22#include <SDF/SignatureHandler.h>
23#include <SDF/UndoManager.h>
24#include <PDF/DigitalSignatureField.h>
25#include <PDF/ViewerOptimizedOptions.h>
26#include <PDF/RefreshOptions.h>
27#include <PDF/MergeXFDFOptions.h>
28
29 namespace pdftron {
30 namespace PDF {
31 class Bookmark;
32 namespace OCG{
33 class Config;
34 }
35 namespace Struct{class STree;};
36
41 typedef Common::Iterator<Page> PageIterator;
42
47 typedef Common::Iterator<Field> FieldIterator;
48
53 typedef Common::Iterator<DigitalSignatureField> DigitalSignatureFieldIterator;
54
71 class PDFDoc
72{
73 public:
74
78 PDFDoc ();
79
89 PDFDoc (SDF::SDFDoc& sdfdoc);
90
98 PDFDoc(const PDFDoc& other);
99 PDFDoc& operator= (const PDFDoc&);
100
109 PDFDoc (const UString& filepath);
110 PDFDoc (const char* filepath);
111
126 PDFDoc (Filters::Filter stream);
127
137 PDFDoc (const UChar* buf, size_t buf_size);
138
142 ~PDFDoc ();
143
147 void Close();
148
152 bool IsEncrypted();
153
179 bool InitSecurityHandler (
180#ifndef SWIG
181 void* custom_data = 0
182#endif
183 );
184
217 bool InitStdSecurityHandler(const char* password, int password_sz);
218
245 bool InitStdSecurityHandler(const pdftron::UString& password);
246
273 bool InitStdSecurityHandler(const std::vector<UInt8>& password_buf);
274
289 SDF::SecurityHandler GetSecurityHandler ();
290
302 void SetSecurityHandler(const SDF::SecurityHandler & handler);
303
307 void RemoveSecurity();
308
309
310 /* {{codegen: PDFDoc}} */
311 /* {{codegen: PDFDoc}} */
312
317 bool HasSignatures();
318
326 SDF::SignatureHandlerId AddSignatureHandler(const SDF::SignatureHandler& signature_handler);
327
337 SDF::SignatureHandlerId AddStdSignatureHandler(const UString& pkcs12_keyfile, const UString& pkcs12_keypass);
338
348 SDF::SignatureHandlerId AddStdSignatureHandler(const std::vector<unsigned char>& pkcs12_keybuffer, const UString& pkcs12_keypass);
349
355 void RemoveSignatureHandler(const SDF::SignatureHandlerId signature_handler_id);
356
364 SDF::SignatureHandler* GetSignatureHandler(const SDF::SignatureHandlerId signature_handler_id);
365
369 SDF::UndoManager GetUndoManager();
370
378 PDF::DigitalSignatureField CreateDigitalSignatureField(const UString& in_sig_field_name = "");
379
385 PDF::DigitalSignatureFieldIterator GetDigitalSignatureFieldIterator();
386
393 PDF::DigitalSignatureField::DocumentPermissions GetDigitalSignaturePermissions() const;
394
399 PDFDocInfo GetDocInfo();
400
408 PDFDocViewPrefs GetViewPrefs();
409
410 enum ActionTriggerEvent
411 {
412 e_action_trigger_doc_will_close = 17, //Triggered before closing a document
413 e_action_trigger_doc_will_save = 18, //Triggered before saving a document
414 e_action_trigger_doc_did_save = 19, //Triggered after saving a document
415 e_action_trigger_doc_will_print = 20, //Triggered before printing a document
416 e_action_trigger_doc_did_print = 21 //Triggered after printing a document
417 };
418
425 SDF::Obj GetTriggerAction(PDFDoc::ActionTriggerEvent trigger);
426
433 bool IsModified () const;
434
446 bool HasRepairedXRef() const;
447
467 bool IsLinearized() const;
468
473 bool HasDownloader();
474
484 UInt64 GetDownloadedByteCount ();
485
495 UInt64 GetTotalRemoteByteCount ();
496
523 void Save(const UString& path, UInt32 flags);
524
525#ifndef SWIG
553 void Save(const UString& path, UInt32 flags, Common::ProgressMonitor* progress);
554#endif
555
556 std::vector<unsigned char> Save(UInt32 flags);
557
558#ifndef SWIG
578 void Save(const char* &out_buf, size_t& out_buf_size, UInt32 flags, Common::ProgressMonitor* progress);
579#endif
580
595 void Save(Filters::Filter& stream, UInt32 flags);
596
597#ifdef SWIG
606 void SaveCustomSignature(const std::vector<UChar>& in_signature, const DigitalSignatureField& in_field, const UString& in_path);
615 void SaveCustomSignature(const std::vector<UChar>& in_signature, const DigitalSignatureField& in_field, Filters::Filter& out_stream);
616#else
626 void SaveCustomSignature(const UChar* in_signature, const size_t in_signature_size, const DigitalSignatureField& in_field, const UString& in_path);
636 void SaveCustomSignature(const UChar* in_signature, const size_t in_signature_size, const DigitalSignatureField& in_field, Filters::Filter& out_stream);
637
650 void SaveCustomSignature(const UChar* in_signature, const size_t in_signature_size, const DigitalSignatureField& in_field, const UChar* &out_buf, size_t& out_buf_size);
651#endif
652
653
670 PageIterator GetPageIterator(UInt32 page_number=1);
671
685 Page GetPage(UInt32 page_number);
686
692 void PageRemove(const PageIterator& page_itr);
693
694 enum InsertFlag {
695 e_none, //default, do not insert bookmarks
696 e_insert_bookmark, //insert bookmarks (use this option when inserting many pages in a single call)
697 e_insert_goto_bookmark // same as e_insert_bookmark, but ignore GoToR and URI links, while still retaining bookmark hierarchy (use this option when inserting one page at a time)
698 };
699
710 void PageInsert(PageIterator& where, Page page);
711
724 void InsertPages(int insert_before_page_number
725 , PDFDoc& src_doc
726 , int start_page
727 , int end_page
728 , enum InsertFlag flag
729#ifndef SWIG
730 , Common::ProgressMonitor * monitor = 0
731#endif
732 );
733
745 void InsertPages(int insert_before_page_number
746 , PDFDoc& src_doc
747 , const PageSet& source_page_set
748 , enum InsertFlag flag
749#ifndef SWIG
750 , Common::ProgressMonitor * monitor = 0
751#endif
752 );
753
754
769 void MovePages(int move_before_page_number
770 , PDFDoc& src_doc
771 , int start_page
772 , int end_page
773 , enum InsertFlag flag
774#ifndef SWIG
775 , Common::ProgressMonitor * monitor = 0
776#endif
777 );
778
779
793 void MovePages(int move_before_page_number
794 , PDFDoc& src_doc
795 , const PageSet& source_page_set
796 , enum InsertFlag flag
797#ifndef SWIG
798 , Common::ProgressMonitor * monitor = 0
799#endif
800 );
801
807 void PagePushFront(Page page);
808
814 void PagePushBack(Page page);
815
832 std::vector<Page> ImportPages(const std::vector<Page>& pages, bool import_bookmarks = false);
833
899 Page PageCreate(const Rect& media_box = Rect(0, 0, 612, 792));
900
911 int AppendTextDiff(Page page1, Page page2);
912
922 int AppendTextDiff(PDFDoc& doc1, PDFDoc& doc2);
923
934 int AppendTextDiff(PDFDoc& doc1, PDFDoc& doc2, TextDiffOptions* options);
935
946 static int HighlightTextDiff(PDFDoc& doc1, PDFDoc& doc2, TextDiffOptions* options);
947
953 class Bookmark GetFirstBookmark();
954
961 void AddRootBookmark(class Bookmark root_bookmark);
962
966 SDF::Obj GetTrailer ();
967
972 SDF::Obj GetRoot();
973
977 SDF::Obj GetPages();
978
982 int GetPageCount ();
983
984
1008 FieldIterator GetFieldIterator();
1009
1025 FieldIterator GetFieldIterator(const UString& field_name);
1026
1043 Field GetField(const UString& field_name);
1044
1059 Field FieldCreate(const UString& field_name,
1060 Field::Type type,
1061 SDF::Obj field_value = 0,
1062 SDF::Obj def_field_value = 0);
1063
1078 Field FieldCreate(const UString& field_name,
1079 Field::Type type,
1080 const UString& field_value,
1081 const UString& def_field_value = "");
1082
1088 void RefreshFieldAppearances();
1089
1095 void RefreshAnnotAppearances(const RefreshOptions* options = 0);
1096
1102 void FlattenAnnotations(bool forms_only = false);
1103
1107 SDF::Obj GetAcroForm();
1108
1109 enum ExtractFlag {
1110 e_forms_only, // default, only extract form fields to FDF
1111 e_annots_only, // only extract annots
1112 e_both, // extract both form fields and annots
1113 e_annots_only_no_links = 5 // same as e_annots_only but no url links get converted
1114 };
1115
1121 FDF::FDFDoc FDFExtract(enum ExtractFlag flag = e_forms_only);
1122
1129 FDF::FDFDoc FDFExtract(PageSet& pages_to_extract, enum ExtractFlag flag = e_forms_only);
1130
1136 FDF::FDFDoc FDFExtract(const std::vector<Annot>& annotations);
1137
1145 FDF::FDFDoc FDFExtract(const std::vector<Annot>& annot_added, const std::vector<Annot>& annot_modified, const std::vector<Annot>& annot_deleted);
1146
1151 void FDFMerge(FDF::FDFDoc& fdf_doc);
1152
1165 void FDFUpdate(FDF::FDFDoc& fdf_doc);
1166
1175 Action GetOpenAction();
1176
1184 void SetOpenAction(const Action& action);
1185
1203 void AddFileAttachment(const UString& file_key, FileSpec embedded_file);
1204
1213 PageLabel GetPageLabel(int page_num);
1214
1225 void SetPageLabel(int page_num, PageLabel& label);
1226
1236 void RemovePageLabel(int page_num);
1237
1241 bool IsTagged();
1242
1246 Struct::STree GetStructTree();
1247
1254 bool HasOC() const;
1255
1262 SDF::Obj GetOCGs() const;
1263
1268 OCG::Config GetOCGConfig() const;
1269
1281 void AddHighlights(const UString& hilite);
1282
1290 SDF::Obj CreateIndirectName(const char* name);
1298 SDF::Obj CreateIndirectArray();
1307 SDF::Obj CreateIndirectBool(bool value);
1315 SDF::Obj CreateIndirectDict();
1323 SDF::Obj CreateIndirectNull();
1332 SDF::Obj CreateIndirectNumber(double value);
1342 SDF::Obj CreateIndirectString(const UChar* value, UInt32 size);
1351 SDF::Obj CreateIndirectString(const UString& str);
1361 SDF::Obj CreateIndirectStream(Filters::FilterReader& data, Filters::Filter filter_chain=Filters::Filter(0,false));
1372 SDF::Obj CreateIndirectStream(const char* data, const size_t data_size, Filters::Filter filter_chain = Filters::Filter (0,false));
1373
1377 SDF::SDFDoc& GetSDFDoc ();
1378
1383 operator SDF::SDFDoc& () { return GetSDFDoc(); }
1384
1385
1391 void Lock();
1392
1396 void Unlock();
1397
1403 bool TryLock( int milliseconds = 0 );
1404
1415 void LockRead();
1416
1420 void UnlockRead();
1421
1428 bool TryLockRead( int milliseconds = 0 );
1429
1435 UString GetFileName() const;
1436
1441 void GenerateThumbnails(UInt32 size);
1442
1449 void AppendVisualDiff(Page p1, Page p2, DiffOptions* opts);
1450
1462 void SaveViewerOptimized(const UString& path, const ViewerOptimizedOptions& opts);
1463
1464#ifndef SWIG
1479 void SaveViewerOptimized(const char* &out_buf, size_t& out_buf_size, const ViewerOptimizedOptions& opts);
1480#endif
1481 std::vector<unsigned char> SaveViewerOptimized(const ViewerOptimizedOptions& opts);
1482
1483 enum SignaturesVerificationStatus
1484 {
1485 e_unsigned,
1486 // e_failure == bad doc, digest, or MDP (i.e. does not include trust issues, because those are flaky due to being network/config-related)
1487 e_failure,
1488 e_untrusted,
1489 e_unsupported,
1490 // unsigned sigs skipped; parts of document may be unsigned (check GetByteRanges on signed sigs to find out)
1491 e_verified
1492 };
1493
1499 SignaturesVerificationStatus VerifySignedDigitalSignatures(const VerificationOptions& in_opts) const;
1500
1519 void MergeXFDF(Filters::Filter stream, const MergeXFDFOptions* opts = 0);
1538 void MergeXFDF(const UString& xfdf, const MergeXFDFOptions* opts = 0);
1539
1540 //for xamarin use only
1541 static PDFDoc* CreateInternal(ptrdiff_t impl);
1542 ptrdiff_t GetHandleInternal();
1543
1544// @cond PRIVATE_DOC
1545#ifndef SWIGHIDDEN
1546
1547 TRN_PDFDoc mp_doc;
1548 PDFDoc(TRN_PDFDoc impl) : mp_doc(impl) {}
1549#endif
1550// @endcond
1551
1552};
1553
1554 }; // namespace PDF
1555}; // namespace pdftron
1556
1557
1558#include <Impl/PDFDoc.inl>
1559
1560#endif // PDFTRON_H_CPPPDFPDFDoc
Annot.h
BasicTypes.h
DiffOptions.h
DigitalSignatureField.h
FDFDoc.h
Iterator.h
MergeXFDFOptions.h
PDFDocInfo.h
PDFDocViewPrefs.h
Page.h
PageLabel.h
PageSet.h
RefreshOptions.h
SDFDoc.h
SignatureHandler.h
TextDiffOptions.h
UndoManager.h
ViewerOptimizedOptions.h
pdftron::Common::Iterator
Definition Iterator.h:21
pdftron::FDF::FDFDoc
Definition FDFDoc.h:46
pdftron::Filters::Filter
Definition Filter.h:46
pdftron::Filters::FilterReader
Definition FilterReader.h:30
pdftron::PDF::Action
Definition Action.h:32
pdftron::PDF::Bookmark
Definition Bookmark.h:33
pdftron::PDF::DiffOptions
Definition DiffOptions.h:11
pdftron::PDF::DigitalSignatureField
Definition DigitalSignatureField.h:30
pdftron::PDF::DigitalSignatureField::DocumentPermissions
DocumentPermissions
Definition DigitalSignatureField.h:43
pdftron::PDF::Field
Definition Field.h:70
pdftron::PDF::Field::Type
Type
Definition Field.h:101
pdftron::PDF::FileSpec
Definition FileSpec.h:38
pdftron::PDF::MergeXFDFOptions
Definition MergeXFDFOptions.h:10
pdftron::PDF::OCG::Config
Definition Config.h:36
pdftron::PDF::PDFDoc::PDFDoc
PDFDoc(const UString &filepath)
pdftron::PDF::PDFDoc::GetPageCount
int GetPageCount()
pdftron::PDF::PDFDoc::PageCreate
Page PageCreate(const Rect &media_box=Rect(0, 0, 612, 792))
pdftron::PDF::PDFDoc::AppendVisualDiff
void AppendVisualDiff(Page p1, Page p2, DiffOptions *opts)
pdftron::PDF::PDFDoc::TryLock
bool TryLock(int milliseconds=0)
pdftron::PDF::PDFDoc::RemovePageLabel
void RemovePageLabel(int page_num)
pdftron::PDF::PDFDoc::GetPages
SDF::Obj GetPages()
pdftron::PDF::PDFDoc::FDFExtract
FDF::FDFDoc FDFExtract(const std::vector< Annot > &annotations)
pdftron::PDF::PDFDoc::HighlightTextDiff
static int HighlightTextDiff(PDFDoc &doc1, PDFDoc &doc2, TextDiffOptions *options)
pdftron::PDF::PDFDoc::ActionTriggerEvent
ActionTriggerEvent
Definition PDFDoc.h:411
pdftron::PDF::PDFDoc::e_action_trigger_doc_will_save
@ e_action_trigger_doc_will_save
Definition PDFDoc.h:413
pdftron::PDF::PDFDoc::e_action_trigger_doc_did_print
@ e_action_trigger_doc_did_print
Definition PDFDoc.h:416
pdftron::PDF::PDFDoc::e_action_trigger_doc_will_close
@ e_action_trigger_doc_will_close
Definition PDFDoc.h:412
pdftron::PDF::PDFDoc::e_action_trigger_doc_did_save
@ e_action_trigger_doc_did_save
Definition PDFDoc.h:414
pdftron::PDF::PDFDoc::e_action_trigger_doc_will_print
@ e_action_trigger_doc_will_print
Definition PDFDoc.h:415
pdftron::PDF::PDFDoc::SaveViewerOptimized
std::vector< unsigned char > SaveViewerOptimized(const ViewerOptimizedOptions &opts)
pdftron::PDF::PDFDoc::PagePushBack
void PagePushBack(Page page)
pdftron::PDF::PDFDoc::CreateDigitalSignatureField
PDF::DigitalSignatureField CreateDigitalSignatureField(const UString &in_sig_field_name="")
pdftron::PDF::PDFDoc::AppendTextDiff
int AppendTextDiff(Page page1, Page page2)
pdftron::PDF::PDFDoc::SaveCustomSignature
void SaveCustomSignature(const UChar *in_signature, const size_t in_signature_size, const DigitalSignatureField &in_field, Filters::Filter &out_stream)
pdftron::PDF::PDFDoc::GetTrailer
SDF::Obj GetTrailer()
pdftron::PDF::PDFDoc::GetFieldIterator
FieldIterator GetFieldIterator()
pdftron::PDF::PDFDoc::Save
void Save(const char *&out_buf, size_t &out_buf_size, UInt32 flags, Common::ProgressMonitor *progress)
pdftron::PDF::PDFDoc::FDFUpdate
void FDFUpdate(FDF::FDFDoc &fdf_doc)
pdftron::PDF::PDFDoc::IsLinearized
bool IsLinearized() const
pdftron::PDF::PDFDoc::GetDocInfo
PDFDocInfo GetDocInfo()
pdftron::PDF::PDFDoc::HasSignatures
bool HasSignatures()
pdftron::PDF::PDFDoc::GetPageLabel
PageLabel GetPageLabel(int page_num)
pdftron::PDF::PDFDoc::RefreshFieldAppearances
void RefreshFieldAppearances()
pdftron::PDF::PDFDoc::CreateIndirectStream
SDF::Obj CreateIndirectStream(Filters::FilterReader &data, Filters::Filter filter_chain=Filters::Filter(0, false))
pdftron::PDF::PDFDoc::PDFDoc
PDFDoc()
pdftron::PDF::PDFDoc::Close
void Close()
pdftron::PDF::PDFDoc::AddHighlights
void AddHighlights(const UString &hilite)
pdftron::PDF::PDFDoc::InsertPages
void InsertPages(int insert_before_page_number, PDFDoc &src_doc, const PageSet &source_page_set, enum InsertFlag flag, Common::ProgressMonitor *monitor=0)
pdftron::PDF::PDFDoc::Save
void Save(Filters::Filter &stream, UInt32 flags)
pdftron::PDF::PDFDoc::GetTriggerAction
SDF::Obj GetTriggerAction(PDFDoc::ActionTriggerEvent trigger)
pdftron::PDF::PDFDoc::GetHandleInternal
ptrdiff_t GetHandleInternal()
pdftron::PDF::PDFDoc::GetPage
Page GetPage(UInt32 page_number)
pdftron::PDF::PDFDoc::AddSignatureHandler
SDF::SignatureHandlerId AddSignatureHandler(const SDF::SignatureHandler &signature_handler)
pdftron::PDF::PDFDoc::GetPageIterator
PageIterator GetPageIterator(UInt32 page_number=1)
pdftron::PDF::PDFDoc::GetOCGConfig
OCG::Config GetOCGConfig() const
pdftron::PDF::PDFDoc::Lock
void Lock()
pdftron::PDF::PDFDoc::CreateIndirectDict
SDF::Obj CreateIndirectDict()
pdftron::PDF::PDFDoc::PDFDoc
PDFDoc(const UChar *buf, size_t buf_size)
pdftron::PDF::PDFDoc::GetDownloadedByteCount
UInt64 GetDownloadedByteCount()
pdftron::PDF::PDFDoc::PDFDoc
PDFDoc(const PDFDoc &other)
pdftron::PDF::PDFDoc::CreateIndirectString
SDF::Obj CreateIndirectString(const UChar *value, UInt32 size)
pdftron::PDF::PDFDoc::GetViewPrefs
PDFDocViewPrefs GetViewPrefs()
pdftron::PDF::PDFDoc::IsModified
bool IsModified() const
pdftron::PDF::PDFDoc::CreateIndirectName
SDF::Obj CreateIndirectName(const char *name)
pdftron::PDF::PDFDoc::SaveCustomSignature
void SaveCustomSignature(const UChar *in_signature, const size_t in_signature_size, const DigitalSignatureField &in_field, const UString &in_path)
pdftron::PDF::PDFDoc::MovePages
void MovePages(int move_before_page_number, PDFDoc &src_doc, const PageSet &source_page_set, enum InsertFlag flag, Common::ProgressMonitor *monitor=0)
pdftron::PDF::PDFDoc::TryLockRead
bool TryLockRead(int milliseconds=0)
pdftron::PDF::PDFDoc::HasDownloader
bool HasDownloader()
pdftron::PDF::PDFDoc::LockRead
void LockRead()
pdftron::PDF::PDFDoc::AddFileAttachment
void AddFileAttachment(const UString &file_key, FileSpec embedded_file)
pdftron::PDF::PDFDoc::AddStdSignatureHandler
SDF::SignatureHandlerId AddStdSignatureHandler(const UString &pkcs12_keyfile, const UString &pkcs12_keypass)
pdftron::PDF::PDFDoc::SetPageLabel
void SetPageLabel(int page_num, PageLabel &label)
pdftron::PDF::PDFDoc::CreateIndirectBool
SDF::Obj CreateIndirectBool(bool value)
pdftron::PDF::PDFDoc::ExtractFlag
ExtractFlag
Definition PDFDoc.h:1109
pdftron::PDF::PDFDoc::e_annots_only_no_links
@ e_annots_only_no_links
Definition PDFDoc.h:1113
pdftron::PDF::PDFDoc::e_both
@ e_both
Definition PDFDoc.h:1112
pdftron::PDF::PDFDoc::e_annots_only
@ e_annots_only
Definition PDFDoc.h:1111
pdftron::PDF::PDFDoc::e_forms_only
@ e_forms_only
Definition PDFDoc.h:1110
pdftron::PDF::PDFDoc::SetOpenAction
void SetOpenAction(const Action &action)
pdftron::PDF::PDFDoc::FieldCreate
Field FieldCreate(const UString &field_name, Field::Type type, const UString &field_value, const UString &def_field_value="")
pdftron::PDF::PDFDoc::CreateIndirectStream
SDF::Obj CreateIndirectStream(const char *data, const size_t data_size, Filters::Filter filter_chain=Filters::Filter(0, false))
pdftron::PDF::PDFDoc::PDFDoc
PDFDoc(const char *filepath)
pdftron::PDF::PDFDoc::VerifySignedDigitalSignatures
SignaturesVerificationStatus VerifySignedDigitalSignatures(const VerificationOptions &in_opts) const
pdftron::PDF::PDFDoc::RemoveSignatureHandler
void RemoveSignatureHandler(const SDF::SignatureHandlerId signature_handler_id)
pdftron::PDF::PDFDoc::GetStructTree
Struct::STree GetStructTree()
pdftron::PDF::PDFDoc::CreateIndirectArray
SDF::Obj CreateIndirectArray()
pdftron::PDF::PDFDoc::Save
std::vector< unsigned char > Save(UInt32 flags)
pdftron::PDF::PDFDoc::GetFileName
UString GetFileName() const
pdftron::PDF::PDFDoc::InitStdSecurityHandler
bool InitStdSecurityHandler(const pdftron::UString &password)
pdftron::PDF::PDFDoc::GetFieldIterator
FieldIterator GetFieldIterator(const UString &field_name)
pdftron::PDF::PDFDoc::Save
void Save(const UString &path, UInt32 flags, Common::ProgressMonitor *progress)
pdftron::PDF::PDFDoc::GetFirstBookmark
class Bookmark GetFirstBookmark()
pdftron::PDF::PDFDoc::InsertPages
void InsertPages(int insert_before_page_number, PDFDoc &src_doc, int start_page, int end_page, enum InsertFlag flag, Common::ProgressMonitor *monitor=0)
pdftron::PDF::PDFDoc::MergeXFDF
void MergeXFDF(Filters::Filter stream, const MergeXFDFOptions *opts=0)
pdftron::PDF::PDFDoc::IsEncrypted
bool IsEncrypted()
pdftron::PDF::PDFDoc::AppendTextDiff
int AppendTextDiff(PDFDoc &doc1, PDFDoc &doc2)
pdftron::PDF::PDFDoc::InitStdSecurityHandler
bool InitStdSecurityHandler(const std::vector< UInt8 > &password_buf)
pdftron::PDF::PDFDoc::HasOC
bool HasOC() const
pdftron::PDF::PDFDoc::SaveCustomSignature
void SaveCustomSignature(const UChar *in_signature, const size_t in_signature_size, const DigitalSignatureField &in_field, const UChar *&out_buf, size_t &out_buf_size)
pdftron::PDF::PDFDoc::GetDigitalSignatureFieldIterator
PDF::DigitalSignatureFieldIterator GetDigitalSignatureFieldIterator()
pdftron::PDF::PDFDoc::UnlockRead
void UnlockRead()
pdftron::PDF::PDFDoc::CreateIndirectString
SDF::Obj CreateIndirectString(const UString &str)
pdftron::PDF::PDFDoc::~PDFDoc
~PDFDoc()
pdftron::PDF::PDFDoc::GetSignatureHandler
SDF::SignatureHandler * GetSignatureHandler(const SDF::SignatureHandlerId signature_handler_id)
pdftron::PDF::PDFDoc::operator=
PDFDoc & operator=(const PDFDoc &)
pdftron::PDF::PDFDoc::CreateIndirectNull
SDF::Obj CreateIndirectNull()
pdftron::PDF::PDFDoc::Unlock
void Unlock()
pdftron::PDF::PDFDoc::GetOpenAction
Action GetOpenAction()
pdftron::PDF::PDFDoc::AddRootBookmark
void AddRootBookmark(class Bookmark root_bookmark)
pdftron::PDF::PDFDoc::FlattenAnnotations
void FlattenAnnotations(bool forms_only=false)
pdftron::PDF::PDFDoc::GetDigitalSignaturePermissions
PDF::DigitalSignatureField::DocumentPermissions GetDigitalSignaturePermissions() const
pdftron::PDF::PDFDoc::SaveViewerOptimized
void SaveViewerOptimized(const UString &path, const ViewerOptimizedOptions &opts)
pdftron::PDF::PDFDoc::ImportPages
std::vector< Page > ImportPages(const std::vector< Page > &pages, bool import_bookmarks=false)
pdftron::PDF::PDFDoc::GenerateThumbnails
void GenerateThumbnails(UInt32 size)
pdftron::PDF::PDFDoc::PageInsert
void PageInsert(PageIterator &where, Page page)
pdftron::PDF::PDFDoc::GetUndoManager
SDF::UndoManager GetUndoManager()
pdftron::PDF::PDFDoc::IsTagged
bool IsTagged()
pdftron::PDF::PDFDoc::FDFMerge
void FDFMerge(FDF::FDFDoc &fdf_doc)
pdftron::PDF::PDFDoc::InsertFlag
InsertFlag
Definition PDFDoc.h:694
pdftron::PDF::PDFDoc::e_insert_goto_bookmark
@ e_insert_goto_bookmark
Definition PDFDoc.h:697
pdftron::PDF::PDFDoc::e_insert_bookmark
@ e_insert_bookmark
Definition PDFDoc.h:696
pdftron::PDF::PDFDoc::e_none
@ e_none
Definition PDFDoc.h:695
pdftron::PDF::PDFDoc::CreateInternal
static PDFDoc * CreateInternal(ptrdiff_t impl)
pdftron::PDF::PDFDoc::SetSecurityHandler
void SetSecurityHandler(const SDF::SecurityHandler &handler)
pdftron::PDF::PDFDoc::GetField
Field GetField(const UString &field_name)
pdftron::PDF::PDFDoc::SaveViewerOptimized
void SaveViewerOptimized(const char *&out_buf, size_t &out_buf_size, const ViewerOptimizedOptions &opts)
pdftron::PDF::PDFDoc::SignaturesVerificationStatus
SignaturesVerificationStatus
Definition PDFDoc.h:1484
pdftron::PDF::PDFDoc::e_verified
@ e_verified
Definition PDFDoc.h:1491
pdftron::PDF::PDFDoc::e_untrusted
@ e_untrusted
Definition PDFDoc.h:1488
pdftron::PDF::PDFDoc::e_unsupported
@ e_unsupported
Definition PDFDoc.h:1489
pdftron::PDF::PDFDoc::e_unsigned
@ e_unsigned
Definition PDFDoc.h:1485
pdftron::PDF::PDFDoc::e_failure
@ e_failure
Definition PDFDoc.h:1487
pdftron::PDF::PDFDoc::FDFExtract
FDF::FDFDoc FDFExtract(const std::vector< Annot > &annot_added, const std::vector< Annot > &annot_modified, const std::vector< Annot > &annot_deleted)
pdftron::PDF::PDFDoc::PDFDoc
PDFDoc(Filters::Filter stream)
pdftron::PDF::PDFDoc::InitStdSecurityHandler
bool InitStdSecurityHandler(const char *password, int password_sz)
pdftron::PDF::PDFDoc::FDFExtract
FDF::FDFDoc FDFExtract(PageSet &pages_to_extract, enum ExtractFlag flag=e_forms_only)
pdftron::PDF::PDFDoc::AddStdSignatureHandler
SDF::SignatureHandlerId AddStdSignatureHandler(const std::vector< unsigned char > &pkcs12_keybuffer, const UString &pkcs12_keypass)
pdftron::PDF::PDFDoc::HasRepairedXRef
bool HasRepairedXRef() const
pdftron::PDF::PDFDoc::PagePushFront
void PagePushFront(Page page)
pdftron::PDF::PDFDoc::AppendTextDiff
int AppendTextDiff(PDFDoc &doc1, PDFDoc &doc2, TextDiffOptions *options)
pdftron::PDF::PDFDoc::GetSDFDoc
SDF::SDFDoc & GetSDFDoc()
pdftron::PDF::PDFDoc::Save
void Save(const UString &path, UInt32 flags)
pdftron::PDF::PDFDoc::FDFExtract
FDF::FDFDoc FDFExtract(enum ExtractFlag flag=e_forms_only)
pdftron::PDF::PDFDoc::InitSecurityHandler
bool InitSecurityHandler(void *custom_data=0)
pdftron::PDF::PDFDoc::GetOCGs
SDF::Obj GetOCGs() const
pdftron::PDF::PDFDoc::MergeXFDF
void MergeXFDF(const UString &xfdf, const MergeXFDFOptions *opts=0)
pdftron::PDF::PDFDoc::RemoveSecurity
void RemoveSecurity()
pdftron::PDF::PDFDoc::GetRoot
SDF::Obj GetRoot()
pdftron::PDF::PDFDoc::CreateIndirectNumber
SDF::Obj CreateIndirectNumber(double value)
pdftron::PDF::PDFDoc::PageRemove
void PageRemove(const PageIterator &page_itr)
pdftron::PDF::PDFDoc::PDFDoc
PDFDoc(SDF::SDFDoc &sdfdoc)
pdftron::PDF::PDFDoc::RefreshAnnotAppearances
void RefreshAnnotAppearances(const RefreshOptions *options=0)
pdftron::PDF::PDFDoc::MovePages
void MovePages(int move_before_page_number, PDFDoc &src_doc, int start_page, int end_page, enum InsertFlag flag, Common::ProgressMonitor *monitor=0)
pdftron::PDF::PDFDoc::GetSecurityHandler
SDF::SecurityHandler GetSecurityHandler()
pdftron::PDF::PDFDoc::GetAcroForm
SDF::Obj GetAcroForm()
pdftron::PDF::PDFDoc::GetTotalRemoteByteCount
UInt64 GetTotalRemoteByteCount()
pdftron::PDF::PDFDoc::FieldCreate
Field FieldCreate(const UString &field_name, Field::Type type, SDF::Obj field_value=0, SDF::Obj def_field_value=0)
pdftron::PDF::PDFDocInfo
Definition PDFDocInfo.h:19
pdftron::PDF::PDFDocViewPrefs
Definition PDFDocViewPrefs.h:26
pdftron::PDF::Page
Definition Page.h:32
pdftron::PDF::PageLabel
Definition PageLabel.h:88
pdftron::PDF::PageSet
Definition PageSet.h:21
pdftron::PDF::Rect
Definition Rect.h:29
pdftron::PDF::RefreshOptions
Definition RefreshOptions.h:9
pdftron::PDF::Struct::STree
Definition STree.h:22
pdftron::PDF::TextDiffOptions
Definition TextDiffOptions.h:11
pdftron::PDF::VerificationOptions
Definition VerificationOptions.h:22
pdftron::PDF::ViewerOptimizedOptions
Definition ViewerOptimizedOptions.h:19
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::SDF::SDFDoc
Definition SDFDoc.h:68
pdftron::SDF::SecurityHandler
Definition SecurityHandler.h:23
pdftron::SDF::SignatureHandler
Definition SignatureHandler.h:29
pdftron::SDF::UndoManager
Definition UndoManager.h:26
pdftron::UString
Definition UString.h:28
pdftron::PDF::OCG
Definition Config.h:17
pdftron::PDF::Struct
Definition PDFDoc.h:35
pdftron::PDF
Definition Action.h:15
pdftron::PDF::PageIterator
Common::Iterator< Page > PageIterator
Definition PDFDoc.h:41
pdftron::PDF::DigitalSignatureFieldIterator
Common::Iterator< DigitalSignatureField > DigitalSignatureFieldIterator
Definition PDFDoc.h:53
pdftron::PDF::FieldIterator
Common::Iterator< Field > FieldIterator
Definition PDFDoc.h:47
pdftron::SDF::SignatureHandlerId
size_t SignatureHandlerId
Definition SignatureHandler.h:21
pdftron
Definition BasicTypes.h:10
pdftron::UInt32
TRN_UInt32 UInt32
Definition BasicTypes.h:13
pdftron::UInt64
TRN_UInt64 UInt64
Definition BasicTypes.h:21
pdftron::UChar
TRN_UChar UChar
Definition BasicTypes.h:12