PDFIOS.h
IntroductionUse the links in the table of contents to the left to access the documentation. Functions
Document_addOutlineChildinsert outline as first child of this Outline. a premium license is needed for this method. bool Document_addOutlineChild( PDF_DOC doc, PDF_OUTLINE outlinenode, const char *label, int pageno, float top); ParametersReturn Valuetrue or false Document_addOutlineNextinsert outline after of this Outline. a premium license is needed for this method. bool Document_addOutlineNext( PDF_DOC doc, PDF_OUTLINE outlinenode, const char *label, int pageno, float top); ParametersReturn Valuetrue or false Document_canSaveis Document editable? bool Document_canSave( PDF_DOC doc ); ParametersReturn Valuetrue or false Document_closeclose document. void Document_close( PDF_DOC doc ); ParametersDocument_createcreate document and return Document object. * * PDF_DOC Document_create( const char *path, PDF_ERR *err ); ParametersReturn ValueNULL if failed, and developers should check err code for some reason. otherwize return Document object. Document_encryptAsencrypt PDF file as another file. this function need premium license. bool Document_encryptAs( PDF_DOC doc, NSString *dst, NSString *upswd, NSString *opswd, int perm, int method, unsigned char *fid); ParametersReturn Valuetrue or false. Document_getFontAscentget font ascent float Document_getFontAscent( PDF_DOC doc, PDF_DOC_FONT font ); ParametersReturn Value<#return value description#> Document_getFontDescentget font descent float Document_getFontDescent( PDF_DOC doc, PDF_DOC_FONT font ); ParametersReturn Value<#return value description#> Document_getMetaget meta data by tag. int Document_getMeta( PDF_DOC doc, const char *tag, char *meta, int len ); ParametersReturn Valuelength of meta data. Document_getOutlineChildget first child Outline item. * * PDF_OUTLINE Document_getOutlineChild( PDF_DOC doc, PDF_OUTLINE outlinenode); ParametersReturn ValueRoot Outline item if outlinenode == NULL. return NULL if no children. Document_getOutlineDestGet destination of Outline item. int Document_getOutlineDest( PDF_DOC doc, PDF_OUTLINE outlinenode ); ParametersReturn Value0 based page NO. Document_getOutlineLabelGet title of outline item. int Document_getOutlineLabel( PDF_DOC doc, PDF_OUTLINE outlinenode, char *label, int len); ParametersReturn Valuelength of label. Document_getOutlineNextget next Outline item. * * PDF_OUTLINE Document_getOutlineNext( PDF_DOC doc, PDF_OUTLINE outlinenode); ParametersReturn ValueRoot Outline item if outlinenode == NULL. return NULL if no next item. Document_getPageget page object by page NO. PDF_PAGE Document_getPage( PDF_DOC doc, int pageno ); ParametersReturn Valuepage object. Document_getPageCountget page count. int Document_getPageCount( PDF_DOC doc ); ParametersReturn Valuecount of pages. Document_getPageHeightget page height. float Document_getPageHeight( PDF_DOC doc, int pageno ); ParametersReturn Valueheight of page. Document_getPageWidthget page width. float Document_getPageWidth( PDF_DOC doc, int pageno ); ParametersReturn Valuewidth of page Document_getPermissionget permission of PDF, this value defined in PDF reference 1.7 int Document_getPermission( PDF_DOC doc ); ParametersReturn Valuepermission flags bit 1-2 reserved bit 3(0x4) print bit 4(0x8) modify bit 5(0x10) extract text or image others: see PDF reference Document_importEnddestroy context object a premium license is needed for this method. void Document_importEnd( PDF_DOC doc, PDF_IMPORTCTX ctx ); ParametersDocument_importPageimport 1 page from source document a premium license is needed for this method. bool Document_importPage( PDF_DOC doc, PDF_IMPORTCTX ctx, int srcno, int dstno ); ParametersReturn Valuetrue or false. Document_importStartcreate an import context. a premium license is needed for this method. PDF_IMPORTCTX Document_importStart( PDF_DOC doc, PDF_DOC doc_src ); ParametersReturn Valuecontext object or NULL. Document_isEncryptedis document encrypted? bool Document_isEncrypted( PDF_DOC doc ); ParametersReturn Valuetrue or false. Document_movePagemove page by page NO. a premium license is needed for this method. bool Document_movePage( PDF_DOC doc, int pageno1, int pageno2 ); ParametersReturn Valuetrue or false Document_newFontCIDcreate a font object, used to write texts. * a premium license is needed for this method. * * PDF_DOC_FONT Document_newFontCID( PDF_DOC doc, const char *name, int style ); ParametersReturn ValueDocFont object or null is failed. Document_newGStatecreate a ExtGraphicState object, used to set alpha values. a premium license is needed for this method. PDF_DOC_GSTATE Document_newGState( PDF_DOC doc ); ParametersReturn ValuePDF_DOC_GSTATE objecet or NULL is failed. Document_newImageJPEGcreate an image from JPEG/JPG file. supported image color space: --GRAY --RGB --CMYK a premium license is needed for this method. PDF_DOC_IMAGE Document_newImageJPEG( PDF_DOC doc, const char *path ); ParametersReturn ValueDocImage object or null. Document_newImageJPXcreate an image from JPX/JPEG 2k file. a premium license is needed for this method. PDF_DOC_IMAGE Document_newImageJPX( PDF_DOC doc, const char *path ); ParametersReturn ValueDocImage object or null. Document_newPageinsert a page to Document if pagheno >= page_count, it do same as append. otherwise, insert to pageno. a premium license is needed for this method. PDF_PAGE Document_newPage( PDF_DOC doc, int pageno, float w, float h ); ParametersReturn ValuePage object or null means failed. Document_openopen document and return Document object. * * PDF_DOC Document_open( const char *path, const char *password, PDF_ERR *err ); ParametersReturn ValueNULL if failed, and developers should check err code for some reason. otherwize return Document object. Document_removeOutlineremove Outline bool Document_removeOutline( PDF_DOC doc, PDF_OUTLINE outlinenode); ParametersReturn Valuetrue or false Document_removePageremove page by page NO. a premium license is needed for this method. bool Document_removePage( PDF_DOC doc, int pageno ); ParametersReturn Valuetrue or false Document_savesave PDF file. bool Document_save( PDF_DOC doc ); ParametersReturn Valuetrue or false. Document_saveAssave PDF file as another file. this function remove all encrypt information and save to dst. * * bool Document_saveAs( PDF_DOC doc, const char *dst, bool rem_sec ); ParametersReturn Valuetrue or false. Document_setCacheset cache file for the document object. bool Document_setCache( PDF_DOC doc, const char *cache_file ); ParametersReturn Valuetrue or false. Document_setGStateFillAlphaset GraphicState object fill alpha bool Document_setGStateFillAlpha( PDF_DOC doc, PDF_DOC_GSTATE state, int alpha ); ParametersReturn Valuetrue or false Document_setGStateStrokeAlphaset GraphicState object stroke alpha bool Document_setGStateStrokeAlpha( PDF_DOC doc, PDF_DOC_GSTATE state, int alpha ); ParametersReturn Valuetrue or false Global_activePremiumActive Premium license, this type of license can do some viewing and editing and form editing. bool Global_activePremium( const char *name, const char *company, const char *mail, const char *serial ); ParametersReturn Valuetrue or false. Global_activeProfessionActive Professional license, this type of license can do some viewing and editing. bool Global_activeProfession( const char *name, const char *company, const char *mail, const char *serial ); ParametersReturn Valuetrue or false. Global_activeStandardActive Standard license, this type of license can view PDF only. bool Global_activeStandard( const char *name, const char *company, const char *mail, const char *serial ); ParametersReturn Valuetrue or false. Global_dibFreedelete DIB object void Global_dibFree( PDF_DIB dib ); ParametersGlobal_dibGetalloc or realloc DIB object. PDF_DIB Global_dibGet( PDF_DIB dib, int width, int height ); ParametersReturn ValueDIB object. Global_dibGetDataGet dib data,return pointer of dib object void *Global_dibGetData( PDF_DIB dib ); ParametersGlobal_dibGetHeightGet dib object's height int Global_dibGetHeight( PDF_DIB dib ); ParametersReturn ValueDIB object's height Global_dibGetWidthGet dib object's width int Global_dibGetWidth( PDF_DIB dib ); ParametersReturn ValueDIB object's width Global_drawScrollnot used for developer void Global_drawScroll( PDF_DIB dst, PDF_DIB dib1, PDF_DIB dib2, int x, int y, int style ); Global_fontfileListAddadd font file to list. void Global_fontfileListAdd( const char *font_file ); ParametersGlobal_fontfileListEndsubmit font list to PDF library. void Global_fontfileListEnd(); Global_fontfileListStartcreate font list void Global_fontfileListStart(); Global_getFaceCountGet face count. this function valid after Global_fontfileListEnd() invoked. * * int Global_getFaceCount(); Return Valueface count Global_getFaceNameget face name by index. this function valid after Global_fontfileListEnd() invoked. * * const char *Global_getFaceName( int index ); ParametersReturn Valueface name. Global_loadStdFontLoad font file. void Global_loadStdFont( int index, const char *path ); ParametersDiscussion* Global_SaveFontSave system font to a file. bool Global_SaveFont( const char *fname, const char *save_file ); ParametersReturn Valuetrue or false Global_setAnnotFontSet annot font type bool Global_setAnnotFont( const char *font_name ); ParametersReturn Valuetrue or false Global_setAnnotTransparencyset annot transparency void Global_setAnnotTransparency( int color ); ParametersGlobal_setCMapsPathload cmaps data. cmaps is code mapping struct. * * void Global_setCMapsPath( const char *cmaps, const char *umaps ); ParametersGlobal_setDefaultFontSet default font. the default font may be used when PDF has font not embed. this function valid after Global_fontfileListEnd() invoked. * * bool Global_setDefaultFont( const char *collection, const char *font_name, bool fixed ); ParametersReturn Valuetrue or false Global_toDIBPointmap PDF Point to DIB point. void Global_toDIBPoint( PDF_MATRIX matrix, const PDF_POINT *ppoint, PDF_POINT *dpoint ); ParametersGlobal_toDIBRectmap PDF rect to DIB rect. void Global_toDIBRect( PDF_MATRIX matrix, const PDF_RECT *prect, PDF_RECT *drect ); ParametersGlobal_toPDFPointmap DIB Point to PDF point. void Global_toPDFPoint( PDF_MATRIX matrix, const PDF_POINT *dpoint, PDF_POINT *ppoint ); ParametersGlobal_toPDFRectmap DIB Rect to PDF Rect. void Global_toPDFRect( PDF_MATRIX matrix, const PDF_RECT *drect, PDF_RECT *prect ); ParametersGlobal_unloadStdFontUnload font file. void Global_unloadStdFont( int index ); ParametersInk_createcreate ink object for hand-writing PDF_INK Ink_create( float line_w, int color ); ParametersReturn ValueInk object Ink_destroydestroy Ink object void Ink_destroy( PDF_INK ink ); ParametersInk_getNodeget node by index * * int Ink_getNode( PDF_INK hand, int index, PDF_POINT *pt ); ParametersReturn Valuetype of node: 0: move to 1: line to 2: cubic bezier to. Ink_getNodeCountget node count for ink. int Ink_getNodeCount( PDF_INK ink ); ParametersReturn Valuenodes count Ink_onDowninvoked when touch-down. void Ink_onDown( PDF_INK ink, float x, float y ); ParametersInk_onMoveinvoked when touch-moving. void Ink_onMove( PDF_INK ink, float x, float y ); ParametersInk_onUpinvoked when touch-up. void Ink_onUp( PDF_INK ink, float x, float y ); ParametersMatrix_createcreate a Matrix object PDF_MATRIX Matrix_create( float xx, float yx, float xy, float yy, float x0, float y0 ); ParametersReturn ValueMatrix object Matrix_createScalecreate a Matrix object for scale values. PDF_MATRIX Matrix_createScale( float scalex, float scaley, float x0, float y0 ); ParametersReturn ValueMatrix object Matrix_destroyfree Matrix object void Matrix_destroy( PDF_MATRIX matrix ); ParametersPage_addAnnotAttachmentadd a file as an attachment to page. you should re-render page to display modified data. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version bool Page_addAnnotAttachment( PDF_PAGE page, const char *path, int icon, const PDF_RECT *rect ); ParametersReturn Valuetrue or false Page_addAnnotBitmapadd bitmap annotation to page to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_addAnnotBitmap( PDF_PAGE page, PDF_MATRIX matrix, CGImageRef bitmap, bool has_alpha, const PDF_RECT *rect ); ParametersReturn Valuetrue or false Page_addAnnotEditboxadd an edit-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_addAnnotEditbox( PDF_PAGE page, PDF_MATRIX matrix, const PDF_RECT *rect, int line_clr, float line_w, int fill_clr, float tsize, int text_clr ); ParametersReturn Valuetrue or false Page_addAnnotEditbox2add an edit-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_addAnnotEditbox2( PDF_PAGE page, const PDF_RECT *rect, int line_clr, float line_w, int fill_clr, float tsize, int text_clr ); ParametersReturn Valuetrue or false Page_addAnnotEllipseadd ellipse annotation to page. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_addAnnotEllipse( PDF_PAGE page, PDF_MATRIX matrix, const PDF_RECT *rect, float width, int color, int icolor ); ParametersReturn Valuetrue or false Page_addAnnotEllipse2add ellipse annotation to page. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_addAnnotEllipse2( PDF_PAGE page, const PDF_RECT *rect, float width, int color, int icolor ); ParametersReturn Valuetrue or false Page_addAnnotGotoadd goto-page link to page. * you should re-render page to display modified data. * this can be invoked after ObjsStart or Render or RenderToBmp. * this method valid in professional or premium version bool Page_addAnnotGoto( PDF_PAGE page, PDF_MATRIX matrix, const PDF_RECT *rect, int pageno, float top ); ParametersReturn Valuetrue or false Discussion* * Page_addAnnotGoto2add goto-page link to page. * you should re-render page to display modified data. * this can be invoked after ObjsStart or Render or RenderToBmp. * this method valid in professional or premium version bool Page_addAnnotGoto2( PDF_PAGE page, const PDF_RECT *rect, int pageno, float top ); ParametersReturn Valuetrue or false Discussion* * Page_addAnnotInkadd ink annotation to page. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_addAnnotInk( PDF_PAGE page, PDF_MATRIX matrix, PDF_INK hand, float orgx, float orgy ); ParametersReturn Valuetrue or false. Page_addAnnotInk2add ink annotation to page. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_addAnnotInk2( PDF_PAGE page, PDF_INK hand ); ParametersReturn Valuetrue or false. Page_addAnnotLineadd line to page. you should re-render page to display modified data. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version bool Page_addAnnotLine( PDF_PAGE page, PDF_MATRIX matrix, const PDF_POINT *pt1, const PDF_POINT *pt2, int style1, int style2, float width, int color, int icolor ); Parameters
Return Valuetrue or false Page_addAnnotLine2add line to page. you should re-render page to display modified data. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version bool Page_addAnnotLine2( PDF_PAGE page, const PDF_POINT *pt1, const PDF_POINT *pt2, int style1, int style2, float width, int color, int icolor ); Parameters
Return Valuetrue or false Page_addAnnotMarkup2add a text-markup annotation to page. you should re-render page to display modified data. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version bool Page_addAnnotMarkup2( PDF_PAGE page, int index1, int index2, int color, int type ); ParametersReturn Valuetrue or false Page_addAnnotRectadd rect annotation to page. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_addAnnotRect( PDF_PAGE page, PDF_MATRIX matrix, const PDF_RECT *rect, float width, int color, int icolor ); ParametersReturn Valuetrue or false Page_addAnnotRect2add rect annotation to page. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_addAnnotRect2( PDF_PAGE page, const PDF_RECT *rect, float width, int color, int icolor ); ParametersReturn Valuetrue or false Page_addAnnotStampadd an Rubber Stamp to page. you should re-render page to display modified data. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version bool Page_addAnnotStamp( PDF_PAGE page, const PDF_RECT *rect, int icon ); Parameters
Return Valuetrue or false. the added annotation can be obtained by Page.GetAnnot(Page.GetAnnotCount() - 1), if this method return true. Page_addAnnotTextadd popup text annotation to page. shows as an text note icon. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data * * bool Page_addAnnotText( PDF_PAGE page, PDF_MATRIX matrix, float x, float y ); ParametersReturn Valuetrue or false Page_addAnnotText2add popup text annotation to page. shows as an text note icon. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data * * bool Page_addAnnotText2( PDF_PAGE page, float x, float y ); ParametersReturn Valuetrue or false Page_addAnnotUriadd URL link to page. you should re-render page to display modified data. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version bool Page_addAnnotUri( PDF_PAGE page, PDF_MATRIX matrix, const PDF_RECT *rect, const char *uri ); ParametersReturn Valuetrue or false Page_addAnnotURI2add URL link to page. you should re-render page to display modified data. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version bool Page_addAnnotURI2( PDF_PAGE page, const PDF_RECT *rect, const char *uri ); ParametersReturn Valuetrue or false Page_addBitmapadd bitmap annotation to page to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data * * bool Page_addBitmap( PDF_PAGE page, PDF_MATRIX matrix, CGImageRef bitmap, bool has_alpha, const PDF_RECT *rect ); ParametersReturn Valuetrue or false Page_addContentadd content stream to this page. a premium license is needed for this method. bool Page_addContent( PDF_PAGE page, PDF_PAGECONTENT content, bool flush ); ParametersReturn Valuetrue or false Page_addResFontadd a font as resource of this page. a premium license is needed for this method. PDF_PAGE_FONT Page_addResFont( PDF_PAGE page, PDF_DOC_FONT font ); ParametersReturn ValuePDF_PAGE_FONT object or null means failed Page_addResGStateadd GraphicState as resource of this page. a premium license is needed for this method. PDF_PAGE_GSTATE Page_addResGState( PDF_PAGE page, PDF_DOC_GSTATE gstate ); ParametersReturn Valuenull means failed. Page_addResImageadd an image as resource of this page. a premium license is needed for this method. PDF_PAGE_IMAGE Page_addResImage( PDF_PAGE page, PDF_DOC_IMAGE image ); ParametersReturn Valuenull means failed. Page_closeclose page. void Page_close( PDF_PAGE page ); ParametersPage_findCloseclose finder to invoke this function, developers should call Page_objsStart before. * * void Page_findClose( PDF_FINDER finder ); ParametersPage_findGetCounthow many found? to invoke this function, developers should call Page_objsStart before. * * int Page_findGetCount( PDF_FINDER finder ); ParametersReturn Value0 if no found, otherwise, count of founds. Page_findGetFirstCharget char index in page, by find index. to invoke this function, developers should call Page_objsStart before. * * int Page_findGetFirstChar( PDF_FINDER finder, int index ); ParametersReturn Valuechar index in page, range: [0, Page_objsGetCharCount() - 1]. Page_findOpenopen a finder object. to invoke this function, developers should call Page_objsStart before. * * PDF_FINDER Page_findOpen( PDF_PAGE page, const char *str, bool match_case, bool whole_word ); ParametersReturn Valuefinder object ot NULL if not found. Page_getAnnotget annotation by index. to invoke this function, developers should call Page_objsStart or Page_render before. * * PDF_ANNOT Page_getAnnot( PDF_PAGE page, int index ); ParametersReturn Valueannotation object or NULL. Page_getAnnot3Dget annotation's 3D play action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * int Page_getAnnot3D( PDF_PAGE page, PDF_ANNOT annot, char *f3d, int len ); ParametersReturn Valuelength of f3d, or 0. Page_getAnnot3DDataget data of annotation's 3D open action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * * bool Page_getAnnot3DData( PDF_PAGE page, PDF_ANNOT annot, const char *path ); ParametersReturn Valuetrue or false. Page_getAnnotAttachmentget annotation's attachment open action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * * int Page_getAnnotAttachment( PDF_PAGE page, PDF_ANNOT annot, char *att, int len ); ParametersReturn Valuelength of att, or 0. Page_getAnnotAttachmentDataget data of annotation's attachment open action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * * bool Page_getAnnotAttachmentData( PDF_PAGE page, PDF_ANNOT annot, const char *path ); ParametersReturn Valuetrue or false. Page_getAnnotCheckStatusget radio or check-box check status. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * int Page_getAnnotCheckStatus( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Value-1 if annotation is not valid control. 0 if check-box is not checked. 1 if check-box checked. 2 if radio-box is not checked. 3 if radio-box checked. Page_getAnnotComboItemget item text by index. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_getAnnotComboItem( PDF_PAGE page, PDF_ANNOT annot, int item, char *val, int len ); ParametersReturn Valuetrue or false Page_getAnnotComboItemCountget items count in combo-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * int Page_getAnnotComboItemCount( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Value-1: this is not combo. otherwise: items count. Page_getAnnotComboItemSelget index of selected item. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * int Page_getAnnotComboItemSel( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valueitem index selected. Page_getAnnotCountget count of annotations. to invoke this function, developers should call Page_objsStart or Page_render before. * * int Page_getAnnotCount( PDF_PAGE page ); ParametersReturn Valuecount of annotations. Page_getAnnotDestget annotation's goto page action. to invoke this function, developers should call Page_objsStart or Page_render before. * * int Page_getAnnotDest( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Value-1 if failed or 0 based page NO. Page_getAnnotEditTextget text of edit-box, may either for free-text annotation and widget annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_getAnnotEditText( PDF_PAGE page, PDF_ANNOT annot, char *text, int len ); ParametersReturn Valuetrue or false Page_getAnnotEditTextRectget rect area of edit-box, may either for free-text annotation and widget annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_getAnnotEditTextRect( PDF_PAGE page, PDF_ANNOT annot, PDF_RECT *rect ); ParametersReturn Valuetrue or false. Page_getAnnotEditTextSizeget text size of edit-box, may either for free-text annotation and widget annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * float Page_getAnnotEditTextSize( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetext size in PDF coordinate. Page_getAnnotEditTypeget type of edit-box, may either in free-text annotation and widget annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * int Page_getAnnotEditType( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Value-1: this annotation is not text-box. 1: normal single line. 2: password. 3: MultiLine edit area. Page_getAnnotFieldFullNameget field full name of this annotation. a premium license is needed for this function. int Page_getAnnotFieldFullName( PDF_PAGE page, PDF_ANNOT annot, char *buf, int buf_size ); ParametersReturn Valuename of this annotation, like: "form1.EditBox1" Page_getAnnotFieldFullName2get field full name of this annotation with more details. a premium license is needed for this function. int Page_getAnnotFieldFullName2( PDF_PAGE page, PDF_ANNOT annot, char *buf, int buf_size ); ParametersReturn Valuename of this annotation, like: "form1[0].EditBox1[0]" Page_getAnnotFieldNameget field name of this annotation. a premium license is needed for this function. int Page_getAnnotFieldName( PDF_PAGE page, PDF_ANNOT annot, char *buf, int buf_size ); ParametersReturn Valuename of this annotation, like: "EditBox1[0]" Page_getAnnotFieldTypeget annotation field type in acroForm. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in premium version int Page_getAnnotFieldType( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetype as these values: 0: unknown 1: button field 2: text field 3: choice field 4: signature field Page_getAnnotFillColorget annotation fill color int Page_getAnnotFillColor( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn ValueRGB color Page_getAnnotFromPointget annotation by point. to invoke this function, developers should call Page_objsStart or Page_render before. * * PDF_ANNOT Page_getAnnotFromPoint( PDF_PAGE page, float x, float y ); ParametersReturn Valueannotation object or NULL. Page_getAnnotIconget icon value for sticky text note/file attachment/Rubber Stamp annotation. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version int Page_getAnnotIcon( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valueicon value depends on annotation type. For sticky text note: 0: Note 1: Comment 2: Key 3: Help 4: NewParagraph 5: Paragraph 6: Insert 7: Check 8: Circle 9: Cross For file attachment: 0: PushPin 1: Graph 2: Paperclip 3: Tag For Rubber Stamp: 0: "Draft"(default icon) 1: "Approved" 2: "Experimental" 3: "NotApproved" 4: "AsIs" 5: "Expired" 6: "NotForPublicRelease" 7: "Confidential" 8: "Final" 9: "Sold" 10: "Departmental" 11: "ForComment" 12: "TopSecret" 13: "ForPublicRelease" 14: "Accepted" 15: "Rejected" 16: "Witness" 17: "InitialHere" 18: "SignHere" 19: "Void" 20: "Completed" 21: "PreliminaryResults" 22: "InformationOnly" 23: "End" Page_getAnnotListItemget item text by index. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_getAnnotListItem( PDF_PAGE page, PDF_ANNOT annot, int item, char *buf, int buf_len ); ParametersReturn Valuetrue or false Page_getAnnotListItemCountget items count in list-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * int Page_getAnnotListItemCount( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Value-1: this is not list-box. otherwise: items count. Page_getAnnotListSelsget selected items of list-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * int Page_getAnnotListSels( PDF_PAGE page, PDF_ANNOT annot, int *sels, int sels_max ); ParametersReturn Valuethe count that filled in int array. Page_getAnnotMovieget annotation's movie play action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * * int Page_getAnnotMovie( PDF_PAGE page, PDF_ANNOT annot, char *mov, int len ); ParametersReturn Valuelength of mov, or 0. Page_getAnnotMovieDataget data of annotation's movie open action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * * bool Page_getAnnotMovieData( PDF_PAGE page, PDF_ANNOT annot, const char *path ); ParametersReturn Valuetrue or false. Page_getAnnotPopupLabelget text of popup label annotation. to invoke this function, developers should call Page_objsStart or Page_render before. * * bool Page_getAnnotPopupLabel( PDF_PAGE page, PDF_ANNOT annot, char *text, int len ); ParametersReturn Valuetrue or false. Page_getAnnotPopupSubjectget subject of popup text annotation. to invoke this function, developers should call Page_objsStart or Page_render before. * * bool Page_getAnnotPopupSubject( PDF_PAGE page, PDF_ANNOT annot, char *subj, int len ); ParametersReturn Valuetrue or false. Page_getAnnotPopupTextget text of popup text annotation. to invoke this function, developers should call Page_objsStart or Page_render before. * * bool Page_getAnnotPopupText( PDF_PAGE page, PDF_ANNOT annot, char *text, int len ); ParametersReturn Valuetrue or false. Page_getAnnotRectget annotation rect. to invoke this function, developers should call Page_objsStart or Page_render before. * * void Page_getAnnotRect( PDF_PAGE page, PDF_ANNOT annot, PDF_RECT *rect ); ParametersPage_getAnnotResetis this annotation reset button? to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_getAnnotReset( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetrue or false. Page_getAnnotSoundget annotation's audio play action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * * int Page_getAnnotSound( PDF_PAGE page, PDF_ANNOT annot, char *snd, int len ); ParametersReturn Valuelength of snd, or 0. Page_getAnnotSoundDataget data of annotation's Audio open action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. * * bool Page_getAnnotSoundData( PDF_PAGE page, PDF_ANNOT annot, int *paras, const char *path ); ParametersReturn Valuetrue or false. Page_getAnnotStrokeColorget annotation stroke color int Page_getAnnotStrokeColor( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn ValueRGB color Page_getAnnotStrokeWidthget annot stroke width float Page_getAnnotStrokeWidth( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuestroke width Page_getAnnotSubmitParaget submit parameters. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_getAnnotSubmitPara( PDF_PAGE page, PDF_ANNOT annot, char *para, int len ); ParametersReturn Valuetrue or false. Page_getAnnotSubmitTargetget submit target link. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_getAnnotSubmitTarget( PDF_PAGE page, PDF_ANNOT annot, char *tar, int len ); ParametersReturn Valuetrue or false. Page_getAnnotTypeget annotation type. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version int Page_getAnnotType( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetype as these values: 0: unknown 1: text 2: link 3: free text 4: line 5: square 6: circle 7: polygon 8: polyline 9: text hilight 10: text under line 11: text squiggly 12: text strikeout 13: stamp 14: caret 15: ink 16: popup 17: file attachment 18: sound 19: movie 20: widget 21: screen 22: print mark 23: trap net 24: water mark 25: 3d object 26: rich media Page_getAnnotURIget annotation's goto URI action. to invoke this function, developers should call Page_objsStart or Page_render before. * * int Page_getAnnotURI( PDF_PAGE page, PDF_ANNOT annot, char *uri, int len ); ParametersReturn Valuelength of uri, or 0. Page_isAnnotHideis annotation hided? bool Page_isAnnotHide( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetrue or false Page_isAnnotLockedis annotation locked? to invoke this function, developers should call Page_objsStart or Page_render before. bool Page_isAnnotLocked( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetrue or false. Page_isAnnotLockedContentis annotation locked? to invoke this function, developers should call Page_objsStart or Page_render before. bool Page_isAnnotLockedContent( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetrue or false. Page_objsAlignWordget index aligned by word. this can be invoked after ObjsStart int Page_objsAlignWord( PDF_PAGE page, int from, int dir ); ParametersReturn Valuenew index value. Page_objsGetCharCountget chars count. to invoke this function, developers should call Page_objsStart before. * int Page_objsGetCharCount( PDF_PAGE page ); ParametersReturn Valuecount of chars. Page_objsGetCharFontNameget char's font name. this can be invoked after ObjsStart const char *Page_objsGetCharFontName( PDF_PAGE page, int index ); ParametersReturn Valuefont name, may be null. Page_objsGetCharIndexget char index nearest to point int Page_objsGetCharIndex( PDF_PAGE page, float x, float y ); ParametersReturn Valuechar index or -1 failed. Page_objsGetCharRectget area rect of char. to invoke this function, developers should call Page_objsStart before. * * void Page_objsGetCharRect( PDF_PAGE page, int index, PDF_RECT *rect ); ParametersPage_objsGetStringget string by index range. to invoke this function, developers should call Page_objsStart before. * * int Page_objsGetString( PDF_PAGE page, int from, int to, char *buf, int len ); ParametersReturn Valuecount of chars. Page_objsStartload all objects in page. void Page_objsStart( PDF_PAGE page ); ParametersPage_removeAnnotremove annotation to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_removeAnnot( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetrue or false. Page_renderrender page to dib. bool Page_render( PDF_PAGE page, PDF_DIB dib, PDF_MATRIX matrix, bool show_annots, PDF_RENDER_MODE mode ); ParametersReturn Valuetrue or false. Page_renderCancelcancel render, in mostly, this function called by UI thread, and Page_render called by another thread. void Page_renderCancel( PDF_PAGE page ); ParametersPage_renderIsFinishedcheck if page render finished. bool Page_renderIsFinished( PDF_PAGE page ); ParametersReturn Valuetrue or false. Page_renderPreparereset status and erase wihite for dib. void Page_renderPrepare( PDF_PAGE page, PDF_DIB dib ); ParametersPage_setAnnotCheckValueset value to check-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. you should re-render page to display modified data. * * bool Page_setAnnotCheckValue( PDF_PAGE page, PDF_ANNOT annot, bool check ); ParametersReturn Valuetrue or false. Page_setAnnotComboItemset selected item. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. you should re-render page to display modified data. * * bool Page_setAnnotComboItem( PDF_PAGE page, PDF_ANNOT annot, int item ); ParametersReturn Valuetrue or false. Page_setAnnotEditTextset text of edit-box, may either for free-text annotation and widget annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. you should re-render page to display modified data. * * bool Page_setAnnotEditText( PDF_PAGE page, PDF_ANNOT annot, const char *text ); ParametersReturn Valuetrue or false Page_setAnnotFillColorset annotation fill color bool Page_setAnnotFillColor( PDF_PAGE page, PDF_ANNOT annot, int color ); ParametersReturn Valuetrue or false Page_setAnnotHideset annotation hided void Page_setAnnotHide( PDF_PAGE page, PDF_ANNOT annot, bool hide ); ParametersPage_setAnnotIconset icon for sticky text note/file attachment annotation. this can be invoked after ObjsStart or Render or RenderToBmp. you need render page again to show modified annotation. this method valid in professional or premium version bool Page_setAnnotIcon( PDF_PAGE page, PDF_ANNOT annot, int icon ); Parameters
Return Valuetrue or false Page_setAnnotListSelsset selected items of list-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * * bool Page_setAnnotListSels( PDF_PAGE page, PDF_ANNOT annot, const int *sels, int sels_cnt ); ParametersReturn Valuethe count that filled in int array. Page_setAnnotPopupLabelset text of popup label annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_setAnnotPopupLabel( PDF_PAGE page, PDF_ANNOT annot, const char *text ); ParametersReturn Valuetrue or false Page_setAnnotPopupSubjectset subject of popup text annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_setAnnotPopupSubject( PDF_PAGE page, PDF_ANNOT annot, const char *subj ); ParametersReturn Valuetrue or false Page_setAnnotPopupTextset text of popup text annotation. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in professional or premium license. you should re-render page to display modified data. * * bool Page_setAnnotPopupText( PDF_PAGE page, PDF_ANNOT annot, const char *text ); ParametersReturn Valuetrue or false Page_setAnnotRadioset value to radio-box, and deselect all other radio-box in radio-group. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. you should re-render page to display modified data. * * bool Page_setAnnotRadio( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetrue or false. Page_setAnnotRectset annotation rect. to invoke this function, developers should call Page_objsStart or Page_render before. * * void Page_setAnnotRect( PDF_PAGE page, PDF_ANNOT annot, const PDF_RECT *rect ); ParametersPage_setAnnotResetdo reset action. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. you should re-render page to display modified data. * * bool Page_setAnnotReset( PDF_PAGE page, PDF_ANNOT annot ); ParametersReturn Valuetrue or false. Page_setAnnotStrokeColorset annotation stroke color bool Page_setAnnotStrokeColor( PDF_PAGE page, PDF_ANNOT annot, int color ); ParametersReturn Valuetrue or false Page_setAnnotStrokeWidthset annot stroke width bool Page_setAnnotStrokeWidth( PDF_PAGE page, PDF_ANNOT annot, float width ); ParametersReturn Valuetrue or false PageContent_clipPathset the path as clip path. void PageContent_clipPath( PDF_PAGECONTENT content, PDF_PATH path, bool winding ); ParametersPageContent_createcreate PAGECONTENT PDF_PAGECONTENT PageContent_create(); Return ValuePDF_PAGECONTENT object PageContent_destroydestroy and free memory. void PageContent_destroy( PDF_PAGECONTENT content ); ParametersPageContent_drawImagePDF operator: show image. void PageContent_drawImage( PDF_PAGECONTENT content, PDF_PAGE_IMAGE img ); ParametersPageContent_drawTextshow text void PageContent_drawText( PDF_PAGECONTENT content, const char *text ); ParametersPageContent_fillPathfill path. void PageContent_fillPath( PDF_PAGECONTENT content, PDF_PATH path, bool winding ); ParametersPageContent_gsRestorePDF operator: gs_restore, restore GraphicState void PageContent_gsRestore( PDF_PAGECONTENT content ); ParametersPageContent_gsSavePDF operator: gs_save, save current GraphicState void PageContent_gsSave( PDF_PAGECONTENT content ); ParametersPageContent_gsSetPDF operator: set ExtGraphicState void PageContent_gsSet( PDF_PAGECONTENT content, PDF_PAGE_GSTATE gs ); ParametersPageContent_gsSetMatrixPDF operator: set matrix. void PageContent_gsSetMatrix( PDF_PAGECONTENT content, PDF_MATRIX mat ); ParametersPageContent_setFillColorPDF operator: set fill and other operations color. void PageContent_setFillColor( PDF_PAGECONTENT content, int color ); ParametersPageContent_setStrokeCapPDF operator: set line cap void PageContent_setStrokeCap( PDF_PAGECONTENT content, int cap ); ParametersPageContent_setStrokeColorPDF operator: set stroke color. void PageContent_setStrokeColor( PDF_PAGECONTENT content, int color ); ParametersPageContent_setStrokeJoinPDF operator: set line join void PageContent_setStrokeJoin( PDF_PAGECONTENT content, int join ); ParametersPageContent_setStrokeMiterPDF operator: set miter limit. void PageContent_setStrokeMiter( PDF_PAGECONTENT content, float miter ); ParametersPageContent_setStrokeWidthPDF operator: set line width void PageContent_setStrokeWidth( PDF_PAGECONTENT content, float w ); ParametersPageContent_strokePathstroke path. void PageContent_strokePath( PDF_PAGECONTENT content, PDF_PATH path ); ParametersPageContent_textBeginPDF operator: begin text and set text position to (0,0). void PageContent_textBegin( PDF_PAGECONTENT content ); ParametersPageContent_textEndPDF operator: text end. void PageContent_textEnd( PDF_PAGECONTENT content ); ParametersPageContent_textMovePDF operator: move text position relative to previous line void PageContent_textMove( PDF_PAGECONTENT content, float x, float y ); ParametersPageContent_textNextLinePDF operator: new a text line void PageContent_textNextLine( PDF_PAGECONTENT content ); ParametersPageContent_textSetCharSpacePDF operator: set char space(extra space between chars) void PageContent_textSetCharSpace( PDF_PAGECONTENT content, float space ); ParametersPageContent_textSetFontset text font void PageContent_textSetFont( PDF_PAGECONTENT content, PDF_PAGE_FONT font, float size ); ParametersPageContent_textSetHScalePDF operator: set horizon scale for chars. void PageContent_textSetHScale( PDF_PAGECONTENT content, int scale ); ParametersPageContent_textSetLeadingPDF operator: set text leading, height between 2 text lines. void PageContent_textSetLeading( PDF_PAGECONTENT content, float leading ); ParametersPageContent_textSetRenderModePDF operator: set text render mode. void PageContent_textSetRenderMode( PDF_PAGECONTENT content, int mode ); ParametersPageContent_textSetRisePDF operator: set text rise void PageContent_textSetRise( PDF_PAGECONTENT content, float rise ); ParametersPageContent_textSetWordSpacePDF operator: set word space(extra space between words spit by blank char ' ' ). void PageContent_textSetWordSpace( PDF_PAGECONTENT content, float space ); ParametersPath_closePathclose a contour. void Path_closePath( PDF_PATH path ); ParametersPath_createcreate a contour PDF_PATH Path_create(); Return ValuePDF_PATH object Path_curveTocurve to operation void Path_curveTo( PDF_PATH path, float x1, float y1, float x2, float y2, float x3, float y3 ); ParametersPath_destroyfree memory void Path_destroy( PDF_PATH path ); ParametersPath_getNodeget each node int Path_getNode( PDF_PATH path, int index, PDF_POINT *pt ); ParametersReturn Valuenode type: 0: move to 1: line to 3: curve to, index, index + 1, index + 2 are all data 4: close operation Path_getNodeCountget node count int Path_getNodeCount( PDF_PATH path ); ParametersReturn Valuenode count Path_lineTomove to operation void Path_lineTo( PDF_PATH path, float x, float y); ParametersPath_moveTomove to operation void Path_moveTo( PDF_PATH path, float x, float y); Parameters |