5 #ifndef PDFTRON_H_CPPPDFPDFDoc
6 #define PDFTRON_H_CPPPDFPDFDoc
13 #include <C/PDF/TRN_PDFDoc.h>
34 namespace Struct{
class STree;};
109 PDFDoc (
const char* filepath);
180 void* custom_data = 0
555 std::vector<unsigned char>
Save(
UInt32 flags);
577 void Save(
const char* &out_buf,
size_t& out_buf_size,
UInt32 flags, Common::ProgressMonitor* progress);
729 , Common::ProgressMonitor * monitor = 0
746 ,
const PageSet& source_page_set
749 , Common::ProgressMonitor * monitor = 0
768 void MovePages(
int move_before_page_number
774 , Common::ProgressMonitor * monitor = 0
792 void MovePages(
int move_before_page_number
794 ,
const PageSet& source_page_set
797 , Common::ProgressMonitor * monitor = 0
831 std::vector<Page>
ImportPages(
const std::vector<Page>& pages,
bool import_bookmarks =
false);
1080 const UString& def_field_value =
"");
1144 FDF::FDFDoc FDFExtract(
const std::vector<Annot>& annot_added,
const std::vector<Annot>& annot_modified,
const std::vector<Annot>& annot_deleted);
1402 bool TryLock(
int milliseconds = 0 );
1544 PDFDoc(TRN_PDFDoc impl) : mp_doc(impl) {}
1554 #include <Impl/PDFDoc.inl>
1556 #endif // PDFTRON_H_CPPPDFPDFDoc
void PageInsert(PageIterator &where, Page page)
void FDFMerge(FDF::FDFDoc &fdf_doc)
PDF::DigitalSignatureFieldIterator GetDigitalSignatureFieldIterator()
SDF::SignatureHandler * GetSignatureHandler(const SDF::SignatureHandlerId signature_handler_id)
Page PageCreate(const Rect &media_box=Rect(0, 0, 612, 792))
void MergeXFDF(Filters::Filter stream, const MergeXFDFOptions *opts=0)
void RemoveSignatureHandler(const SDF::SignatureHandlerId signature_handler_id)
OCG::Config GetOCGConfig() const
SignaturesVerificationStatus VerifySignedDigitalSignatures(const VerificationOptions &in_opts) const
PageLabel GetPageLabel(int page_num)
size_t SignatureHandlerId
SDF::Obj CreateIndirectBool(bool value)
ptrdiff_t GetHandleInternal()
SDF::Obj CreateIndirectNumber(double value)
void SetOpenAction(const Action &action)
void SetSecurityHandler(const SDF::SecurityHandler &handler)
Struct::STree GetStructTree()
bool TryLock(int milliseconds=0)
void InsertPages(int insert_before_page_number, PDFDoc &src_doc, int start_page, int end_page, enum InsertFlag flag, Common::ProgressMonitor *monitor=0)
SDF::Obj CreateIndirectName(const char *name)
void PagePushFront(Page page)
void PagePushBack(Page page)
SDF::UndoManager GetUndoManager()
UString GetFileName() const
bool HasRepairedXRef() const
void SetPageLabel(int page_num, PageLabel &label)
void AddFileAttachment(const UString &file_key, FileSpec embedded_file)
PDFDocViewPrefs GetViewPrefs()
void AddRootBookmark(class Bookmark root_bookmark)
PDF::DigitalSignatureField CreateDigitalSignatureField(const UString &in_sig_field_name="")
Page GetPage(UInt32 page_number)
SDF::SignatureHandlerId AddStdSignatureHandler(const UString &pkcs12_keyfile, const UString &pkcs12_keypass)
Common::Iterator< DigitalSignatureField > DigitalSignatureFieldIterator
SDF::Obj GetTriggerAction(PDFDoc::ActionTriggerEvent trigger)
bool IsLinearized() const
Common::Iterator< Field > FieldIterator
void SaveCustomSignature(const UChar *in_signature, const size_t in_signature_size, const DigitalSignatureField &in_field, const UString &in_path)
void PageRemove(const PageIterator &page_itr)
static int HighlightTextDiff(PDFDoc &doc1, PDFDoc &doc2, TextDiffOptions *options)
PDF::DigitalSignatureField::DocumentPermissions GetDigitalSignaturePermissions() const
std::vector< Page > ImportPages(const std::vector< Page > &pages, bool import_bookmarks=false)
bool InitStdSecurityHandler(const char *password, int password_sz)
Field FieldCreate(const UString &field_name, Field::Type type, SDF::Obj field_value=0, SDF::Obj def_field_value=0)
void RefreshAnnotAppearances(const RefreshOptions *options=0)
FieldIterator GetFieldIterator()
void SaveViewerOptimized(const UString &path, const ViewerOptimizedOptions &opts)
bool TryLockRead(int milliseconds=0)
SDF::Obj CreateIndirectStream(Filters::FilterReader &data, Filters::Filter filter_chain=Filters::Filter(0, false))
void FlattenAnnotations(bool forms_only=false)
void AppendVisualDiff(Page p1, Page p2, DiffOptions *opts)
Field GetField(const UString &field_name)
SDF::SignatureHandlerId AddSignatureHandler(const SDF::SignatureHandler &signature_handler)
SDF::Obj CreateIndirectNull()
bool InitSecurityHandler(void *custom_data=0)
void RefreshFieldAppearances()
void Save(const UString &path, UInt32 flags)
SDF::Obj CreateIndirectString(const UChar *value, UInt32 size)
SDF::Obj CreateIndirectArray()
int AppendTextDiff(Page page1, Page page2)
void AddHighlights(const UString &hilite)
void MovePages(int move_before_page_number, PDFDoc &src_doc, int start_page, int end_page, enum InsertFlag flag, Common::ProgressMonitor *monitor=0)
static PDFDoc * CreateInternal(ptrdiff_t impl)
PageIterator GetPageIterator(UInt32 page_number=1)
void GenerateThumbnails(UInt32 size)
SDF::SDFDoc & GetSDFDoc()
SDF::Obj CreateIndirectDict()
SDF::SecurityHandler GetSecurityHandler()
Common::Iterator< Page > PageIterator
PDFDoc & operator=(const PDFDoc &)
void FDFUpdate(FDF::FDFDoc &fdf_doc)
FDF::FDFDoc FDFExtract(enum ExtractFlag flag=e_forms_only)
void RemovePageLabel(int page_num)
class Bookmark GetFirstBookmark()
UInt64 GetDownloadedByteCount()
SignaturesVerificationStatus
UInt64 GetTotalRemoteByteCount()