PDFIOS.h

Includes:
<CoreGraphics/CGImage.h>
<CoreGraphics/CGBitmapContext.h>
<UIKit/UIKit.h>

Introduction

Use the links in the table of contents to the left to access the documentation.



Functions

Document_addOutlineChild

insert outline as first child of this Outline. a premium license is needed for this method.

Document_addOutlineNext

insert outline after of this Outline. a premium license is needed for this method.

Document_canSave

is Document editable?

Document_close

close document.

Document_create

create document and return Document object. * *

Document_encryptAs

encrypt PDF file as another file. this function need premium license.

Document_getFontAscent

get font ascent

Document_getFontDescent

get font descent

Document_getMeta

get meta data by tag.

Document_getOutlineChild

get first child Outline item. * *

Document_getOutlineDest

Get destination of Outline item.

Document_getOutlineLabel

Get title of outline item.

Document_getOutlineNext

get next Outline item. * *

Document_getPage

get page object by page NO.

Document_getPageCount

get page count.

Document_getPageHeight

get page height.

Document_getPageWidth

get page width.

Document_getPermission

get permission of PDF, this value defined in PDF reference 1.7

Document_importEnd

destroy context object a premium license is needed for this method.

Document_importPage

import 1 page from source document a premium license is needed for this method.

Document_importStart

create an import context. a premium license is needed for this method.

Document_isEncrypted

is document encrypted?

Document_movePage

move page by page NO. a premium license is needed for this method.

Document_newFontCID

create a font object, used to write texts. * a premium license is needed for this method. * *

Document_newGState

create a ExtGraphicState object, used to set alpha values. a premium license is needed for this method.

Document_newImageJPEG

create an image from JPEG/JPG file. supported image color space: --GRAY --RGB --CMYK a premium license is needed for this method.

Document_newImageJPX

create an image from JPX/JPEG 2k file. a premium license is needed for this method.

Document_newPage

insert 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.

Document_open

open document and return Document object. * *

Document_removeOutline

remove Outline

Document_removePage

remove page by page NO. a premium license is needed for this method.

Document_save

save PDF file.

Document_saveAs

save PDF file as another file. this function remove all encrypt information and save to dst. * *

Document_setCache

set cache file for the document object.

Document_setGStateFillAlpha

set GraphicState object fill alpha

Document_setGStateStrokeAlpha

set GraphicState object stroke alpha

Global_activePremium

Active Premium license, this type of license can do some viewing and editing and form editing.

Global_activeProfession

Active Professional license, this type of license can do some viewing and editing.

Global_activeStandard

Active Standard license, this type of license can view PDF only.

Global_dibFree

delete DIB object

Global_dibGet

alloc or realloc DIB object.

Global_dibGetData

Get dib data,return pointer of dib object

Global_dibGetHeight

Get dib object's height

Global_dibGetWidth

Get dib object's width

Global_drawScroll

not used for developer

Global_fontfileListAdd

add font file to list.

Global_fontfileListEnd

submit font list to PDF library.

Global_fontfileListStart

create font list

Global_getFaceCount

Get face count. this function valid after Global_fontfileListEnd() invoked. * *

Global_getFaceName

get face name by index. this function valid after Global_fontfileListEnd() invoked. * *

Global_loadStdFont

Load font file.

Global_SaveFont

Save system font to a file.

Global_setAnnotFont

Set annot font type

Global_setAnnotTransparency

set annot transparency

Global_setCMapsPath

load cmaps data. cmaps is code mapping struct. * *

Global_setDefaultFont

Set default font. the default font may be used when PDF has font not embed. this function valid after Global_fontfileListEnd() invoked. * *

Global_toDIBPoint

map PDF Point to DIB point.

Global_toDIBRect

map PDF rect to DIB rect.

Global_toPDFPoint

map DIB Point to PDF point.

Global_toPDFRect

map DIB Rect to PDF Rect.

Global_unloadStdFont

Unload font file.

Ink_create

create ink object for hand-writing

Ink_destroy

destroy Ink object

Ink_getNode

get node by index * *

Ink_getNodeCount

get node count for ink.

Ink_onDown

invoked when touch-down.

Ink_onMove

invoked when touch-moving.

Ink_onUp

invoked when touch-up.

Matrix_create

create a Matrix object

Matrix_createScale

create a Matrix object for scale values.

Matrix_destroy

free Matrix object

Page_addAnnotAttachment

add 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

Page_addAnnotBitmap

add 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. * *

Page_addAnnotEditbox

add an edit-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_addAnnotEditbox2

add an edit-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_addAnnotEllipse

add 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. * *

Page_addAnnotEllipse2

add 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. * *

Page_addAnnotGoto

add 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

Page_addAnnotGoto2

add 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

Page_addAnnotInk

add 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. * *

Page_addAnnotInk2

add 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. * *

Page_addAnnotLine

add 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

Page_addAnnotLine2

add 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

Page_addAnnotMarkup2

add 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

Page_addAnnotRect

add 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. * *

Page_addAnnotRect2

add 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. * *

Page_addAnnotStamp

add 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

Page_addAnnotText

add 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 * *

Page_addAnnotText2

add 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 * *

Page_addAnnotUri

add 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

Page_addAnnotURI2

add 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

Page_addBitmap

add 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 * *

Page_addContent

add content stream to this page. a premium license is needed for this method.

Page_addResFont

add a font as resource of this page. a premium license is needed for this method.

Page_addResGState

add GraphicState as resource of this page. a premium license is needed for this method.

Page_addResImage

add an image as resource of this page. a premium license is needed for this method.

Page_close

close page.

Page_findClose

close finder to invoke this function, developers should call Page_objsStart before. * *

Page_findGetCount

how many found? to invoke this function, developers should call Page_objsStart before. * *

Page_findGetFirstChar

get char index in page, by find index. to invoke this function, developers should call Page_objsStart before. * *

Page_findOpen

open a finder object. to invoke this function, developers should call Page_objsStart before. * *

Page_getAnnot

get annotation by index. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnot3D

get 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. *

Page_getAnnot3DData

get 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. * *

Page_getAnnotAttachment

get 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. * *

Page_getAnnotAttachmentData

get 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. * *

Page_getAnnotCheckStatus

get 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. * *

Page_getAnnotComboItem

get item text by index. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotComboItemCount

get items count in combo-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotComboItemSel

get index of selected item. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotCount

get count of annotations. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnotDest

get annotation's goto page action. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnotEditText

get 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. * *

Page_getAnnotEditTextRect

get 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. * *

Page_getAnnotEditTextSize

get 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. * *

Page_getAnnotEditType

get 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. * *

Page_getAnnotFieldFullName

get field full name of this annotation. a premium license is needed for this function.

Page_getAnnotFieldFullName2

get field full name of this annotation with more details. a premium license is needed for this function.

Page_getAnnotFieldName

get field name of this annotation. a premium license is needed for this function.

Page_getAnnotFieldType

get annotation field type in acroForm. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in premium version

Page_getAnnotFillColor

get annotation fill color

Page_getAnnotFromPoint

get annotation by point. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnotIcon

get 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

Page_getAnnotListItem

get item text by index. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotListItemCount

get items count in list-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotListSels

get selected items of list-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotMovie

