![]() |
PDFix SDK
6.5.0
|
Public Member Functions | |
virtual bool | Save (const wchar_t *path, PdfSaveFlags save_flags)=0 |
virtual bool | SaveToStream (PsStream *stream, PdfSaveFlags flags)=0 |
virtual bool | Close ()=0 |
Closes a document and releases its resources. Changes are not saved. More... | |
virtual bool | AddWatermarkFromImage (PdfWatermarkParams *params, PdsStream *image_obj)=0 |
Adds an image-based watermark to a page range in the given document. More... | |
virtual int | GetNumPages ()=0 |
Gets the number of pages in a document. More... | |
virtual PdfPage * | AcquirePage (int page_num)=0 |
virtual PdfPage * | CreatePage (int index, const PdfRect *media_box)=0 |
virtual bool | DeletePages (int index_from, int index_to, PdfCancelProc cancel_proc, void *cancel_data)=0 |
Deletes the specified pages. More... | |
virtual bool | InsertPages (int index, const PdfDoc *doc, int index_from, int index_to, PdfPageInsertFlags insert_flags, PdfCancelProc cancel_proc, void *cancel_data)=0 |
virtual bool | MovePage (int index_to, int index_from)=0 |
Moves one page in a document. More... | |
virtual int | GetNumDocumentJavaScripts ()=0 |
Gets the number of document JavaScript name/action pairs in the document JavaScript name tree. More... | |
virtual int | GetDocumentJavaScript (int index, wchar_t *buffer, int len)=0 |
Gets the document JavaScript action by it's index in th documente JavaScript name tree. More... | |
virtual int | GetDocumentJavaScriptName (int index, wchar_t *buffer, int len)=0 |
Gets the document JavaScript action name by it's index in th documente JavaScript name tree. More... | |
virtual int | GetNumCalculatedFormFields ()=0 |
Gets the number of calculated form fields in AcroForm calculated order (CO) which is an array. More... | |
virtual PdfFormField * | GetCalculatedFormField (int index)=0 |
Gets the calculated form field from AcroForm calculation order array (CO) by index. More... | |
virtual int | GetNumFormFields ()=0 |
Gets the total number of form fields in document's AcroForm Fields tree. More... | |
virtual PdfFormField * | GetFormField (int index)=0 |
Gets the form field in document's AcroForm Fields tree by index. More... | |
virtual PdfFormField * | GetFormFieldByName (const wchar_t *buffer)=0 |
Gets the form field in document's AcroForm Fields tree by name. More... | |
virtual int | GetInfo (const wchar_t *key, wchar_t *buffer, int len)=0 |
Gets the value of a key in a document's Info dictionary. More... | |
virtual bool | SetInfo (const wchar_t *key, const wchar_t *info)=0 |
Sets the value of a key in a document's Info dictionary. More... | |
virtual PdfBookmark * | GetBookmarkRoot ()=0 |
virtual bool | FlattenAnnots (PdfFlattenAnnotsParams *params)=0 |
virtual bool | ApplyRedaction ()=0 |
Apply redaction annotations to the document content. More... | |
virtual int | GetNumAlternates ()=0 |
Gets the number of PDF alternate in the document. More... | |
virtual PdfAlternate * | AcquireAlternate (int index)=0 |
Gets the PDF alternate based on it's index. More... | |
virtual PdsObject * | CreatePdsObject (PdfObjectType type, bool indirect)=0 |
Creates a new PdsObject associated with the specified document. More... | |
virtual bool | AddTags (PdfCancelProc cancel_proc, void *cancel_data)=0 |
Add tags into document. More... | |
virtual bool | RemoveTags (PdfCancelProc cancel_proc, void *cancel_data)=0 |
virtual PdfDocTemplate * | GetTemplate ()=0 |
Accesses document template. More... | |
virtual PsMetadata * | GetMetadata ()=0 |
Gets documnent metadata. More... | |
virtual int | GetLang (wchar_t *buffer, int len)=0 |
Gets documnent primary language. More... | |
virtual bool | SetLang (const wchar_t *lang)=0 |
Sets documnent primary language. More... | |
virtual bool | EmbedFonts (bool subset, PdfCancelProc cancel_proc, void *cancel_data)=0 |
Embeds or subsets fonts used in the document. More... | |
virtual bool | MakeAccessible (PdfAccessibleParams *params, PdfCancelProc cancel_proc, void *cancel_data)=0 |
Makes a PDF document accessible. More... | |
virtual PdsDictionary * | GetTrailerObject ()=0 |
Gets the document trailer dictionary. More... | |
virtual PdsDictionary * | GetRootObject ()=0 |
Gets the document catalog dictionary which is a Root entry. More... | |
virtual PdsDictionary * | GetInfoObject ()=0 |
Gets the Info dictionary of the document. More... | |
virtual PdsDictionary * | CreateDictObject (bool indirect)=0 |
Create new PdsDictionary object. More... | |
virtual PdsArray * | CreateArrayObject (bool indirect)=0 |
Create new PdsArray object. More... | |
virtual PdsName * | CreateNameObject (bool indirect, const wchar_t *value)=0 |
Create new PdsName object. More... | |
virtual PdsString * | CreateStringObject (bool indirect, const wchar_t *value, bool hex)=0 |
Create new PdsString object. More... | |
virtual PdsNumber * | CreateIntObject (bool indirect, int value)=0 |
Create new PdsNumber (integer) object. More... | |
virtual PdsNumber * | CreateNumberObject (bool indirect, double value)=0 |
Create new PdsNumber (float) object. More... | |
virtual PdsStream * | CreateStreamObject (bool indirect, PdsDictionary *dict, const uint8_t *buffer, int size)=0 |
Create new PdsStream object. More... | |
virtual PdsStream * | CreateXObjectFromImage (PsStream *image_data, PdfImageFormat format)=0 |
virtual PdsObject * | GetObjectById (int obj_id)=0 |
Get the document object by number. More... | |
virtual PdsStructTree * | CreateStructTree ()=0 |
virtual PdsStructTree * | GetStructTree ()=0 |
Gets the Struct Tree root object of the document. More... | |
virtual void | RemoveStructTree ()=0 |
virtual void | RemoveBookmarks ()=0 |
Removes all bookmarks from the document. More... | |
virtual bool | CreateBookmarks (PdfCancelProc cancel_proc, void *cancel_data)=0 |
Create bookmark tree from the document's structure tree headings. More... | |
virtual bool | AddFontMissingUnicode (PdfCancelProc cancel_proc, void *cancel_data)=0 |
Search used font's characters and add appropriate unicode character if not present. More... | |
virtual PdfNameTree * | GetNameTree (const wchar_t *name, bool create)=0 |
Get a name tree, with the key name specified in the tree, from the Names dictionary of the PdfDoc. More... | |
virtual void | RemoveNameTree (const wchar_t *name)=0 |
Removes the name tree in the Names dictionary with the specified key name it that name exists. More... | |
virtual int | GetPageNumFromObject (PdsObject *page_dict)=0 |
Gets the page number of the page specified by a page dictionary. More... | |
virtual PdfAnnot * | GetAnnotFromObject (PdsObject *annot_dict)=0 |
Gets the PdfAnnot object from a PdsObject. More... | |
virtual PdfAction * | GetActionFromObject (PdsObject *action_obj)=0 |
Gets the PdfAction object from a PdsObject. More... | |
virtual PdfViewDestination * | GetViewDestinationFromObject (PdsObject *dest_obj)=0 |
Gets the PdfViewDestination object from a PdsObject. More... | |
virtual PdsForm * | CreateFormFromObject (PdsStream *stream, PdfMatrix *matrix)=0 |
Create the PdsForm object from a PdsStream. More... | |
virtual PdsContent * | CreateContent ()=0 |
Create new PdsContent object. More... | |
|
pure virtual |
Gets the PDF alternate based on it's index.
index | The index of an alternate. |
|
pure virtual |
Gets a PdfPage from a document. The page is cached, so that subsequent calls on the same PDPage return The same PdfPage and increments the reference count. The page remains in the cache as long as document exists or PdfPage::Release was not called. AcquirePage increments a page�s reference count. The page will not be released until the reference count is zero, or the application terminates. NOTE: After you are done using the page, release it using PdfPage::Release to release resources.
page_num | The page number of the page to get. The first page is 0. |
|
pure virtual |
Search used font's characters and add appropriate unicode character if not present.
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Add tags into document.
cancel_proc | Callback to check for canceling operations. A CancelProc is typically passed to some method that takes a long time to complete. At frequent intervals, the method calls the CancelProc. If it returns true, then the method cancels its operation; if false, it continues. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Adds an image-based watermark to a page range in the given document.
params | Structure specifying how the watermark should be added to the document. |
image_xobj | The image XObject created with CreateXObjectFromImage. |
|
pure virtual |
Apply redaction annotations to the document content.
TODO: PdfRedactionParams* params
|
pure virtual |
Closes a document and releases its resources. Changes are not saved.
|
pure virtual |
|
pure virtual |
Create bookmark tree from the document's structure tree headings.
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Create new PdsContent object.
|
pure virtual |
Create new PdsDictionary object.
indirect | if true the method creates indorect object othervise a direct object. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Creates and acquires a new page. The page is inserted into the document at the specified location. NOTE: After you are done using the page, release it using PdfPage::Release to release resources.
index | Where to add the page. Passing a value of -1 adds the page to the end. Passing a value of 0 adds the page to the beginning of the document. |
mediaBox | Rectangle specifying the page's media box. |
|
pure virtual |
Creates a new PdsObject associated with the specified document.
type | The type of a new object. |
indirect | If true, creates the object as an indirect object. If false, creates the object as a direct object. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Creates the Struct Tree root object of the document. If PdfDoc already has a StructTree it returns the existing structure tree.
|
pure virtual |
Create new XObject of the type Image from an image data. Supported image types are JPEG and PNG
image_data | The image data |
format | The format of the he image |
|
pure virtual |
Deletes the specified pages.
index_from | The page number of the first page to delete. The first page is 0. |
index_to | The page number of the last page to delete. |
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Embeds or subsets fonts used in the document.
subset | If true, embeds each font inside doc with creating a subset. |
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Flatten annotation appearances to the document content and removes flattened annotation from the page
|
pure virtual |
Gets the abstract root of the document's bookmark tree. This bookmark has no representation in PDF, it only holds top level of document's bookmarks. NOTE: Call only PdfBookmark::GetNumChildren and PdfBookmark::GetChild methods for this bookmark. Other methods return false.
|
pure virtual |
Gets the calculated form field from AcroForm calculation order array (CO) by index.
index | The index of a form field to retrieve. |
|
pure virtual |
Gets the document JavaScript action by it's index in th documente JavaScript name tree.
index | The index of a JavaScript action name to retrieve |
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the document JavaScript action name by it's index in th documente JavaScript name tree.
index | The index of a JavaScript action name to retrieve |
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the form field in document's AcroForm Fields tree by index.
|
pure virtual |
Gets the form field in document's AcroForm Fields tree by name.
|
pure virtual |
Gets the value of a key in a document's Info dictionary.
key | The name of the Info dictionary key whose value is obtained. |
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets the Info dictionary of the document.
|
pure virtual |
Gets documnent primary language.
A language identifier that shall specify the natural language for all text in the document except where overridden by language specifications for structure elements or marked content.
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Gets documnent metadata.
|
pure virtual |
Get a name tree, with the key name specified in the tree, from the Names dictionary of the PdfDoc.
name | The name of requested tree. |
create | Create the tree if the tree with requested name does not exist. |
|
pure virtual |
Gets the number of PDF alternate in the document.
|
pure virtual |
Gets the number of calculated form fields in AcroForm calculated order (CO) which is an array.
|
pure virtual |
Gets the number of document JavaScript name/action pairs in the document JavaScript name tree.
|
pure virtual |
Gets the total number of form fields in document's AcroForm Fields tree.
|
pure virtual |
Gets the number of pages in a document.
|
pure virtual |
Get the document object by number.
obj_id | The number of the object to retrieve |
|
pure virtual |
Gets the page number of the page specified by a page dictionary.
page_dict | The page dictionary object whose number is obtained. |
|
pure virtual |
Gets the document catalog dictionary which is a Root entry.
|
pure virtual |
Gets the Struct Tree root object of the document.
|
pure virtual |
Accesses document template.
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Gets the document trailer dictionary.
|
pure virtual |
Gets the PdfViewDestination object from a PdsObject.
dest_obj | The view destination object from which the object will be obtained. |
|
pure virtual |
Inserts pages from input doc into the current doc. All annotations, and anything else associated with the page (such as a thumbnail image) are copied from the doc pages to the new pages in doc. The insertFlags control whether data are inserted along with the specified pages.
index | The page number in the current doc after where pages from doc are inserted. |
doc | The document containing the pages that are inserted into the current doc. |
index_from | The page number of the first page of doc to insert. |
index_to | The page number of the last page of doc to insert. |
insert_flags | Flags that determine what additional information is copied from doc. |
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Makes a PDF document accessible.
params | PdfAccessibleParams parameters that control process of making PDF accessible. |
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Moves one page in a document.
index_to | The new location of the page to move. |
index_from | The page number of the page to move. |
|
pure virtual |
Removes all bookmarks from the document.
|
pure virtual |
Removes the name tree in the Names dictionary with the specified key name it that name exists.
name | The name of requested tree to remove. |
|
pure virtual |
Removes and destroy the StructTreeRoot element from the specified PdfDoc. This methods doesn't remove marked-content from pages. To do that each page needs to be acquired with CPdfDoc::AcquirePage and marked-content needs to be removed. To be sure that all structural elements were removed, rather call PdfDoc::RemoveTags.
|
pure virtual |
Remove tags and all structural elements from the document. This method is internally called in CPdfDoc::AddTags method to be sure that all previous tags were removed.
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |
|
pure virtual |
Saves a document to the file. NOTE: You must call PdfDoc::Close to release resources.
path | Absolute file path where the document should be saved. |
flags | A bit field combination PdfSaveFlags values. If kSaveIncremental is specified in flags, then path should be NULL. If kSaveFull is specified and path is the same as the file's original path, the new file is saved to a file system-determined temporary path, then the old file is deleted and the new file is renamed to path. |
|
pure virtual |
Saves a document to the stream. NOTE: You must call PdfDoc::Close to release resources.
stream | The stream to which the file is saved. |
flags | A PdfSaveFlags value. If kSaveIncremental is specified in flags, then path should be NULL. If kSaveFull is specified and path is the same as the file's original path, the new file is saved to a file system-determined temporary path, then the old file is deleted and the new file is renamed to path. |
|
pure virtual |
Sets the value of a key in a document's Info dictionary.
key | The name of the Info dictionary key whose value is obtained. |
buffer | String value to be set for the specific Info dictionary entry. |
|
pure virtual |
Sets documnent primary language.
buffer | The buffer containing document primary buffer |