![]() |
PDFix SDK
7.2.0
|
#include <pdfix.h>
Public Member Functions | |
virtual bool | Save (const wchar_t *path, PdfSaveFlags save_flags)=0 |
virtual bool | SaveToStream (PsStream *stream, PdfSaveFlags flags)=0 |
virtual int | Close ()=0 |
Closes a document and releases its resources. Changes are not saved. More... | |
virtual bool | Authorize (PdfPermissionLevel perm, PdfGetAuthDataProc callback, void *client_data)=0 |
virtual bool | IsSecured ()=0 |
Gets whether the document is secured or not. This means it contains encryption dictionary. More... | |
virtual bool | SetSecurityHandler (PdfSecurityHandler *handler)=0 |
Set the new security handler to the document which will be used when saving the document. More... | |
virtual PdfSecurityHandler * | GetSecurityHandler ()=0 |
Get the current security handler of the document. More... | |
virtual int | GetNumPages () const =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 PdfBookmark * | CreateBookmarkRoot ()=0 |
virtual bool | ApplyRedaction (PdfCancelProc cancel_proc, void *cancel_data)=0 |
Apply redaction annotations to the document content. More... | |
virtual int | GetNumAlternates () const =0 |
Gets the number of PDF alternate in the document. More... | |
virtual PdfAlternate * | AcquireAlternate (int index)=0 |
virtual PdsObject * | CreatePdsObject (PdfObjectType type, bool indirect)=0 |
Creates a new PdsObject associated with the specified document. More... | |
virtual bool | AddTags (const PdfTagsParams *tag_params, 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 PdsStream * | GetMetadata ()=0 |
Gets documnent metadata object. More... | |
virtual int | GetLang (wchar_t *buffer, int len) const =0 |
Gets documnent primary language. More... | |
virtual bool | SetLang (const wchar_t *lang)=0 |
Sets documnent primary language. More... | |
virtual bool | EmbedFont (PdfFont *font, bool subset, PdfCancelProc cancel_proc, void *cancel_data)=0 |
Embeds or subsets specified font used in the document. 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 (const PdfAccessibleParams *params, const wchar_t *title, const wchar_t *language, 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 PdsBoolean * | CreateBooleanObject (bool indirect, bool value)=0 |
Create new PdsBoolean 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, float 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, int page_index)=0 |
virtual PdsStream * | CreateXObjectFromPage (PdfPage *page)=0 |
Create new XObject of the type Form from page. More... | |
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 bool | RemoveStructTree ()=0 |
virtual bool | 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 |
virtual bool | 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 PdfBookmark * | GetBookmarkFromObject (PdsObject *bookmark_obj)=0 |
Creates the PdfBookmark object from a PdsObject. More... | |
virtual PdfAction * | GetActionFromObject (PdsObject *action_obj)=0 |
Creates the PdfAction object from a PdsObject. More... | |
virtual PdfAction * | GetActionFromViewDest (PdfViewDestination *dest)=0 |
virtual PdfViewDestination * | GetViewDestinationFromObject (PdsObject *dest_obj)=0 |
Creates the PdfViewDestination object from a PdsObject. More... | |
virtual PdfViewDestination * | CreateViewDestination (int page_num, PdfDestFitType fit_type, const PdfRect *rect, float zoom)=0 |
Creates a new PdfViewDestination object. More... | |
virtual PdsForm * | CreateFormFromObject (PdsStream *stream, PdfMatrix *matrix)=0 |
Create the PdsForm object from a PdsStream. More... | |
virtual PdfAction * | CreateAction (PdfActionType type)=0 |
Create new PdfAction object. More... | |
virtual PdsContent * | CreateContent ()=0 |
Create new PdsContent object. More... | |
virtual PdfColorSpace * | CreateColorSpace (PdfColorSpaceFamily cs_family)=0 |
Create new PdfColorSpace object. More... | |
virtual PdfFont * | CreateFont (PsSysFont *sys_font, PdfFontCharset charset, PdfFontCreateFlags flags)=0 |
Create new PdfFont object. More... | |
virtual PdfDocUndo * | CreateUndo (const wchar_t *title, void *client_data)=0 |
Create new PdfDocUndo object and push it to the edn of the document's undo stack. More... | |
virtual int | GetNumUndos () const =0 |
Get the number of available document's PdfDocUndo objects in undo stack. More... | |
virtual PdfDocUndo * | GetUndo (int index)=0 |
Get the PdfDocUndo objects in undo stack by index. More... | |
virtual bool | ClearUndos (int index)=0 |
Clear document's undo stack. More... | |
virtual int | GetNumRedos () const =0 |
Get the number of available document's PdfDocUndo objects in redo stack. More... | |
virtual PdfDocUndo * | GetRedo (int index)=0 |
Get the PdfDocUndo objects in undo stack by index. More... | |
virtual bool | ClearRedos (int count)=0 |
Clear document's redo stack. More... | |
virtual PdfDocFlags | GetFlags ()=0 |
Get the document flags. More... | |
virtual bool | ClearFlags ()=0 |
Clears the document flags. This method marks a modified document as clean. More... | |
virtual PdfUserPermissionFlags | GetUserPermissions ()=0 |
Get the document user permissions. More... | |
virtual int | GetVersion ()=0 |
Get the document's PDF version. For example value for PDF version 1.2 is 12. More... | |
virtual bool | SetVersion (int version)=0 |
Set the document's PDF version. For example value for PDF version 1.2 is 12. More... | |
virtual PdfStandardFlags | GetPdfStandard ()=0 |
Gets the document's PDF compliance level with PDF standards. More... | |
virtual bool | SetPdfStandard (PdfStandardFlags flags)=0 |
virtual PdfHtmlConversion * | CreateHtmlConversion ()=0 |
virtual PdfJsonConversion * | CreateJsonConversion ()=0 |
virtual PdfTiffConversion * | CreateTiffConversion ()=0 |
virtual PsCommand * | GetCommand ()=0 |
Creates a PsCommand object. More... | |
virtual PdfEnumResultType | EnumAnnots (int page_num, PdfAnnotEnumProc proc, PdfCancelProc cancel_proc, void *cancel_data, void *client_data, PdfEnumFlags flags)=0 |
virtual PdfEnumResultType | EnumPageObjects (PdsContent *content, PdfPageObjectEnumProc proc, PdfCancelProc cancel_proc, void *cancel_data, void *client_data, PdfEnumFlags flags)=0 |
virtual PdfEnumResultType | EnumStructTree (PdsStructElement *structElem, PdfStructElemEnumProc proc, PdfCancelProc cancel_proc, void *cancel_data, void *client_data, PdfEnumFlags flags)=0 |
|
pure virtual |
Gets the PDF alternate based on it's index. NOTE: Acquisition of the alternate increments document reference count.
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. NOTE: Acquisition of the page increments document reference count.
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.
tag_params | PdfTagsParams structure definiing the tagattributes or null to use default settings; |
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 |
Apply redaction annotations to the document content.
TODO: PdfRedactionParams* params
|
pure virtual |
Authorize/Unlock the secured document. This should be called after opening the document without
perm | level of permission (user/owner) |
callback | to get the required authorization data that will be set to a security handler |
data | additional user supplied data that will be passed to the callback |
|
pure virtual |
Clears the document flags. This method marks a modified document as clean.
|
pure virtual |
Clear document's redo stack.
count | The number of the entries to keep in redo stack. |
|
pure virtual |
Clear document's undo stack.
count | The number of the entries to keep in undo stack. |
|
pure virtual |
Closes a document and releases its resources. Changes are not saved.
|
pure virtual |
Create new PdfAction object.
type | The PdfActiontype which should be created. |
|
pure virtual |
|
pure virtual |
Creates the abstract root of the document's bookmark tree if does not exist. This bookmark has no representation in PDF, it only holds top level of document's bookmarks. NOTE: Call only PdfBookmark::GetNumChildren and PdfBookmark::GetChild PdfBookmark::AddNewChild methods for this bookmark. Other methods return false.
|
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 PdsBoolean object.
indirect | if true the methods indorect object otherwise a direct object. |
value | the value to be set to an object. |
|
pure virtual |
Create new PdfColorSpace object.
cs_family | Color space family of the color space to be created. The family must be one of the following: kColorSpaceDeviceCMYK, kColorSpaceDeviceGray, or kColorSpaceDeviceRGB. |
|
pure virtual |
Create new PdsContent object.
|
pure virtual |
Create new PdsDictionary object.
indirect | if true the method creates indorect object otherwise a direct object. |
|
pure virtual |
Create new PdfFont object.
sys_font | System font from which PdfFont will eb created. See Pdfix::FindSysFont |
charset | Charset of the font kFontAnsiCharset. |
flags | Currently only kFontCreateNormal is supported. |
|
pure virtual |
Creates a HTML conversion from PdfDoc. NOTE: You must call PdfConversion::Destroy once for every successful create.
|
pure virtual |
|
pure virtual |
Creates a JSON conversion from PdfDoc. NOTE: You must call PdfConversion::Destroy once for every successful create.
|
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. NOTE: Acquisition of the page increments document reference count.
index | Where to add the page. Passing a value of kInsertAfterLast adds the page to the end. Passing a value of kInsertBeforeFirst 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 |
Creates a TIFF document from PdfDoc. NOTE: You must call PdfConversion::Destroy once for every successful create.
|
pure virtual |
Create new PdfDocUndo object and push it to the edn of the document's undo stack.
title | the display name of the undo |
|
pure virtual |
Creates a new PdfViewDestination object.
page_num | A number of the destination page. |
fit_type | The destination fit type. |
rect | A pointer to an PdfRect strucutre specifying the destination rectangle, specified in user space coordinates. |
zoom | The zoom factor to set for the destination. Used only if fit_type is PdfDestFitType::kDestFitXYZ. |
|
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 |
page_index | Index of the page in the image file. Default value is 0 for single page images. |
Create new XObject of the type Form from page.
page | The page to convert to Form |
|
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 specified font used in the document.
font | Font to subest, has to be 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 |
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 |
Creates a new action that takes the user to the specified destination view. This method can only be used for destinations in the same document as the source document.
dest | The destination view. |
|
pure virtual |
Creates the PdfBookmark object from a PdsObject.
bookmark_obj | The bookmark object from which the action will be obtained. |
|
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 PdfBookmark::AddNewChild 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 |
Creates a PsCommand object.
|
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 |
Get the document flags.
|
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 object.
|
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 number of available document's PdfDocUndo objects in redo stack.
|
pure virtual |
Get the number of available document's PdfDocUndo objects in undo stack.
|
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's PDF compliance level with PDF standards.
|
pure virtual |
Get the PdfDocUndo objects in undo stack by index.
index | The index of the undo object in redo stack. |
|
pure virtual |
Gets the document catalog dictionary which is a Root entry.
|
pure virtual |
Get the current security handler of the document.
|
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 |
Get the PdfDocUndo objects in undo stack by index.
index | The index of the undo object in undo stack. |
|
pure virtual |
Get the document user permissions.
|
pure virtual |
Get the document's PDF version. For example value for PDF version 1.2 is 12.
|
pure virtual |
Creates 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 |
Gets whether the document is secured or not. This means it contains encryption dictionary.
|
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 |
|
pure virtual |
Sets the document's PDF compliance level with PDF standards. Method only updates the document metadata according to the specified standard.
flags | The number of the document version to set. |
|
pure virtual |
Set the new security handler to the document which will be used when saving the document.
handler | new security handler associated with the document |
|
pure virtual |
Set the document's PDF version. For example value for PDF version 1.2 is 12.
version | The number of the document version to set. |