get 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. * *

Page_getAnnotMovieData

get 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. * *

Page_getAnnotPopupLabel

get text of popup label annotation. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnotPopupSubject

get subject of popup text annotation. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnotPopupText

get text of popup text annotation. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnotRect

get annotation rect. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_getAnnotReset

is this annotation reset button? to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotSound

get 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. * *

Page_getAnnotSoundData

get 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. * *

Page_getAnnotStrokeColor

get annotation stroke color

Page_getAnnotStrokeWidth

get annot stroke width

Page_getAnnotSubmitPara

get submit parameters. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotSubmitTarget

get submit target link. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_getAnnotType

get annotation type. this can be invoked after ObjsStart or Render or RenderToBmp. this method valid in professional or premium version

Page_getAnnotURI

get annotation's goto URI action. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_isAnnotHide

is annotation hided?

Page_isAnnotLocked

is annotation locked? to invoke this function, developers should call Page_objsStart or Page_render before.

Page_isAnnotLockedContent

is annotation locked? to invoke this function, developers should call Page_objsStart or Page_render before.

Page_objsAlignWord

get index aligned by word. this can be invoked after ObjsStart

Page_objsGetCharCount

get chars count. to invoke this function, developers should call Page_objsStart before. *

Page_objsGetCharFontName

get char's font name. this can be invoked after ObjsStart

Page_objsGetCharIndex

get char index nearest to point

Page_objsGetCharRect

get area rect of char. to invoke this function, developers should call Page_objsStart before. * *

Page_objsGetString

get string by index range. to invoke this function, developers should call Page_objsStart before. * *

Page_objsStart

load all objects in page.

Page_removeAnnot

remove 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. * *

Page_render

render page to dib.

Page_renderCancel

cancel render, in mostly, this function called by UI thread, and Page_render called by another thread.

Page_renderIsFinished

check if page render finished.

Page_renderPrepare

reset status and erase wihite for dib.

Page_setAnnotCheckValue

set 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. * *

Page_setAnnotComboItem

set 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. * *

Page_setAnnotEditText

set 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. * *

Page_setAnnotFillColor

set annotation fill color

Page_setAnnotHide

set annotation hided

Page_setAnnotIcon

set 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

Page_setAnnotListSels

set selected items of list-box. to invoke this function, developers should call Page_objsStart or Page_render before. this function valid in premium license. * *

Page_setAnnotPopupLabel

set 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. * *

Page_setAnnotPopupSubject

set 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. * *

Page_setAnnotPopupText

set 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. * *

Page_setAnnotRadio

set 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. * *

Page_setAnnotRect

set annotation rect. to invoke this function, developers should call Page_objsStart or Page_render before. * *

Page_setAnnotReset

do 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. * *

Page_setAnnotStrokeColor

set annotation stroke color

Page_setAnnotStrokeWidth

set annot stroke width

PageContent_clipPath

set the path as clip path.

PageContent_create

create PAGECONTENT

PageContent_destroy

destroy and free memory.

PageContent_drawImage

PDF operator: show image.

PageContent_drawText

show text

PageContent_fillPath

fill path.

PageContent_gsRestore

PDF operator: gs_restore, restore GraphicState

PageContent_gsSave

PDF operator: gs_save, save current GraphicState

PageContent_gsSet

PDF operator: set ExtGraphicState

PageContent_gsSetMatrix

PDF operator: set matrix.

PageContent_setFillColor

PDF operator: set fill and other operations color.

PageContent_setStrokeCap

PDF operator: set line cap

PageContent_setStrokeColor

PDF operator: set stroke color.

PageContent_setStrokeJoin

PDF operator: set line join

PageContent_setStrokeMiter

PDF operator: set miter limit.

PageContent_setStrokeWidth

PDF operator: set line width

PageContent_strokePath

stroke path.

PageContent_textBegin

PDF operator: begin text and set text position to (0,0).

PageContent_textEnd

PDF operator: text end.

PageContent_textMove

PDF operator: move text position relative to previous line

PageContent_textNextLine

PDF operator: new a text line

PageContent_textSetCharSpace

PDF operator: set char space(extra space between chars)

PageContent_textSetFont

set text font

PageContent_textSetHScale

PDF operator: set horizon scale for chars.

PageContent_textSetLeading

PDF operator: set text leading, height between 2 text lines.

PageContent_textSetRenderMode

PDF operator: set text render mode.

PageContent_textSetRise

PDF operator: set text rise

PageContent_textSetWordSpace

PDF operator: set word space(extra space between words spit by blank char ' ' ).

Path_closePath

close a contour.

Path_create

create a contour

Path_curveTo

curve to operation

Path_destroy

free memory

Path_getNode

get each node

Path_getNodeCount

get node count

Path_lineTo

move to operation

Path_moveTo

move to operation


Document_addOutlineChild


insert 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);  
Parameters
doc

Document object returned from Document_open

outlinenode

Outline Item returned from Document_getOutlineChild or Document_getOutlineNext

label

output value: label text ot outline item.

pageno

0 based page NO.

top

y in PDF coordinate

Return Value

true or false


Document_addOutlineNext


insert 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);  
Parameters
doc

Document object returned from Document_open

outlinenode

Outline Item returned from Document_getOutlineChild or Document_getOutlineNext

label

output value: label text ot outline item.

pageno

0 based page NO.

top

y in PDF coordinate

Return Value

true or false


Document_canSave


is Document editable?

bool Document_canSave(
    PDF_DOC doc );  
Parameters
doc

Document object returned from Document_open

Return Value

true or false


Document_close


close document.

void Document_close(
    PDF_DOC doc );  
Parameters
doc

Document object returned from Document_open


Document_create


create document and return Document object. * *

PDF_DOC Document_create(
    const char *path,
    PDF_ERR *err );  
Parameters
path

full path of PDF file. *

err

output value: error code. * *

Return Value

NULL if failed, and developers should check err code for some reason. otherwize return Document object.


Document_encryptAs


encrypt 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);  
Parameters
doc

Document object returned from Document_open

dst

full path to save.

upswd

user password.

opswd

owner password.

perm

permission to set, see PDF reference or Document_getPermission().

method

reserved.

fid

file ID to be set. must be 32 bytes long.

Return Value

true or false.


Document_getFontAscent


get font ascent

float Document_getFontAscent(
    PDF_DOC doc,
    PDF_DOC_FONT font );  
Parameters
doc

Document object returned from Document_open

font

font object created by Document.NewFontCID()

Return Value

<#return value description#>


Document_getFontDescent


get font descent

float Document_getFontDescent(
    PDF_DOC doc,
    PDF_DOC_FONT font );  
Parameters
doc

Document object returned from Document_open

font

font object created by Document.NewFontCID()

Return Value

<#return value description#>


Document_getMeta


get meta data by tag.

int Document_getMeta(
    PDF_DOC doc,
    const char *tag,
    char *meta,
    int len );  
Parameters
doc

Document object returned from Document_open

tag

Predefined values:"Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate","ModDate".

meta

output value: meta data.

len

buffer length.

Return Value

length of meta data.


Document_getOutlineChild


get first child Outline item. * *

PDF_OUTLINE Document_getOutlineChild(
    PDF_DOC doc,
    PDF_OUTLINE outlinenode);  
