42 class ReadingBookmark;
43 class SecurityHandler;
46 class CertificateEncryptData;
48 class CustomEncryptData;
345 typedef enum _PasswordType {
361 typedef enum _EncryptType {
385 typedef enum _UserPermissions {
442 typedef enum _SaveFlags {
477 typedef enum _ImportPageFlags {
495 typedef enum _DisplayMode {
519 typedef enum _DataType {
533 typedef enum _WrapperType {
559 explicit PDFDoc(
const char* path);
569 explicit PDFDoc(
const wchar_t* path);
581 explicit PDFDoc(
const void* buffer,
size_t size);
609 explicit PDFDoc(std::ifstream* input_file_stream);
1388 uint32 user_permissions = 0xFFFFFFFC,
const char* owner_password =
"");
1418 const wchar_t* crypto_filter,
const wchar_t* description,
float version,
1638 const wchar_t* src_file_path,
const String& password,
1692 const wchar_t* src_file_path,
const WString& password,
1936 #endif // FS_PDFDOC_H_ FX_INT64 int64
Signed 64-bit integer.
Definition: fs_basictypes.h:192
When document is opened, full-screen mode, with no menu bar, window controls, or any other windows ar...
Definition: fs_pdfdoc.h:506
int GetFileVersion()
Get PDF file version stored in PDF header section.
bool ImportFromFDF(const fdf::FDFDoc &fdf_doc, int types=pdf::PDFDoc::e_Forms|pdf::PDFDoc::e_Annots, const common::Range &page_range=common::Range())
Import form fields and annotations from a FDF/XFDF document.
int GetReadingBookmarkCount()
Get the count of reading bookmarks.
PasswordType GetPasswordType() const
Get the type of current used password.
file writing interface.
Definition: fx_stream.h:449
void SetDisplayMode(DisplayMode display_mode)
Set the display mode.
bool RemoveReadingBookmark(const ReadingBookmark &reading_bookmark)
Remove a reading bookmark from current PDF document.
bool IsTaggedPDF() const
Check if current PDF document is a Tagged PDF file.
objects::PDFDictionary * GetEncryptDict() const
Get the encrypt dictionary.
SaveFlags
Enumeration for PDF document saving flags.
Definition: fs_pdfdoc.h:442
bool RemoveOpenAction()
Remove the action to be performed when the document is opened.
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
objects::PDFDictionary * GetCatalog() const
Get the catalog dictionary.
bool operator==(const PDFDoc &other) const
Equal operator.
WrapperData()
Constructor.
Definition: fs_pdfdoc.h:55
WString description
Description for wrapper file to show applications or confront users prompt information.
Definition: fs_pdfdoc.h:130
int64 GetWrapperOffset() const
Get wrapper offset if current document's wrapper type is PDFDoc::e_WrapperFoxit.
A user password is used in PDF document.
Definition: fs_pdfdoc.h:351
UserPermissions
Enumeration for user access permissions in a PDF document.
Definition: fs_pdfdoc.h:385
Definition: fs_action.h:417
PDF 2.0 wrapper document.
Definition: fs_pdfdoc.h:539
Definition: fs_annot.h:749
bool DoJSOpenAction()
Perform JavaScript actions when the document is opened.
uint32 GetUserPermissions() const
Get user access permissions.
bool MovePageTo(const PDFPage &page, int dest_index)
Move a specified page to a new index position.
String GetHeader() const
Get PDF header identifying the version of the PDF specification to which the file conforms.
Definition: fs_pdfdoc.h:134
Definition: fs_pdfdoc.h:52
Size
Enumeration for page size type.
Definition: fs_pdfpage.h:385
CFX_Object Object
Object type.
Definition: fs_basictypes.h:219
WString file_name
The payload file name.
Definition: fs_pdfdoc.h:208
SecurityHandler GetSecurityHandler()
Get current PDF security handler of current document.
Definition: fs_common.h:385
Definition: fs_security.h:332
int version
Wrapper version.
Definition: fs_pdfdoc.h:122
PayLoadData(float version, const wchar_t *crypto_filter, const wchar_t *file_name, foxit::int64 file_size, const wchar_t *description)
Constructor, with parameters.
Definition: fs_pdfdoc.h:150
bool ExportAnnotToFDF(const annots::Annot &pdf_annot, const fdf::FDFDoc &fdf_doc)
Export specified annotation to a FDF/XFDF document.
bool IsLinearized() const
Check if current PDF document is a linearized file.
bool ExportToFDF(const fdf::FDFDoc &fdf_doc, int types=pdf::PDFDoc::e_Forms|pdf::PDFDoc::e_Annots, const common::Range &page_range=common::Range())
Export form fields and annotations to a FDF/XFDF document.
WrapperType
Enumeration for wrapper type.
Definition: fs_pdfdoc.h:533
common::Progressive StartLoadW(const WString &password=WString(), bool is_cache_stream=true, common::PauseCallback *pause=0)
Start to loading current document content by using a specified password.
bool RemoveSecurity()
Remove the security handler from current document, so that the later saved document will be unencrypt...
Header file for common definitions and classes.
bool SaveAsWrapperFile(const wchar_t *file_path, const WrapperData *wrapper_data=0, uint32 user_permissions=0xFFFFFFFC, const char *owner_password="")
Save current PDF document as a wrapper file.
DisplayMode
Enumeration for display mode which specifies how the document should be displayed when opened.
Definition: fs_pdfdoc.h:495
When document is opened, thumbnail images are visible.
Definition: fs_pdfdoc.h:501
No encryption pattern.
Definition: fs_pdfdoc.h:365
Save document without original data or unchanged objects.
Definition: fs_pdfdoc.h:458
bool RemoveBookmark(const Bookmark &bookmark)
Remove a specified bookmark.
file reading interface.
Definition: fx_stream.h:555
objects::PDFObject * GetIndirectObject(uint32 object_number)
Get an indirect object by indirect object number.
Header file for file operation related definitions and functions.
StdEncryptData GetStdEncryptData() const
Get encrypt data of standard encryption (known as password encryption).
Definition: fs_security.h:937
objects::PDFDictionary * GetInfo() const
Get the information dictionary.
void SetFileVersion(int version)
Set the PDF file version which will be stored in PDF header section of the saved PDF file.
bool operator !=(const PDFDoc &other) const
Not equal operator.
WString description
Description for payload file to show applications or confront users prompt information.
Definition: fs_pdfdoc.h:212
String GetUserPassword(const String &owner_password)
Get the user password based on owner password.
WrapperData GetWrapperData() const
Get wrapper data if current document's wrapper type is PDFDoc::e_WrapperFoxit.
ErrorCode
Enumeration for error code.
Definition: fs_basictypes.h:236
Encryption type: Foxit DRM encryption.
Definition: fs_pdfdoc.h:371
Import pages normally.
Definition: fs_pdfdoc.h:479
int GetSignatureCount()
Get the count of signature.
Definition: fs_pdfobject.h:55
common::Font GetFont(int index)
Get a font by index.
void ClearRenderCache()
Clear the cache used during rendering, to reduce the memory usage.
Encryption type: password, which is the standard encryption.
Definition: fs_pdfdoc.h:367
bool IsPortfolio()
Check whether current PDF document is a portfolio file or not.
bool RemovePage(int index)
Remove a PDF page by page index.
ReadingBookmark GetReadingBookmark(int index)
Get a reading bookmark by index.
Assemble PDF document. (Bit 11 in permission value)
Definition: fs_pdfdoc.h:429
DisplayMode GetDisplayMode() const
Get the display mode.
When document is opened, optional content group panels are visible.
Definition: fs_pdfdoc.h:508
PDFPage GetPage(int index)
Get a PDF page by index.
uint64 GetFileSize()
Get file size.
When document is opened, attachment panels are visible.
Definition: fs_pdfdoc.h:510
DataType
Enumeration for data type used to decide which object(s) will be imported from or exported to FDF/XFD...
Definition: fs_pdfdoc.h:519
Form fields are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:521
Definition: fs_security.h:797
PDFPage InsertPage(int index, float width, float height)
Insert a new blank PDF page to document, by index.
Annotations (except link annotations) are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:525
RMSEncryptData GetRMSEncryptData() const
Get encrypt data of RMS encryption.
Encryption type: Foxit connected PDF DRM encryption.
Definition: fs_pdfdoc.h:377
BYTE STRING CLASS.
Definition: fx_string.h:317
actions::Action GetOpenAction()
Get the action to be performed when the document is opened.
PageBasicInfo(float width, float height, common::Rotation rotation)
Constructor, with parameters.
Definition: fs_pdfdoc.h:229
When document is opened, neither document outlines nor thumbnail images are visible.
Definition: fs_pdfdoc.h:497
Encryption type: Microsoft RMS encryption.
Definition: fs_pdfdoc.h:375
bool MovePagesTo(const common::Range &page_range, int dest_index)
Move one or more pages (specified by index) to a new index position.
PageBasicInfo()
Constructor.
Definition: fs_pdfdoc.h:235
Unknown encryption type.
Definition: fs_pdfdoc.h:363
WString type
Wrapper type to indicate a type of the current wrapper file.
Definition: fs_pdfdoc.h:124
Definition: fs_signature.h:84
int GetFirstAvailPageIndex() const
Get the page index of the fist available page.
Definition: fs_security.h:133
WString uri
The URI for consumers to get more information.
Definition: fs_pdfdoc.h:128
Rotation
Enumeration for rotation.
Definition: fs_common.h:221
Unknown rotation.
Definition: fs_common.h:231
When document is opened, document outlines (bookmarks) are visible.
Definition: fs_pdfdoc.h:499
common::Progressive StartImportPages(int dest_index, const PDFDoc &src_doc, uint32 flags=PDFDoc::e_ImportFlagNormal, const char *layer_name="", const common::Range &page_range=common::Range(), common::PauseCallback *pause=0)
Start to import pages from another PDF document (via PDF document object).
common::Progressive StartSaveAs(const char *file_path, uint32 save_flags=PDFDoc::e_SaveFlagNormal, common::PauseCallback *pause=0)
Start to save current PDF document as another PDF file.
common::Progressive StartLoad(const String &password="", bool is_cache_stream=true, common::PauseCallback *pause=0)
Start to loading current document content by using a specified password.
PDFDoc & operator=(const PDFDoc &other)
Assign operator.
Header file for PDF object related definitions and classes.
Definition: fs_pdfdoc.h:219
int GetPageCount() const
Get the count of pages.
Header file for PDF page related definitions and classes.
PayLoadData & operator=(const PayLoadData &payload_data)
Assign operator.
Definition: fs_pdfdoc.h:177
Fill PDF form. (Bit 9 in permission value)
Definition: fs_pdfdoc.h:416
bool SaveAs(const char *file_path, uint32 save_flags=PDFDoc::e_SaveFlagNormal)
Save current PDF document as another PDF file.
CFX_WideString WString
Wide string.
Definition: fs_basictypes.h:221
EncryptType
Enumeration for encryption type.
Definition: fs_pdfdoc.h:361
PageBasicInfo & operator=(const PageBasicInfo &page_info)
Assign operator.
Definition: fs_pdfdoc.h:255
bool IsCDRM() const
Check whether the loaded document is a ConnectedPDF DRM document or not.
WrapperData(int version, const wchar_t *type, const wchar_t *app_id, const wchar_t *uri, const wchar_t *description)
Constructor, with parameters.
Definition: fs_pdfdoc.h:67
Foxit namespace.
Definition: fs_connectedpdf.h:26
Definition: fs_security.h:56
PayLoadData()
Constructor.
Definition: fs_pdfdoc.h:137
uint32 AddIndirectObject(objects::PDFObject *pdf_object)
Add a PDF object to current PDF document, to be an indirect object.
Definition: fs_bookmark.h:58
PageBasicInfo GetPageBasicInfo(int index)
Get the basic information of a page specified by index.
String GetEndpoint()
Get the URL of ConnectedPDF Web services if current PDF is a connected PDF.
Save document incrementally.
Definition: fs_pdfdoc.h:451
Definition: fs_readingbookmark.h:43
Annotations are to imported from or exported to FDF/XFDF document.
Definition: fs_pdfdoc.h:523
Definition: fx_basic.h:3690
ErrorCode LoadW(const WString &password=WString())
Load current document content by using a specified password.
Encryption type: digital certificate encryption.
Definition: fs_pdfdoc.h:369
Definition: fs_pdfobject.h:763
int GetFontCount()
Count all the PDF fonts used in current PDF document.
bool HasForm() const
Check whether current PDF document has interactive form (also known as AcroForm).
void Set(float width, float height, common::Rotation rotation)
Set value.
Definition: fs_pdfdoc.h:271
Import pages with layers.
Definition: fs_pdfdoc.h:481
Operate text annotations and fill in interactive form fields. (Bit 6 in permission value)
Definition: fs_pdfdoc.h:410
common::Progressive StartImportPagesFromFilePath(int dest_index, const wchar_t *src_file_path, const String &password, uint32 flags=PDFDoc::e_ImportFlagNormal, const char *layer_name="", const common::Range &page_range=common::Range(), common::PauseCallback *pause=0)
Start to import pages from another PDF document (via file path).
void Set(float version, const wchar_t *crypto_filter, const wchar_t *file_name, int64 file_size, const wchar_t *description)
Set value.
Definition: fs_pdfdoc.h:195
void Set(int version, const wchar_t *type, const wchar_t *app_id, const wchar_t *uri, const wchar_t *description)
Set value.
Definition: fs_pdfdoc.h:113
ReadingBookmark InsertReadingBookmark(int reading_bookmark_index, const WString &title, int dest_page_index)
Insert a reading bookmark to current PDF document.
PasswordType CheckPassword(const String &password)
Check the type of a specified password.
objects::PDFDictionary * GetTrailer() const
Get the trailer dictionary.
ImportPageFlags
Enumeration for flags used for importing pages.
Definition: fs_pdfdoc.h:477
bool SetOpenAction(actions::Action &action)
Set the action to be performed when the document is opened.
#define NULL
The null-pointer value.
Definition: fx_system.h:773
common::Progressive StartGetPayloadFile(foxit::common::file::WriterCallback *payload_file, common::PauseCallback *pause=0)
Start to get payload file.
WrapperData & operator=(const WrapperData &wrapper_data)
Assign operator.
Definition: fs_pdfdoc.h:93
Save document normally, without using any special flag. This can only be used alone.
Definition: fs_pdfdoc.h:444
Definition: fs_pdfdoc.h:338
WString crypto_filter
The name of the cryptographic filter used to encrypt the encrypted payload document.
Definition: fs_pdfdoc.h:206
WString app_id
Application identity to indicate applications to open this wrapper data.
Definition: fs_pdfdoc.h:126
Definition: fs_pdfpage.h:307
EncryptType GetEncryptionType() const
Get the encryption type.
Definition: fs_fdfdoc.h:51
void RemoveSignature(const Signature &signature)
Remove a signature.
float height
Page height.
Definition: fs_pdfdoc.h:280
Bookmark CreateRootBookmark()
Create new bookmark root node.
Import pages without cloning stream objects into memory.
Definition: fs_pdfdoc.h:487
bool SetSecurityHandler(const SecurityHandler &handler)
Set a PDF security handler for encryption, such as standard encryption(password), certificate encrypt...
Definition: fs_security.h:550
bool IsEncrypted() const
Check whether current document is an encrypted file or not.
float version
The version number of the cryptographic filter used to encrypt the encrypted payload referenced by th...
Definition: fs_pdfdoc.h:204
Print PDF document with higher qualities. (Bit 12 in permission value)
Definition: fs_pdfdoc.h:435
bool IsCPDF() const
Check whether the loaded document is a ConnectedPDF document or not.
WrapperData(const WrapperData &wrapper_data)
Constructor, with another wrapper data object.
Definition: fs_pdfdoc.h:79
int64 file_size
The payload file size.
Definition: fs_pdfdoc.h:210
Signature GetSignature(int index)
Get a signature by index.
bool IsWrapper() const
Check whether current document is a wrapper file or not.
Definition: fs_common.h:1188
Encryption type: customized encryption.
Definition: fs_pdfdoc.h:373
An owner password is used in PDF document.
Definition: fs_pdfdoc.h:353
String GetDocURI()
Get the URI of connected PDF if current PDF is a connected PDF.
PageBasicInfo(const PageBasicInfo &page_info)
Constructor, with another page basic information object.
Definition: fs_pdfdoc.h:244
Modify PDF contents. (Bit 4 in permission value)
Definition: fs_pdfdoc.h:398
bool IsXFA() const
Check whether current PDF document is an XFA document.
common::Rotation rotation
Page rotation. Please refer to values starting from common::e_Rotation0 and this should be one of the...
Definition: fs_pdfdoc.h:285
WrapperType GetWrapperType() const
Get Wrapper type.
CustomEncryptData GetCustomEncryptData() const
Get encrypt data of custom encryption.
CertificateEncryptData GetCertificateEncryptData() const
Get encrypt data of certificate encryption.
float width
Page width.
Definition: fs_pdfdoc.h:278
PayLoadData(const PayLoadData &payload_data)
Constructor, with another payload data object.
Definition: fs_pdfdoc.h:163
objects::PDFDictionary * GetPagesDict() const
Get the dictionary of "Pages".
WIDE STRING CLASS.
Definition: fx_string.h:1470
Header file for bookmark related definitions and classes.
Definition: fs_common.h:1033
Normal document.
Definition: fs_pdfdoc.h:535
DRMEncryptData GetDRMEncryptData() const
Get encrypt data of Foxit DRM encryption.
bool IsEmpty() const
Check whether current object is empty or not.
PayLoadData GetPayLoadData()
Get payload data if current document's wrapper type is PDFDoc::e_WrapperPDFV2.
Bookmark GetRootBookmark()
Get bookmark root node.
Header file for reading bookmark related definitions and classes.
void DeleteIndirectObject(uint32 object_number)
Delete an indirect object by indirect object number.
Foxit wrapper document.
Definition: fs_pdfdoc.h:537
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:198
Save document by using XRef stream.
Definition: fs_pdfdoc.h:463
Print PDF document with normal mode. (Bit 3 in permission value)
Definition: fs_pdfdoc.h:391
The password is invalid.
Definition: fs_pdfdoc.h:347
Extract PDF contents. (Bit 5 in permission value)
Definition: fs_pdfdoc.h:404
ErrorCode Load(const String &password="")
Load current document content by using a specified password.
No password is used in PDF document.
Definition: fs_pdfdoc.h:349
FX_UINT64 uint64
Unsigned 64-bit integer.
Definition: fs_basictypes.h:194
Definition: fs_basictypes.h:342
Page size: letter.
Definition: fs_pdfpage.h:387
Disabilities support. (Bit 10 in permission value)
Definition: fs_pdfdoc.h:422
Save document as a linearized file.
Definition: fs_pdfdoc.h:469
PasswordType
Enumeration for the type of current used password in a PDF document.
Definition: fs_pdfdoc.h:345
common::Progressive StartSaveAsPayloadFile(const wchar_t *file_path, const wchar_t *payload_file_path, const wchar_t *crypto_filter, const wchar_t *description, float version, uint32 save_flags=PDFDoc::e_SaveFlagNormal, common::PauseCallback *pause=0)
Start to save current PDF document as a wrapper document with a payload document (defined in PDF 2....