PDFix SDK  6.5.0
PdfDoc Struct Referenceabstract

PdfDoc class. More...

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 PdfPageAcquirePage (int page_num)=0
 
virtual PdfPageCreatePage (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 PdfFormFieldGetCalculatedFormField (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 PdfFormFieldGetFormField (int index)=0
 Gets the form field in document's AcroForm Fields tree by index. More...
 
virtual PdfFormFieldGetFormFieldByName (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 PdfBookmarkGetBookmarkRoot ()=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 PdfAlternateAcquireAlternate (int index)=0
 Gets the PDF alternate based on it's index. More...
 
virtual PdsObjectCreatePdsObject (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 PdfDocTemplateGetTemplate ()=0
 Accesses document template. More...
 
virtual PsMetadataGetMetadata ()=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 PdsDictionaryGetTrailerObject ()=0
 Gets the document trailer dictionary. More...
 
virtual PdsDictionaryGetRootObject ()=0
 Gets the document catalog dictionary which is a Root entry. More...
 
virtual PdsDictionaryGetInfoObject ()=0
 Gets the Info dictionary of the document. More...
 
virtual PdsDictionaryCreateDictObject (bool indirect)=0
 Create new PdsDictionary object. More...
 
virtual PdsArrayCreateArrayObject (bool indirect)=0
 Create new PdsArray object. More...
 
virtual PdsNameCreateNameObject (bool indirect, const wchar_t *value)=0
 Create new PdsName object. More...
 
virtual PdsStringCreateStringObject (bool indirect, const wchar_t *value, bool hex)=0
 Create new PdsString object. More...
 
virtual PdsNumberCreateIntObject (bool indirect, int value)=0
 Create new PdsNumber (integer) object. More...
 
virtual PdsNumberCreateNumberObject (bool indirect, double value)=0
 Create new PdsNumber (float) object. More...
 
virtual PdsStreamCreateStreamObject (bool indirect, PdsDictionary *dict, const uint8_t *buffer, int size)=0
 Create new PdsStream object. More...
 
virtual PdsStreamCreateXObjectFromImage (PsStream *image_data, PdfImageFormat format)=0
 
virtual PdsObjectGetObjectById (int obj_id)=0
 Get the document object by number. More...
 
virtual PdsStructTreeCreateStructTree ()=0
 
virtual PdsStructTreeGetStructTree ()=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 PdfNameTreeGetNameTree (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 PdfAnnotGetAnnotFromObject (PdsObject *annot_dict)=0
 Gets the PdfAnnot object from a PdsObject. More...
 
virtual PdfActionGetActionFromObject (PdsObject *action_obj)=0
 Gets the PdfAction object from a PdsObject. More...
 
virtual PdfViewDestinationGetViewDestinationFromObject (PdsObject *dest_obj)=0
 Gets the PdfViewDestination object from a PdsObject. More...
 
virtual PdsFormCreateFormFromObject (PdsStream *stream, PdfMatrix *matrix)=0
 Create the PdsForm object from a PdsStream. More...
 
virtual PdsContentCreateContent ()=0
 Create new PdsContent object. More...
 

Detailed Description

PdfDoc class.

A PdfDoc object represents a PDF document.

Member Function Documentation

◆ AcquireAlternate()

virtual PdfAlternate* PdfDoc::AcquireAlternate ( int  index)
pure virtual

Gets the PDF alternate based on it's index.

Parameters
indexThe index of an alternate.

◆ AcquirePage()

virtual PdfPage* PdfDoc::AcquirePage ( int  page_num)
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.

Parameters
page_numThe page number of the page to get. The first page is 0.
Returns
The requested page.
See also
PdfPage::Release

◆ AddFontMissingUnicode()

virtual bool PdfDoc::AddFontMissingUnicode ( PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Search used font's characters and add appropriate unicode character if not present.

Parameters
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if successfull. false othervise
See also
PdfDoc::EmbedFonts

◆ AddTags()

virtual bool PdfDoc::AddTags ( PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Add tags into document.

Parameters
cancel_procCallback 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_dataPointer to client data for the cancel procedure.
Returns
true if tags were added successfuly, false otherwise.

◆ AddWatermarkFromImage()

virtual bool PdfDoc::AddWatermarkFromImage ( PdfWatermarkParams params,
PdsStream image_obj 
)
pure virtual

Adds an image-based watermark to a page range in the given document.

Parameters
paramsStructure specifying how the watermark should be added to the document.
image_xobjThe image XObject created with CreateXObjectFromImage.
Returns
true if the watermark was added succsessfully, false otherwise.
See also
PdfDoc::CreateXObjectFromImage Sample AddWatermark

◆ ApplyRedaction()

virtual bool PdfDoc::ApplyRedaction ( )
pure virtual

Apply redaction annotations to the document content.

Returns
true if doument redaction was successfull, false otherwise.

TODO: PdfRedactionParams* params

◆ Close()

virtual bool PdfDoc::Close ( )
pure virtual

Closes a document and releases its resources. Changes are not saved.

Returns
true if document was closed succsessfully, false otherwise.
See also
PdfDoc::Save

◆ CreateArrayObject()

virtual PdsArray* PdfDoc::CreateArrayObject ( bool  indirect)
pure virtual

Create new PdsArray object.

Parameters
indirectif true the method creates indorect object othervise a direct object.
Returns
newly created PdsArray object.

◆ CreateBookmarks()

virtual bool PdfDoc::CreateBookmarks ( PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Create bookmark tree from the document's structure tree headings.

Parameters
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if successfull. false othervise
See also
PdfDoc::RemoveBookmarks

◆ CreateContent()

virtual PdsContent* PdfDoc::CreateContent ( )
pure virtual

Create new PdsContent object.

Returns
PdsContent.

◆ CreateDictObject()

virtual PdsDictionary* PdfDoc::CreateDictObject ( bool  indirect)
pure virtual

Create new PdsDictionary object.

Parameters
indirectif true the method creates indorect object othervise a direct object.
Returns
newly created PdsDictionary object.

◆ CreateFormFromObject()

virtual PdsForm* PdfDoc::CreateFormFromObject ( PdsStream stream,
PdfMatrix matrix 
)
pure virtual

Create the PdsForm object from a PdsStream.

Parameters
streamThe PdsObject from which the content will be obtained.
Returns
PdsForm.

◆ CreateIntObject()

virtual PdsNumber* PdfDoc::CreateIntObject ( bool  indirect,
int  value 
)
pure virtual

Create new PdsNumber (integer) object.

Parameters
indirectif true the method creates indorect object othervise a direct object.
valuethe value to be set to an object.
Returns
newly created PdsNumber object.

◆ CreateNameObject()

virtual PdsName* PdfDoc::CreateNameObject ( bool  indirect,
const wchar_t *  value 
)
pure virtual

Create new PdsName object.

Parameters
indirectif true the methods indorect object othervise a direct object.
valuethe value to be set to an object.
Returns
newly created PdsName object.

◆ CreateNumberObject()

virtual PdsNumber* PdfDoc::CreateNumberObject ( bool  indirect,
double  value 
)
pure virtual

Create new PdsNumber (float) object.

Parameters
indirectif true the method creates indorect object othervise a direct object.
valuethe value to be set to an object.
Returns
newly created PdsNumber object.

◆ CreatePage()

virtual PdfPage* PdfDoc::CreatePage ( int  index,
const PdfRect media_box 
)
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.

Parameters
indexWhere 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.
mediaBoxRectangle specifying the page's media box.
Returns
The newly created page.
See also
PdfPage::Release

◆ CreatePdsObject()

virtual PdsObject* PdfDoc::CreatePdsObject ( PdfObjectType  type,
bool  indirect 
)
pure virtual

Creates a new PdsObject associated with the specified document.

Parameters
typeThe type of a new object.
indirectIf true, creates the object as an indirect object. If false, creates the object as a direct object.
Returns
The newly created object.

◆ CreateStreamObject()

virtual PdsStream* PdfDoc::CreateStreamObject ( bool  indirect,
PdsDictionary dict,
const uint8_t *  buffer,
int  size 
)
pure virtual

Create new PdsStream object.

Parameters
indirectif true the method creates indorect object othervise a direct object.
dictthe stream dictionary object.
bufferdata to be set a a stream value.
sizethe size of the buffer in bytes.
Returns
newly created PdsStream object.

◆ CreateStringObject()

virtual PdsString* PdfDoc::CreateStringObject ( bool  indirect,
const wchar_t *  value,
bool  hex 
)
pure virtual

Create new PdsString object.

Parameters
indirectif true the method creates indorect object othervise a direct object.
valuethe value to be set to an object.
Returns
newly created PdsString object.

◆ CreateStructTree()

virtual PdsStructTree* PdfDoc::CreateStructTree ( )
pure virtual

Creates the Struct Tree root object of the document. If PdfDoc already has a StructTree it returns the existing structure tree.

Returns
PdsStructTree object that represents document struct tree root.

◆ CreateXObjectFromImage()

virtual PdsStream* PdfDoc::CreateXObjectFromImage ( PsStream image_data,
PdfImageFormat  format 
)
pure virtual

Create new XObject of the type Image from an image data. Supported image types are JPEG and PNG

Parameters
image_dataThe image data
formatThe format of the he image
Returns
Newly created PdsStream object of the XObject.

◆ DeletePages()

virtual bool PdfDoc::DeletePages ( int  index_from,
int  index_to,
PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Deletes the specified pages.

Parameters
index_fromThe page number of the first page to delete. The first page is 0.
index_toThe page number of the last page to delete.
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if pages were deleted succsessfully, false otherwise.

◆ EmbedFonts()

virtual bool PdfDoc::EmbedFonts ( bool  subset,
PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Embeds or subsets fonts used in the document.

Parameters
subsetIf true, embeds each font inside doc with creating a subset.
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if the was embedded successfully
See also
PdfDoc::AddFontMissingUnicode

◆ FlattenAnnots()

virtual bool PdfDoc::FlattenAnnots ( PdfFlattenAnnotsParams params)
pure virtual

Flatten annotation appearances to the document content and removes flattened annotation from the page

Returns
true if annotation flattening was successfull, false otherwise.

◆ GetActionFromObject()

virtual PdfAction* PdfDoc::GetActionFromObject ( PdsObject action_obj)
pure virtual

Gets the PdfAction object from a PdsObject.

Parameters
action_objThe action object from which the action will be obtained.

◆ GetAnnotFromObject()

virtual PdfAnnot* PdfDoc::GetAnnotFromObject ( PdsObject annot_dict)
pure virtual

Gets the PdfAnnot object from a PdsObject.

Parameters
annot_dictThe annotation dictionary object from which the annotation will be obtained.

◆ GetBookmarkRoot()

virtual PdfBookmark* PdfDoc::GetBookmarkRoot ( )
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.

Returns
The document's root bookmark. Sample GetBookmarks

◆ GetCalculatedFormField()

virtual PdfFormField* PdfDoc::GetCalculatedFormField ( int  index)
pure virtual

Gets the calculated form field from AcroForm calculation order array (CO) by index.

Parameters
indexThe index of a form field to retrieve.
Returns
The PdfFormField object or nullptr in case of error.
See also
PdfDoc::GetNumCalculatedFormFields
PdfDoc::GetNumFormFieldCounts
PdfDoc:GetFormField

◆ GetDocumentJavaScript()

virtual int PdfDoc::GetDocumentJavaScript ( int  index,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the document JavaScript action by it's index in th documente JavaScript name tree.

Parameters
indexThe index of a JavaScript action name to retrieve
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.
See also
PdfDoc::GetNumDocumentJavaScripts
PdfDoc::GetDocumentJavaScriptName

◆ GetDocumentJavaScriptName()

virtual int PdfDoc::GetDocumentJavaScriptName ( int  index,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the document JavaScript action name by it's index in th documente JavaScript name tree.

Parameters
indexThe index of a JavaScript action name to retrieve
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.
See also
PdfDoc::GetNumDocumentJavaScripts
PdfDoc::GetDocumentJavaScript

◆ GetFormField()

virtual PdfFormField* PdfDoc::GetFormField ( int  index)
pure virtual

Gets the form field in document's AcroForm Fields tree by index.

Returns
The PdfFormField object or nullptr in case of error.
See also
PdfDoc::GetNumCalculatedFormFields
PdfDoc::GetCalculatedFormField
PdfDoc::GetNumFormFieldCounts

◆ GetFormFieldByName()

virtual PdfFormField* PdfDoc::GetFormFieldByName ( const wchar_t *  buffer)
pure virtual

Gets the form field in document's AcroForm Fields tree by name.

Returns
The PdfFormField object or nullptr in case of error.
See also
PdfDoc::GetNumCalculatedFormFields
PdfDoc::GetCalculatedFormField
PdfDoc::GetNumFormFieldCounts

◆ GetInfo()

virtual int PdfDoc::GetInfo ( const wchar_t *  key,
wchar_t *  buffer,
int  len 
)
pure virtual

Gets the value of a key in a document's Info dictionary.

Parameters
keyThe 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
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetInfoObject()

virtual PdsDictionary* PdfDoc::GetInfoObject ( )
pure virtual

Gets the Info dictionary of the document.

Returns
PdsObject that represents document root.

◆ GetLang()

virtual int PdfDoc::GetLang ( wchar_t *  buffer,
int  len 
)
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.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.
See also
PdfDoc::SetLang

◆ GetMetadata()

virtual PsMetadata* PdfDoc::GetMetadata ( )
pure virtual

Gets documnent metadata.

Returns
PsMetadata object if metadata was successfully loaded, nullptr otherwise.

◆ GetNameTree()

virtual PdfNameTree* PdfDoc::GetNameTree ( const wchar_t *  name,
bool  create 
)
pure virtual

Get a name tree, with the key name specified in the tree, from the Names dictionary of the PdfDoc.

Parameters
nameThe name of requested tree.
createCreate the tree if the tree with requested name does not exist.

◆ GetNumAlternates()

virtual int PdfDoc::GetNumAlternates ( )
pure virtual

Gets the number of PDF alternate in the document.

Returns
The number of alternates.

◆ GetNumCalculatedFormFields()

virtual int PdfDoc::GetNumCalculatedFormFields ( )
pure virtual

Gets the number of calculated form fields in AcroForm calculated order (CO) which is an array.

Returns
Number of calculated form fields in the document.
See also
PdfDoc::GetCalculatedFormField
PdfDoc::GetNumFormFieldCounts
PdfDoc:GetFormField

◆ GetNumDocumentJavaScripts()

virtual int PdfDoc::GetNumDocumentJavaScripts ( )
pure virtual

Gets the number of document JavaScript name/action pairs in the document JavaScript name tree.

Returns
Number document name/action pairs in the document's JavaScript name tree.
See also
PdfDoc::GetDocumentJavaScript
PdfDoc::GetDocumentJavaScriptName

◆ GetNumFormFields()

virtual int PdfDoc::GetNumFormFields ( )
pure virtual

Gets the total number of form fields in document's AcroForm Fields tree.

Returns
Number of form fields in the document.
See also
PdfDoc::GetNumCalculatedFormFields
PdfDoc::GetCalculatedFormField
PdfDoc:GetFormField

◆ GetNumPages()

virtual int PdfDoc::GetNumPages ( )
pure virtual

Gets the number of pages in a document.

Returns
Number of pages in the document.

◆ GetObjectById()

virtual PdsObject* PdfDoc::GetObjectById ( int  obj_id)
pure virtual

Get the document object by number.

Parameters
obj_idThe number of the object to retrieve
Returns
Corresponding object or null if no such object exists in the document

◆ GetPageNumFromObject()

virtual int PdfDoc::GetPageNumFromObject ( PdsObject page_dict)
pure virtual

Gets the page number of the page specified by a page dictionary.

Parameters
page_dictThe page dictionary object whose number is obtained.
Returns
the page number in the document.
See also
PdfDoc::AcquirePage

◆ GetRootObject()

virtual PdsDictionary* PdfDoc::GetRootObject ( )
pure virtual

Gets the document catalog dictionary which is a Root entry.

Returns
PdsObject that represents document root.

◆ GetStructTree()

virtual PdsStructTree* PdfDoc::GetStructTree ( )
pure virtual

Gets the Struct Tree root object of the document.

Returns
PdsStructTree object that represents document struct tree root.

◆ GetTemplate()

virtual PdfDocTemplate* PdfDoc::GetTemplate ( )
pure virtual

Accesses document template.

Parameters
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if successfull, false otherwise.

◆ GetTrailerObject()

virtual PdsDictionary* PdfDoc::GetTrailerObject ( )
pure virtual

Gets the document trailer dictionary.

Returns
PdsObject that represents document trailer.

◆ GetViewDestinationFromObject()

virtual PdfViewDestination* PdfDoc::GetViewDestinationFromObject ( PdsObject dest_obj)
pure virtual

Gets the PdfViewDestination object from a PdsObject.

Parameters
dest_objThe view destination object from which the object will be obtained.

◆ InsertPages()

virtual bool PdfDoc::InsertPages ( int  index,
const PdfDoc doc,
int  index_from,
int  index_to,
PdfPageInsertFlags  insert_flags,
PdfCancelProc  cancel_proc,
void *  cancel_data 
)
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.

Parameters
indexThe page number in the current doc after where pages from doc are inserted.
docThe document containing the pages that are inserted into the current doc.
index_fromThe page number of the first page of doc to insert.
index_toThe page number of the last page of doc to insert.
insert_flagsFlags that determine what additional information is copied from doc.
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if pages were inserted succsessfully, false otherwise.

◆ MakeAccessible()

virtual bool PdfDoc::MakeAccessible ( PdfAccessibleParams params,
PdfCancelProc  cancel_proc,
void *  cancel_data 
)
pure virtual

Makes a PDF document accessible.

Parameters
paramsPdfAccessibleParams parameters that control process of making PDF accessible.
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.
Returns
true if successfull, false otherwise.

◆ MovePage()

virtual bool PdfDoc::MovePage ( int  index_to,
int  index_from 
)
pure virtual

Moves one page in a document.

Parameters
index_toThe new location of the page to move.
index_fromThe page number of the page to move.
Returns
true if page was moved succsessfully, false otherwise.

◆ RemoveBookmarks()

virtual void PdfDoc::RemoveBookmarks ( )
pure virtual

Removes all bookmarks from the document.

See also
PdfDoc::CreateBookmarks

◆ RemoveNameTree()

virtual void PdfDoc::RemoveNameTree ( const wchar_t *  name)
pure virtual

Removes the name tree in the Names dictionary with the specified key name it that name exists.

Parameters
nameThe name of requested tree to remove.

◆ RemoveStructTree()

virtual void PdfDoc::RemoveStructTree ( )
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.

See also
PdfDoc::RemoveTags

◆ RemoveTags()

virtual bool PdfDoc::RemoveTags ( PdfCancelProc  cancel_proc,
void *  cancel_data 
)
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.

Parameters
cancel_procCallback to check for canceling operations.
cancel_dataPointer to client data for the cancel procedure.

◆ Save()

virtual bool PdfDoc::Save ( const wchar_t *  path,
PdfSaveFlags  save_flags 
)
pure virtual

Saves a document to the file. NOTE: You must call PdfDoc::Close to release resources.

Parameters
pathAbsolute file path where the document should be saved.
flagsA 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.
Returns
true if document was saved succsessfully, false otherwise.
See also
PdfDoc::Close

◆ SaveToStream()

virtual bool PdfDoc::SaveToStream ( PsStream stream,
PdfSaveFlags  flags 
)
pure virtual

Saves a document to the stream. NOTE: You must call PdfDoc::Close to release resources.

Parameters
streamThe stream to which the file is saved.
flagsA 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.
Returns
true if document was saved succsessfully, false otherwise.
See also
PdfDoc::Close

◆ SetInfo()

virtual bool PdfDoc::SetInfo ( const wchar_t *  key,
const wchar_t *  info 
)
pure virtual

Sets the value of a key in a document's Info dictionary.

Parameters
keyThe name of the Info dictionary key whose value is obtained.
bufferString value to be set for the specific Info dictionary entry.
Returns
true if optaining the font state was succsessfull, false otherwise.

◆ SetLang()

virtual bool PdfDoc::SetLang ( const wchar_t *  lang)
pure virtual

Sets documnent primary language.

Parameters
bufferThe buffer containing document primary buffer
Returns
true if the language was successfully set
See also
PdfDoc::GetLang