Parameters
doc

Document object returned from Document_open *

outlinenode

Outline Item returned from Document_getOutlineChild or Document_getOutlineNext * *

Return Value

Root Outline item if outlinenode == NULL. return NULL if no children.


Document_getOutlineDest


Get destination of Outline item.

int Document_getOutlineDest(
    PDF_DOC doc,
    PDF_OUTLINE outlinenode );  
Parameters
doc

Document object returned from Document_open

outlinenode

Outline Item returned from Document_getOutlineChild or Document_getOutlineNext

Return Value

0 based page NO.


Document_getOutlineLabel


Get title of outline item.

int Document_getOutlineLabel(
    PDF_DOC doc,
    PDF_OUTLINE outlinenode,
    char *label,
    int len);  
Parameters
doc

Document object returned from Document_open

outlinenode

Outline Item returned from Document_getOutlineChild or Document_getOutlineNext

label

output value: label text ot outline item.

len

buffer length.

Return Value

length of label.


Document_getOutlineNext


get next Outline item. * *

PDF_OUTLINE Document_getOutlineNext(
    PDF_DOC doc,
    PDF_OUTLINE outlinenode);  
Parameters
doc

Document object returned from Document_open *

outlinenode

Outline Item returned from Document_getOutlineChild or Document_getOutlineNext * *

Return Value

Root Outline item if outlinenode == NULL. return NULL if no next item.


Document_getPage


get page object by page NO.

PDF_PAGE Document_getPage(
    PDF_DOC doc,
    int pageno );  
Parameters
doc

Document object returned from Document_open

pageno

0 based page NO.

Return Value

page object.


Document_getPageCount


get page count.

int Document_getPageCount(
    PDF_DOC doc );  
Parameters
doc

Document object returned from Document_open

Return Value

count of pages.


Document_getPageHeight


get page height.

float Document_getPageHeight(
    PDF_DOC doc,
    int pageno );  
Parameters
doc

Document object returned from Document_open

pageno

0 based page number.

Return Value

height of page.


Document_getPageWidth


get page width.

float Document_getPageWidth(
    PDF_DOC doc,
    int pageno );  
Parameters
doc

Document object returned from Document_open

pageno

0 based page number.

Return Value

width of page


Document_getPermission


get permission of PDF, this value defined in PDF reference 1.7

int Document_getPermission(
    PDF_DOC doc );  
Parameters
doc

Document object returned from Doument_open

Return Value

permission 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_importEnd


destroy context object a premium license is needed for this method.

void Document_importEnd(
    PDF_DOC doc,
    PDF_IMPORTCTX ctx );  
Parameters
doc

dest Document object returned from Document_openXXX or Document_CreateXXX

ctx

context object returned from Document_importStart


Document_importPage


import 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 );  
Parameters
doc

dest Document object returned from Document_openXXX or Document_CreateXXX

ctx

context object returned from Document_importStart

srcno

0 based page NO. from source Document object

dstno

0 based page NO. for dest Document object

Return Value

true or false.


Document_importStart


create an import context. a premium license is needed for this method.

PDF_IMPORTCTX Document_importStart(
    PDF_DOC doc,
    PDF_DOC doc_src );  
Parameters
doc

dest Document object returned from Document_openXXX or Document_CreateXXX

doc_src

source Document object returned from Document_openXXX or Document_CreateXXX

Return Value

context object or NULL.


Document_isEncrypted


is document encrypted?

bool Document_isEncrypted(
    PDF_DOC doc );  
Parameters
doc

Document object returned from Document_open

Return Value

true or false.


Document_movePage


move page by page NO. a premium license is needed for this method.

bool Document_movePage(
    PDF_DOC doc,
    int pageno1,
    int pageno2 );  
Parameters
doc

Document object returned from Document_openXXX or Document_CreateXXX

pageno1

0 based page NO for origin page NO.

pageno2

0 based page NO for dest page NO.

Return Value

true or false


Document_newFontCID


create 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 );  
Parameters
doc

Document object returned from Document_open *

name

font name exists in font list. * using Global.getFaceCount(), Global.getFaceName() to enumerate fonts. *

style

(style&1) means bold, (style&2) means Italic, (style&8) means embed, (style&16) means vertical writing, mostly used in Asia fonts. * *

Return Value

DocFont object or null is failed.


Document_newGState


create a ExtGraphicState object, used to set alpha values. a premium license is needed for this method.

PDF_DOC_GSTATE Document_newGState(
    PDF_DOC doc );  
Parameters
doc

Document object returned from Document_open

Return Value

PDF_DOC_GSTATE objecet or NULL is failed.


Document_newImageJPEG


create 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 );  
Parameters
doc

Document object returned from Document_open

path

path to JPEG file

Return Value

DocImage object or null.


Document_newImageJPX


create 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 );  
Parameters
doc

Document object returned from Document_open

path

path to JPX file.

Return Value

DocImage object or null.


Document_newPage


insert 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 );  
Parameters
doc

Document object returned from Document_open

pageno

0 based page NO.

w

page width in PDF coordinate

h

page height in PDF coordinate

Return Value

Page object or null means failed.


Document_open


open document and return Document object. * *

PDF_DOC Document_open(
    const char *path,
    const char *password,
    PDF_ERR *err );  
Parameters
path

full path of PDF file. *

password

password try both user password and owner password *

err

output value: error code. * *

Return Value

NULL if failed, and developers should check err code for some reason. otherwize return Document object.


Document_removeOutline


remove Outline

bool Document_removeOutline(
    PDF_DOC doc,
    PDF_OUTLINE outlinenode);  
Parameters
doc

Document object returned from Document_open

outlinenode

Outline Item returned from Document_getOutlineChild or Document_getOutlineNext

Return Value

true or false


Document_removePage


remove page by page NO. a premium license is needed for this method.

bool Document_removePage(
    PDF_DOC doc,
    int pageno );  
Parameters
doc

Document object returned from Document_open

pageno

0 based page NO.

Return Value

true or false


Document_save


save PDF file.

bool Document_save(
    PDF_DOC doc );  
Parameters
doc

Document object returned from Document_open

Return Value

true or false.


Document_saveAs


save 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 );  
Parameters
doc

Document object returned from Document_open *

dst

full path to save. * *

Return Value

true or false.


Document_setCache


set cache file for the document object.

bool Document_setCache(
    PDF_DOC doc,
    const char *cache_file );  
Parameters
doc

document object from open or create.

cache_file

absolute path-name for cache file.

Return Value

true or false.


Document_setGStateFillAlpha


set GraphicState object fill alpha

bool Document_setGStateFillAlpha(
    PDF_DOC doc,
    PDF_DOC_GSTATE state,
    int alpha );  
Parameters
doc

Document object returned from Document_open

state

PDF Graphicstate create by Document_newGState

alpha

alpha value

Return Value

true or false


Document_setGStateStrokeAlpha


set GraphicState object stroke alpha

bool Document_setGStateStrokeAlpha(
    PDF_DOC doc,
    PDF_DOC_GSTATE state,
    int alpha );  
Parameters
doc

Document object returned from Document_open

state

PDF Graphicstate create by Document_newGState

alpha

alpha value

Return Value

true or false


Global_activePremium


Active 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 );  
Parameters
name

Bundle ID of Application in ios.

company

Company name inputed when pruchase.

mail

Email address inputed when pruchase.

serial

Serial Number you recieved after paid.

Return Value

true or false.


Global_activeProfession


Active 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 );  
Parameters
name

Bundle ID of Application in ios

company

Company name inputed when pruchase.

mail

Email address inputed when pruchase.

serial

Serial Number you recieved after paid.

Return Value

true or false.


Global_activeStandard


Active 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 );  
Parameters
name

Bundle ID of Application in ios

company

Company name inputed when pruchase.

mail

Email address inputed when pruchase.

serial

Serial Number you recieved after paid.

Return Value

true or false.


Global_dibFree


delete DIB object

void Global_dibFree(
    PDF_DIB dib );  
Parameters
dib

DIB object


Global_dibGet


alloc or realloc DIB object.

PDF_DIB Global_dibGet(
    PDF_DIB dib,
    int width,
    int height );  
Parameters
dib

NULL for alloc, otherwise, realloc object.

width

width of DIB

height

height of DIB

Return Value

DIB object.


Global_dibGetData


Get dib data,return pointer of dib object

void *Global_dibGetData(
    PDF_DIB dib );  
Parameters
dib

Dib object


Global_dibGetHeight


Get dib object's height

int Global_dibGetHeight(
    PDF_DIB dib );  
Parameters
dib

DIB object

Return Value

DIB object's height


Global_dibGetWidth


Get dib object's width

int Global_dibGetWidth(
    PDF_DIB dib );  
Parameters
dib

DIB object

Return Value

DIB object's width


Global_drawScroll


not used for developer

void Global_drawScroll(
    PDF_DIB dst,
    PDF_DIB dib1,
    PDF_DIB dib2,
    int x,
    int y,
    int style );  

Global_fontfileListAdd


add font file to list.

void Global_fontfileListAdd(
    const char *font_file );  
Parameters
font_file

full path of font file.


Global_fontfileListEnd


submit font list to PDF library.

void Global_fontfileListEnd();  

Global_fontfileListStart


create font list

void Global_fontfileListStart();  

Global_getFaceCount


Get face count. this function valid after Global_fontfileListEnd() invoked. * *

int Global_getFaceCount();  
Return Value

face count


Global_getFaceName


get face name by index. this function valid after Global_fontfileListEnd() invoked. * *

const char *Global_getFaceName(
    int index );  
Parameters
index

0 based index, range : [0, Global_getFaceCount()-1]. * *

Return Value

face name.


Global_loadStdFont


Load font file.

void Global_loadStdFont(
    int index,
    const char *path );  
Parameters
index

Font file index. *

path

Font path in SandBox.

Discussion

*


Global_SaveFont


Save system font to a file.

bool Global_SaveFont(
    const char *fname,
    const char *save_file );  
Parameters
fname

font name from ios system, for example: Arial

save_file

full path name that save the font.

Return Value

true or false


Global_setAnnotFont


Set annot font type

bool Global_setAnnotFont(
    const char *font_name );  
Parameters
font_name

full path of font file.

Return Value

true or false


Global_setAnnotTransparency


set annot transparency

void Global_setAnnotTransparency(
    int color );  
Parameters
color

RGB color.e.g.0x200040FF


Global_setCMapsPath


load cmaps data. cmaps is code mapping struct. * *

void Global_setCMapsPath(
    const char *cmaps,
    const char *umaps );  
Parameters
cmaps

full path of cmaps *

umaps

full path of umaps


Global_setDefaultFont


Set 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 );  
Parameters
collection

may be: null, "GB1", "CNS1", "Japan1", "Korea1" *

font_name

font name exist in font list. *

fixed

set for fixed font? * *

Return Value

true or false


Global_toDIBPoint


map PDF Point to DIB point.

void Global_toDIBPoint(
    PDF_MATRIX matrix,
    const PDF_POINT *ppoint,
    PDF_POINT *dpoint );  
Parameters
matrix

Matrix object that passed to Page_Render.

ppoint

Point in PDF coordinate system.

dpoint

output value: Point in DIB coordinate system.


Global_toDIBRect


map PDF rect to DIB rect.

void Global_toDIBRect(
    PDF_MATRIX matrix,
    const PDF_RECT *prect,
    PDF_RECT *drect );  
Parameters
matrix

Matrix object that passed to Page_Render.

prect

Rect in PDF coordinate system.

drect

output value: Rect in DIB coordinate system.


Global_toPDFPoint


map DIB Point to PDF point.

void Global_toPDFPoint(
    PDF_MATRIX matrix,
    const PDF_POINT *dpoint,
    PDF_POINT *ppoint );  
Parameters
matrix

Matrix object that passed to Page_Render.

dpoint

Point in DIB coordinate system.

ppoint

output value: Point in PDF coordinate system.


Global_toPDFRect


map DIB Rect to PDF Rect.

void Global_toPDFRect(
    PDF_MATRIX matrix,
    const PDF_RECT *drect,
    PDF_RECT *prect );  
Parameters
matrix

Matrix object that passed to Page_Render.

drect

Rect in DIB coordinate system.

prect

output value: Rect in PDF coordinate system.


Global_unloadStdFont


Unload font file.

void Global_unloadStdFont(
    int index );  
Parameters
index

font file index.


Ink_create


create ink object for hand-writing

PDF_INK Ink_create(
    float line_w,
    int color );  
Parameters
line_w

line width

color

RGB value for ink color

Return Value

Ink object


Ink_destroy


destroy Ink object

void Ink_destroy(
    PDF_INK ink );  
Parameters
ink

Ink object returned from Ink_create


Ink_getNode


get node by index * *

int Ink_getNode(
    PDF_INK hand,
    int index,
    PDF_POINT *pt );  
Parameters
hand

Ink object returned from Ink_create *

index

0 based index, range: [0, Ink_getNodeCount() - 1] *

pt

position pointer * *

Return Value

type of node: 0: move to 1: line to 2: cubic bezier to.


Ink_getNodeCount


get node count for ink.

int Ink_getNodeCount(
    PDF_INK ink );  
Parameters
ink

Ink object returned from Ink_create

Return Value

nodes count


Ink_onDown


invoked when touch-down.

void Ink_onDown(
    PDF_INK ink,
    float x,
    float y );  
Parameters
ink

Ink object returned from Ink_create

x

x position

y

y position


Ink_onMove


invoked when touch-moving.

void Ink_onMove(
    PDF_INK ink,
    float x,
    float y );  
Parameters
ink

Ink object returned from Ink_create

x

x positon

y

y position


Ink_onUp


invoked when touch-up.

void Ink_onUp(
    PDF_INK ink,
    float x,
    float y );  
Parameters
ink

Ink object returned from Ink_create

x

x position

y

y position


Matrix_create


create a Matrix object

PDF_MATRIX Matrix_create(
    float xx,
    float yx,
    float xy,
    float yy,
    float x0,
    float y0 );  
Parameters
xx

x scale value

yx

yx-

xy

xy-

yy

y scale value

x0

x origin

y0

y origin

Return Value

Matrix object


Matrix_createScale


create a Matrix object for scale values.

PDF_MATRIX Matrix_createScale(
    float scalex,
    float scaley,
    float x0,
    float y0 );  
Parameters
scalex

x scale value

scaley

y scale value

x0

x origin

y0

y origin

Return Value

Matrix object


Matrix_destroy


free Matrix object

void Matrix_destroy(
    PDF_MATRIX matrix );  
Parameters
matrix

matrix Matrix object returned from Matrix_create or Matrix_createScale


Page_addAnnotAttachment


add 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 );  
Parameters
page

returned from Document_getPage

path

absolute path name to the file.

icon

icon display to the page. values as:

  1. PushPin

  2. Graph

  3. Paperclip

  4. Tag

rect

4 elements: left, top, right, bottom in PDF coordinate system.

Return Value

true or false


Page_addAnnotBitmap


add 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 );  
Parameters
page

returned from Document_getPage *

matrix

Matrix object passed to Page_render *

bitmap

bitmap data, must be in RGBA color space. *

has_alpha

need generate alpha values for bitmap? *

rect

rect in PDF coordinate. * *

Return Value

true or false


Page_addAnnotEditbox


add 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 );  
Parameters
page

returned from Document_getPage. *

matrix

matrix object that passed to render. *

rect

rect in PDF coordinate. *

line_clr

border color of editbox. *

line_w

border width of editbox. *

fill_clr

background of editbox. *

tsize

text size of the editbox. *

color_clr

text color. * *

Return Value

true or false


Page_addAnnotEditbox2


add 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 );  
Parameters
page

returned from Document_getPage. *

rect

rect in PDF coordinate. *

line_clr

border color of editbox. *

line_w

border width of editbox. *

fill_clr

background of editbox. *

tsize

text size of the editbox. *

color_clr

text color. * *

Return Value

true or false


Page_addAnnotEllipse


add 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 );  
Parameters
page

returned from Document_getPage *

matrix

Matrix object passed to Page_render *

rect

rect in DIB coordinate *

width

line width in DIB coordinate *

color

RGB value for rect color *

icolor

fill color. same as addAnnotRect. * *

Return Value

true or false


Page_addAnnotEllipse2


add 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 );  
Parameters
page

returned from Document_getPage *

rect

rect in PDF coordinate *

width

line width in PDF coordinate *

color

RGB value for rect color *

icolor

fill color. same as addAnnotRect. * *

Return Value

true or false


Page_addAnnotGoto


add 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 );  
Parameters
page

returned from Document_getPage *

matrix

Matrix object passed to Page_render *

rect

link area rect [left, top, right, bottom] in DIB coordinate. *

pageno

0 based pageno to goto. *

top

y coordinate in PDF coordinate, page.height is top of page. and 0 is bottom of page. * *

Return Value

true or false

Discussion

* *


Page_addAnnotGoto2


add 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 );  
Parameters
page

returned from Document_getPage *

rect

link area rect [left, top, right, bottom] in PDF coordinate. *

pageno

0 based pageno to goto. *

top

y coordinate in PDF coordinate, page.height is top of page. and 0 is bottom of page. * *

Return Value

true or false

Discussion

* *


Page_addAnnotInk


add 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 );  
Parameters
page

returned from Document_getPage *

matrix

Matrix object passed to Page_render *

hand

Ink object returned from Ink_create. *

orgx

x or origin, in DIB coordinate *

orgy

y or origin, in DIB coordinate * *

Return Value

true or false.


Page_addAnnotInk2


add 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 );  
Parameters
page

returned from Document_getPage *

hand

Ink object returned from Ink_create, must in PDF coordinate. * *

Return Value

true or false.


Page_addAnnotLine


add 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
page

returned from Document_getPage

matrix

Matrix object passed to Page_render

pt1

start point, 2 elements for x,y, in DIB coordinate

pt2

end point, 2 elements for x,y, in DIB coordinate

style1

tyle for start point:

  1. None

  2. Arrow

  3. Closed Arrow

  4. Square

  5. Circle

  6. Butt

  7. Diamond

  8. Reverted Arrow

  9. Reverted Closed Arrow

  10. Slash

style2

style for end point, values are same as style1.

width

line width in DIB coordinate

color

line color. same as addAnnotRect.

icolor

fill color. same as addAnnotRect.

Return Value

true or false


Page_addAnnotLine2


add 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
page

returned from Document_getPage

pt1

start point, 2 elements for x,y, in PDF coordinate

pt2

end point, 2 elements for x,y, in PDF coordinate

style1

tyle for start point:

  1. None

  2. Arrow

  3. Closed Arrow

  4. Square

  5. Circle

  6. Butt

  7. Diamond

  8. Reverted Arrow

  9. Reverted Closed Arrow

  10. Slash

style2

style for end point, values are same as style1.

width

line width in PDF coordinate

color

line color. same as addAnnotRect.

icolor

fill color. same as addAnnotRect.

Return Value

true or false


Page_addAnnotMarkup2


add 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 );  
Parameters
page

returned from Document_getPage

index1

first char index

index2

second char index

color

RGB value

type

type as following:

  1. Highlight

  2. Underline

  3. StrikeOut

  4. Highlight without round corner

  5. Squiggly underline.

Return Value

true or false


Page_addAnnotRect


add 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 );  
Parameters
page

returned from Document_getPage *

matrix

Matrix object passed to Page_render *

rect

rect in DIB coordinate *

width

line width in DIB coordinate *

color

RGB value for rect color *

icolor

fill color. same as addAnnotRect. * *

Return Value

true or false


Page_addAnnotRect2


add 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 );  
Parameters
page

returned from Document_getPage *

rect

rect in PDF coordinate *

width

line width in PDF coordinate *

color

RGB value for rect color *

icolor

fill color. same as addAnnotRect. * *

Return Value

true or false


Page_addAnnotStamp


add 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
rect

icon area rect [left, top, right, bottom] in PDF coordinate.

icon

predefined value as below:

  1. "Draft"(default icon)

  2. "Approved"

  3. "Experimental"

  4. "NotApproved"

  5. "AsIs"

  6. "Expired"

  7. "NotForPublicRelease"

  8. "Confidential"

  9. "Final"

  10. "Sold"

  11. "Departmental"

  12. "ForComment"

  13. "TopSecret"

  14. "ForPublicRelease"

  15. "Accepted"

  16. "Rejected"

  17. "Witness"

  18. "InitialHere"

  19. "SignHere"

  20. "Void"

  21. "Completed"

  22. "PreliminaryResults"

  23. "InformationOnly"

  24. "End"

Return Value

true or false. the added annotation can be obtained by Page.GetAnnot(Page.GetAnnotCount() - 1), if this method return true.


Page_addAnnotText


add 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 );  
Parameters
page

returned from Document_getPage *

matrix

Matrix object passed to Page_render *

x

x in DIB coordinate. *

y

y in DIB coordinate. * *

Return Value

true or false


Page_addAnnotText2


add 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 );  
Parameters
page

returned from Document_getPage *

x

x in PDF coordinate. *

y

y in PDF coordinate. * *

Return Value

true or false


Page_addAnnotUri


add 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 );  
Parameters
page

returned from Document_getPage

matrix

Matrix object passed to Page_render

rect

link area rect [left, top, right, bottom] in DIB coordinate.

uri

url address, example: "http://www.radaee.com/en"

Return Value

true or false


Page_addAnnotURI2


add 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 );  
Parameters
page

returned from Document_getPage

rect

link area rect [left, top, right, bottom] in PDF coordinate.

uri

url address, example: "http://www.radaee.com/en"

Return Value

true or false


Page_addBitmap


add 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 );  
Parameters
page

returned from Document_getPage *

matrix

Matrix object passed to Page_render *

bitmap

bitmap data, must be in RGBA color space *

has_alpha

need generate alpha values for bitmap? *

rect

rect in PDF coordinate. * *

Return Value

true or false


Page_addContent


add content stream to this page. a premium license is needed for this method.

bool Page_addContent(
    PDF_PAGE page,
    PDF_PAGECONTENT content,
    bool flush );  
Parameters
page

returned from Document_getPage

content

PageContent object called PageContent.create().

Return Value

true or false


Page_addResFont


add 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 );  
Parameters
page

returned from Document_getPage

font

font object created by Document.NewFontCID()

Return Value

PDF_PAGE_FONT object or null means failed


Page_addResGState


add 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 );  
Parameters
page

returned from Document_getPage

gstate

ExtGraphicState created by Document.NewGState()

Return Value

null means failed.


Page_addResImage


add 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 );  
Parameters
page

returned from Document_getPage

image

image - image object created by Document.NewImage() or Document.NewImageJPEG()

Return Value

null means failed.


Page_close


close page.

void Page_close(
    PDF_PAGE page );  
Parameters
page

returned from Document_getPage


Page_findClose


close finder to invoke this function, developers should call Page_objsStart before. * *

void Page_findClose(
    PDF_FINDER finder );  
Parameters
finder

finder returned from Page_findOpen


Page_findGetCount


how many found? to invoke this function, developers should call Page_objsStart before. * *

int Page_findGetCount(
    PDF_FINDER finder );  
Parameters
finder

finder returned from Page_findOpen *

Return Value

0 if no found, otherwise, count of founds.


Page_findGetFirstChar


get 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 );  
Parameters
finder

returned from Page_findOpen *

index

find index, range: [0, Page_findGetCount() - 1]. * *

Return Value

char index in page, range: [0, Page_objsGetCharCount() - 1].


Page_findOpen


open 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 );  
Parameters
page

returned from Document_getPage *

str

string to find. *

match_case

match case? *

whole_word

whole word? * *

Return Value

finder object ot NULL if not found.


Page_getAnnot


get 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 );  
Parameters
page

returned from Document_getPage *

index

0 based index, range: [0, Page_getAnnotCount() - 1]. * *

Return Value

annotation object or NULL.


Page_getAnnot3D


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

f3d

file name of 3d data, must in ".u3d" format. *

len

buffer length. * *

Return Value

length of f3d, or 0.


Page_getAnnot3DData


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

path

file to save. * *

Return Value

true or false.


Page_getAnnotAttachment


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

att

file name of attachment data. *

len

buffer length. * *

Return Value

length of att, or 0.


Page_getAnnotAttachmentData


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

path

file to save. * *

Return Value

true or false.


Page_getAnnotCheckStatus


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return 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_getAnnotComboItem


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

item

0 based item index, range: [0, Page_getAnnotComboItemCount() - 1] *

val

output buffer: text string buffer *

len

buffer length * *

Return Value

true or false


Page_getAnnotComboItemCount


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

-1: this is not combo. otherwise: items count.


Page_getAnnotComboItemSel


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

item index selected.


Page_getAnnotCount


get count of annotations. to invoke this function, developers should call Page_objsStart or Page_render before. * *

int Page_getAnnotCount(
    PDF_PAGE page );  
Parameters
page

returned from Document_getPage * *

Return Value

count of annotations.


Page_getAnnotDest


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

-1 if failed or 0 based page NO.


Page_getAnnotEditText


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

text

output value: text string buffer *

len

buffer length * *

Return Value

true or false


Page_getAnnotEditTextRect


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

rect

output value: rect of edit box. * *

Return Value

true or false.


Page_getAnnotEditTextSize


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

text size in PDF coordinate.


Page_getAnnotEditType


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

-1: this annotation is not text-box. 1: normal single line. 2: password. 3: MultiLine edit area.


Page_getAnnotFieldFullName


get 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 );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

buf

buffer to fill names in UTF-8 coding.

buf_size

size of buffer that allocated.

Return Value

name of this annotation, like: "form1.EditBox1"


Page_getAnnotFieldFullName2


get 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 );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

buf

buffer to fill names in UTF-8 coding.

buf_size

size of buffer that allocated.

Return Value

name of this annotation, like: "form1[0].EditBox1[0]"


Page_getAnnotFieldName


get 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 );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

buf

buffer to fill names in UTF-8 coding.

buf_size

size of buffer that allocated.

Return Value

name of this annotation, like: "EditBox1[0]"


Page_getAnnotFieldType


get 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 );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

type as these values: 0: unknown 1: button field 2: text field 3: choice field 4: signature field


Page_getAnnotFillColor


get annotation fill color

int Page_getAnnotFillColor(
    PDF_PAGE page,
    PDF_ANNOT annot );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

RGB color


Page_getAnnotFromPoint


get 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 );  
Parameters
page

returned from Document_getPage *

x

x of point, in PDF coordinate *

y

y of point, in PDF coordinate * *

Return Value

annotation object or NULL.


Page_getAnnotIcon


get 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 );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

icon 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_getAnnotListItem


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

item

0 based item index, range: [0, Page_getAnnotListItemCount() - 1] *

buf

output buffer: text string buffer *

buf_len

buffer length * *

Return Value

true or false


Page_getAnnotListItemCount


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

-1: this is not list-box. otherwise: items count.


Page_getAnnotListSels


get 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 );  
Parameters
page

page object returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

sels

int array to revieve selected items. *

sels_max

array length. * *

Return Value

the count that filled in int array.


Page_getAnnotMovie


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

mov

file name of movie data. *

len

buffer length. * *

Return Value

length of mov, or 0.


Page_getAnnotMovieData


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

path

file to save. * *

Return Value

true or false.


Page_getAnnotPopupLabel


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

text

output value: text string buffer. *

len

buffer length. * *

Return Value

true or false.


Page_getAnnotPopupSubject


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

subj

output value: subject string buffer. *

len

buffer length. * *

Return Value

true or false.


Page_getAnnotPopupText


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

text

output value: text string buffer. *

len

buffer length. * *

Return Value

true or false.


Page_getAnnotRect


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

rect

rect of annotation area, in PDF coordinate.


Page_getAnnotReset


is 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

true or false.


Page_getAnnotSound


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

snd

file name of audio data. *

len

buffer length. * *

Return Value

length of snd, or 0.


Page_getAnnotSoundData


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

paras

4 element parameters, if paras[0] == 0, means the data is formatted audio, for example( *.mp3 ) otherwize it is raw sound data. *

path

file to save. * *

Return Value

true or false.


Page_getAnnotStrokeColor


get annotation stroke color

int Page_getAnnotStrokeColor(
    PDF_PAGE page,
    PDF_ANNOT annot );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

RGB color


Page_getAnnotStrokeWidth


get annot stroke width

float Page_getAnnotStrokeWidth(
    PDF_PAGE page,
    PDF_ANNOT annot );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

stroke width


Page_getAnnotSubmitPara


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

para

output value: parameters string buffer. in mail mode: return whole XML string for form data. in http mode: url data likes: "para1=xxx¶2=xxx". *

len

buffer length. * *

Return Value

true or false.


Page_getAnnotSubmitTarget


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

tar

output value: target string buffer. may either formatted in: "mailto:..." or "http://...". *

len

buffer length. * *

Return Value

true or false.


Page_getAnnotType


get 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 );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

type 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_getAnnotURI


get 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

uri

output value: uri buffer to recieve uri address *

len

buffer length. * *

Return Value

length of uri, or 0.


Page_isAnnotHide


is annotation hided?

bool Page_isAnnotHide(
    PDF_PAGE page,
    PDF_ANNOT annot );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

true or false


Page_isAnnotLocked


is annotation locked? to invoke this function, developers should call Page_objsStart or Page_render before.

bool Page_isAnnotLocked(
    PDF_PAGE page,
    PDF_ANNOT annot );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

true or false.


Page_isAnnotLockedContent


is annotation locked? to invoke this function, developers should call Page_objsStart or Page_render before.

bool Page_isAnnotLockedContent(
    PDF_PAGE page,
    PDF_ANNOT annot );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

Return Value

true or false.


Page_objsAlignWord


get index aligned by word. this can be invoked after ObjsStart

int Page_objsAlignWord(
    PDF_PAGE page,
    int from,
    int dir );  
Parameters
page

returned from Document_getPage

from

0 based unicode index.

dir

if dir < 0, get start index of the word. otherwise get last index of the word.

Return Value

new index value.


Page_objsGetCharCount


get chars count. to invoke this function, developers should call Page_objsStart before. *

int Page_objsGetCharCount(
    PDF_PAGE page );  
Parameters
page

returned from Document_getPage * *

Return Value

count of chars.


Page_objsGetCharFontName


get char's font name. this can be invoked after ObjsStart

const char *Page_objsGetCharFontName(
    PDF_PAGE page,
    int index );  
Parameters
page

returned from Document_getPage

index

0 based unicode index.

Return Value

font name, may be null.


Page_objsGetCharIndex


get char index nearest to point

int Page_objsGetCharIndex(
    PDF_PAGE page,
    float x,
    float y );  
Parameters
page

returned from Document_getPage

x

x in PDF coordinate.

y

y in PDF coordinate.

Return Value

char index or -1 failed.


Page_objsGetCharRect


get 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 );  
Parameters
page

returned from Document_getPage *

index

range: [0, Page_objsGetCharCount() - 1] *

rect

output value: rect in PDF coordinate


Page_objsGetString


get 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 );  
Parameters
page

returned from Document_getPage *

from

from index, range: [0, Page_objsGetCharCount() - 1] *

to

to index, range: [0, Page_objsGetCharCount() - 1] *

buf

output value: string value *

len

buffer length. * *

Return Value

count of chars.


Page_objsStart


load all objects in page.

void Page_objsStart(
    PDF_PAGE page );  
Parameters
page

returned from Document_getPage


Page_removeAnnot


remove 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

true or false.


Page_render


render page to dib.

bool Page_render(
    PDF_PAGE page,
    PDF_DIB dib,
    PDF_MATRIX matrix,
    bool show_annots,
    PDF_RENDER_MODE mode );  
Parameters
page

returned from Document_getPage

dib

returned from Global_dibGet

matrix

returned from Matrix_create or Matrix_createScale

show_annots

show annotations?

mode

render mode.

Return Value

true or false.


Page_renderCancel


cancel render, in mostly, this function called by UI thread, and Page_render called by another thread.

void Page_renderCancel(
    PDF_PAGE page );  
Parameters
page

returned from Document_getPage


Page_renderIsFinished


check if page render finished.

bool Page_renderIsFinished(
    PDF_PAGE page );  
Parameters
page

returned from Document_getPage

Return Value

true or false.


Page_renderPrepare


reset status and erase wihite for dib.

void Page_renderPrepare(
    PDF_PAGE page,
    PDF_DIB dib );  
Parameters
page

returned from Document_getPage

dib

returned from Global_dibGet


Page_setAnnotCheckValue


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

check

check status. * *

Return Value

true or false.


Page_setAnnotComboItem


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

item

index of item. * *

Return Value

true or false.


Page_setAnnotEditText


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

text

text string * *

Return Value

true or false


Page_setAnnotFillColor


set annotation fill color

bool Page_setAnnotFillColor(
    PDF_PAGE page,
    PDF_ANNOT annot,
    int color );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

color

RGB color

Return Value

true or false


Page_setAnnotHide


set annotation hided

void Page_setAnnotHide(
    PDF_PAGE page,
    PDF_ANNOT annot,
    bool hide );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

hide

true or false


Page_setAnnotIcon


set 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
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

icon

icon value depends on annotation type. For sticky text note:

  1. Note

  2. Comment

  3. Key

  4. Help

  5. NewParagraph

  6. Paragraph

  7. Insert

  8. Check

  9. Circle

  10. Cross

For file attachment:

  1. PushPin

  2. Graph

  3. Paperclip

  4. Tag

For Rubber Stamp:

  1. "Draft"(default icon)

  2. "Approved"

  3. "Experimental"

  4. "NotApproved"

  5. "AsIs"

  6. "Expired"

  7. "NotForPublicRelease"

  8. "Confidential"

  9. "Final"

  10. "Sold"

  11. "Departmental"

  12. "ForComment"

  13. "TopSecret"

  14. "ForPublicRelease"

  15. "Accepted"

  16. "Rejected"

  17. "Witness"

  18. "InitialHere"

  19. "SignHere"

  20. "Void"

  21. "Completed"

  22. "PreliminaryResults"

  23. "InformationOnly"

  24. "End"

Return Value

true or false


Page_setAnnotListSels


set 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 );  
Parameters
page

page object returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

sels

int array to set selected items. *

sels_cnt

array length. * *

Return Value

the count that filled in int array.


Page_setAnnotPopupLabel


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

text

text string * *

Return Value

true or false


Page_setAnnotPopupSubject


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

subj

subject string. * *

Return Value

true or false


Page_setAnnotPopupText


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

text

text string * *

Return Value

true or false


Page_setAnnotRadio


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

true or false.


Page_setAnnotRect


set 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint *

rect

rect of annotation area, in PDF coordinate.


Page_setAnnotReset


do 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 );  
Parameters
page

returned from Document_getPage *

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint * *

Return Value

true or false.


Page_setAnnotStrokeColor


set annotation stroke color

bool Page_setAnnotStrokeColor(
    PDF_PAGE page,
    PDF_ANNOT annot,
    int color );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

color

RGBA color

Return Value

true or false


Page_setAnnotStrokeWidth


set annot stroke width

bool Page_setAnnotStrokeWidth(
    PDF_PAGE page,
    PDF_ANNOT annot,
    float width );  
Parameters
page

returned from Document_getPage

annot

annotation object returned from Page_getAnnot or Page_getAnnotFromPoint

width

stroke width

Return Value

true or false


PageContent_clipPath


set the path as clip path.

void PageContent_clipPath(
    PDF_PAGECONTENT content,
    PDF_PATH path,
    bool winding );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

path

Path object

winding

winding fill rule?


PageContent_create


create PAGECONTENT

PDF_PAGECONTENT PageContent_create();  
Return Value

PDF_PAGECONTENT object


PageContent_destroy


destroy and free memory.

void PageContent_destroy(
    PDF_PAGECONTENT content );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()


PageContent_drawImage


PDF operator: show image.

void PageContent_drawImage(
    PDF_PAGECONTENT content,
    PDF_PAGE_IMAGE img );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

img

image object created by Page.AddResImage()


PageContent_drawText


show text

void PageContent_drawText(
    PDF_PAGECONTENT content,
    const char *text );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

text

text to show, '\r' or '\n' in string start a new line.


PageContent_fillPath


fill path.

void PageContent_fillPath(
    PDF_PAGECONTENT content,
    PDF_PATH path,
    bool winding );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

path

Path object

winding

winding fill rule


PageContent_gsRestore


PDF operator: gs_restore, restore GraphicState

void PageContent_gsRestore(
    PDF_PAGECONTENT content );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()


PageContent_gsSave


PDF operator: gs_save, save current GraphicState

void PageContent_gsSave(
    PDF_PAGECONTENT content );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()


PageContent_gsSet


PDF operator: set ExtGraphicState

void PageContent_gsSet(
    PDF_PAGECONTENT content,
    PDF_PAGE_GSTATE gs );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

gs

ResGState object created by Page.AddResGState()


PageContent_gsSetMatrix


PDF operator: set matrix.

void PageContent_gsSetMatrix(
    PDF_PAGECONTENT content,
    PDF_MATRIX mat );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

mat

Matrix object


PageContent_setFillColor


PDF operator: set fill and other operations color.

void PageContent_setFillColor(
    PDF_PAGECONTENT content,
    int color );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

color

formatted as 0xRRGGBB, no alpha channel. alpha value shall set by ExtGraphicState(ResGState).


PageContent_setStrokeCap


PDF operator: set line cap

void PageContent_setStrokeCap(
    PDF_PAGECONTENT content,
    int cap );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

cap

0:butt, 1:round: 2:square


PageContent_setStrokeColor


PDF operator: set stroke color.

void PageContent_setStrokeColor(
    PDF_PAGECONTENT content,
    int color );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

color

formatted as 0xRRGGBB, no alpha channel. alpha value shall set by ExtGraphicState(ResGState).


PageContent_setStrokeJoin


PDF operator: set line join

void PageContent_setStrokeJoin(
    PDF_PAGECONTENT content,
    int join );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

join

0:miter, 1:round, 2:bevel


PageContent_setStrokeMiter


PDF operator: set miter limit.

void PageContent_setStrokeMiter(
    PDF_PAGECONTENT content,
    float miter );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

miter

miter limit.


PageContent_setStrokeWidth


PDF operator: set line width

void PageContent_setStrokeWidth(
    PDF_PAGECONTENT content,
    float w );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

w

line width in PDF coordinate


PageContent_strokePath


stroke path.

void PageContent_strokePath(
    PDF_PAGECONTENT content,
    PDF_PATH path );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

path

Path object


PageContent_textBegin


PDF operator: begin text and set text position to (0,0).

void PageContent_textBegin(
    PDF_PAGECONTENT content );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()


PageContent_textEnd


PDF operator: text end.

void PageContent_textEnd(
    PDF_PAGECONTENT content );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()


PageContent_textMove


PDF operator: move text position relative to previous line

void PageContent_textMove(
    PDF_PAGECONTENT content,
    float x,
    float y );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

x

in PDF coordinate add to previous line position

y

in PDF coordinate add to previous line position


PageContent_textNextLine


PDF operator: new a text line

void PageContent_textNextLine(
    PDF_PAGECONTENT content );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()


PageContent_textSetCharSpace


PDF operator: set char space(extra space between chars)

void PageContent_textSetCharSpace(
    PDF_PAGECONTENT content,
    float space );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

space

char space


PageContent_textSetFont


set text font

void PageContent_textSetFont(
    PDF_PAGECONTENT content,
    PDF_PAGE_FONT font,
    float size );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

font

ResFont object created by Page.AddResFont()

size

text size in PDF coordinate.


PageContent_textSetHScale


PDF operator: set horizon scale for chars.

void PageContent_textSetHScale(
    PDF_PAGECONTENT content,
    int scale );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

scale

100 means scale value 1.0f


PageContent_textSetLeading


PDF operator: set text leading, height between 2 text lines.

void PageContent_textSetLeading(
    PDF_PAGECONTENT content,
    float leading );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

leading

leading in PDF coordinate


PageContent_textSetRenderMode


PDF operator: set text render mode.

void PageContent_textSetRenderMode(
    PDF_PAGECONTENT content,
    int mode );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

mode

-

  1. filling

  2. stroke

  3. fill and stroke

  4. do nothing

  5. fill and set clip path

  6. stroke and set clip path

  7. fill/stroke/clip

  8. set clip path.


PageContent_textSetRise


PDF operator: set text rise

void PageContent_textSetRise(
    PDF_PAGECONTENT content,
    float rise );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

rise

<#rise description#>


PageContent_textSetWordSpace


PDF operator: set word space(extra space between words spit by blank char ' ' ).

void PageContent_textSetWordSpace(
    PDF_PAGECONTENT content,
    float space );  
Parameters
content

PDF_PAGECONTENT create by PageContent_create()

space

word space.


Path_closePath


close a contour.

void Path_closePath(
    PDF_PATH path );  
Parameters
path

path create by Path_create()


Path_create


create a contour

PDF_PATH Path_create();  
Return Value

PDF_PATH object


Path_curveTo


curve to operation

void Path_curveTo(
    PDF_PATH path,
    float x1,
    float y1,
    float x2,
    float y2,
    float x3,
    float y3 );  
Parameters
path

path create by Path_create()

x1

x1 value

y1

y1 value

x2

x2 value

y2

y2 value

x3

x3 value

y3

y3 value


Path_destroy


free memory

void Path_destroy(
    PDF_PATH path );  
Parameters
path

path create by Path_create()


Path_getNode


get each node

int Path_getNode(
    PDF_PATH path,
    int index,
    PDF_POINT *pt );  
Parameters
path

path create by Path_create()

index

range [0, GetNodeCount() - 1]

pt

output value: 2 elements coordinate point

Return Value

node type: 0: move to 1: line to 3: curve to, index, index + 1, index + 2 are all data 4: close operation


Path_getNodeCount


get node count

int Path_getNodeCount(
    PDF_PATH path );  
Parameters
path

path create by Path_create()

Return Value

node count


Path_lineTo


move to operation

void Path_lineTo(
    PDF_PATH path,
    float x,
    float y);  
Parameters
path

path create by Path_create()

x

x value

y

y value


Path_moveTo


move to operation

void Path_moveTo(
    PDF_PATH path,
    float x,
    float y);  
Parameters
path

path create by Path_create()

x

x value

y

y value