ipdf_pageprocess.h
页面处理:插入、替换、删除、旋转、裁剪、拆分与合并。
介面說明保留標頭檔裡面嘅英文原文 —— 照文件寫程式時要一眼對得上程式碼嘅註解。
常數
| 簽章 | Value | Description |
|---|---|---|
| PAGEART_ELEMENT_TYPE_UNKNOW | -1 | Unknow element type. |
| PAGEART_ELEMENT_TYPE_BACKGROUND | 0 | Background element of page. |
| PAGEART_ELEMENT_TYPE_WATERMARK | 1 | Watermark element of page. |
| PAGEART_ELEMENT_TYPE_HEADERANDFOOTER | 2 | Header and footer element of page. |
| PAGEART_ELEMENT_TYPE_BATES | 3 | Bates numbering element of page. |
| PAGEARTS_SOURCETYPE_UNKNOWN | -1 | Unknow source type. |
| PAGEARTS_SOURCETYPE_TEXT | 0 | Text source. |
| PAGEARTS_SOURCETYPE_PATH | 1 | Path source. |
| PAGEARTS_SOURCETYPE_PDF | 2 | PDF source. |
| PAGEARTS_SOURCETYPE_IMGAGE | 3 | Image source. |
| UNIT_INCHES | 0 | Inchies. |
| UNIT_PERCENT | 1 | Percent. |
| UNIT_CENTIMETERS | 2 | Centermeters. |
| UNIT_MILLIMETERS | 3 | Millimeters. |
| UNIT_PICAS | 4 | Picas. |
| UNIT_POINTS | 5 | Points. |
| PAGEARTS_ALIGTN_TOP | 0 | Align top. |
| PAGEARTS_ALIGTN_VCENTER | 1 | Align center in vertical. |
| PAGEARTS_ALIGTN_BOTTOM | 2 | Align bottom. |
| PAGEARTS_ALIGTN_LEFT | 3 | Align left. |
| PAGEARTS_ALIGTN_HCENTER | 4 | Align center in horizontal. |
| PAGEARTS_ALIGTN_RIGHT | 5 | Align right. |
| PAGEARTS_ALIGTN_HF_LEFT | 0 | Align left. |
| PAGEARTS_ALIGTN_HF_CENTER | 1 | Align center. |
| PAGEARTS_ALIGTN_HF_RIGTH | 2 | Align right. |
| DATEFORMAT_TYPE_SLASH_MD | 0 | m/d |
| DATEFORMAT_TYPE_SLASH_MDYY | 1 | m/d/yy |
| DATEFORMAT_TYPE_SLASH_MDYYYY | 2 | m/d/yyyy |
| DATEFORMAT_TYPE_SLASH_MMDDYY | 3 | mm/dd/y |
| DATEFORMAT_TYPE_SLASH_MMDDYYYY | 4 | mm/dd/yyyy |
| DATEFORMAT_TYPE_SLASH_DMYY | 5 | d/m/yy |
| DATEFORMAT_TYPE_SLASH_DMYYYY | 6 | d/m/yyyy |
| DATEFORMAT_TYPE_SLASH_DDMMYY | 7 | dd/mm/yy |
| DATEFORMAT_TYPE_SLASH_DDMMYYYY | 8 | dd/mm/yyyy |
| DATEFORMAT_TYPE_SLASH_MMYY | 9 | mm/yy |
| DATEFORMAT_TYPE_SLASH_MMYYYY | 10 | mm/yyyy |
| DATEFORMAT_TYPE_DOT_MDYY | 11 | m.d.yy |
| DATEFORMAT_TYPE_DOT_MDYYYY | 12 | m.d.yyyy |
| DATEFORMAT_TYPE_DOT_MMDDYY | 13 | mm.dd.yy |
| DATEFORMAT_TYPE_DOT_MMDDYYYY | 14 | mm.dd.yyyy |
| DATEFORMAT_TYPE_DOT_MMYY | 15 | mm.yy |
| DATEFORMAT_TYPE_DOT_DMYYYY | 16 | d.m.yyyy |
| DATEFORMAT_TYPE_DOT_DDMMYY | 17 | dd.mm.yy |
| DATEFORMAT_TYPE_DOT_DDMMYYYY | 18 | dd.mm.yyyy |
| DATEFORMAT_TYPE_LINE_YYMMDD | 19 | yy-mm-dd |
| DATEFORMAT_TYPE_LINE_YYYYMMDD | 20 | yyyy-mm-dd |
| PAGENUMBERFORMAT_TYPE_NUMBER | 0 | 1 |
| PAGENUMBERFORMAT_TYPE_NUMBER_OF_COUNT | 1 | 1 of n |
| PAGENUMBERFORMAT_TYPE_NUMBER_SLASH_COUNT | 2 | 1/n |
| PAGENUMBERFORMAT_TYPE_PAGE_NUMBER | 3 | Page 1 |
| PAGENUMBERFORMAT_TYPE_PAGE_NUMBER_OF_COUNT | 4 | Page 1 of n |
class IPDF_PageOrganizer
PDF Page Orgnizer interface.
方法(11)
| 簽章 | 說明 |
|---|---|
| Release() | Release page orgaizer. |
| InsertBlankAt(int page_index, float width, float height) | Insert a blank page into document. |
| InsertPagesFrom(int insert_at, const IPDF_Document* doc_from, int* pages_fro…) | Copy PDF pages from another PDF document and insert into document. |
| DeletePages(int start, int page_count) | Delete PDF pages from the document. |
| RepalcePages(int start, int page_count, const IPDF_Document* doc_from, in…) | Replace PDF pages with another PDF document. |
| SwapPages(int page1, int page2) | Swap PDF pages . |
| ExtractPages(int* to_extarct_pages_array, int array_len, IPDF_Document* d…) | Extract PDF pages. |
| MovePages(int nMoveAt, const unsigned int* to_moved_pages_array, int l…) | Move PDF pages. |
| RotatePage(int iPage, int nRotateFlag) | Rotate PDF page. |
| ResetMediaBox(int iPage, const PDSDK_FloatRect* rect) | Reset page media box. |
| ResetCropBox(int iPage, const PDSDK_FloatRect* rect) | Reset page crop box. |
InsertBlankAt
void InsertBlankAt(int page_index, float width, float height) = 0;
Insert a blank page into document.
參數
index(in) — The zero-based page index, range is zero to page count.width(in) — Width of new blank page.height(in) — Height of new blank page.
InsertPagesFrom
void InsertPagesFrom(int insert_at, const IPDF_Document* doc_from, int* pages_from_array, int array_len) = 0;
Copy PDF pages from another PDF document and insert into document.
參數
insert_at(in) — The page index the pages start to insert.doc_from(in) — The document which pages will be copied.pages_from_array(in) — An array used to spcified page indexies whitch to by copied form source PDF.array_len(in) — Length of pages_from_array.
DeletePages
void DeletePages(int start, int page_count) = 0;
Delete PDF pages from the document.
參數
start(in) — The index which start to delete.page_count(in) — The page numbers to delete.
RepalcePages
void RepalcePages(int start, int page_count, const IPDF_Document* doc_from, int* pages_from_array, int array_len) = 0;
Replace PDF pages with another PDF document.
參數
start(in) — The page index the pages start to replace.page_count(in) — The page numbers will be replaced.doc_from(in) — The source document which pages will be copied.pages_from_array(in) — An array used to spcified page indexies whitch to by copied form source PDF.array_len(in) — Length of pages_from_array.
SwapPages
void SwapPages(int page1, int page2) = 0;
Swap PDF pages .
參數
page1(in) — The page index.page2(in) — The other page index.
ExtractPages
void ExtractPages(int* to_extarct_pages_array, int array_len, IPDF_Document* doc_dest) = 0;
Extract PDF pages.
參數
to_extract_pages_array(in) — An array specified the page indexies to be extract.array_len(in) — Length of 'to_extract_pages_array'.doc_dest(in) — The destination PDF document to receive the extracted pages.
MovePages
void MovePages(int nMoveAt, const unsigned int* to_moved_pages_array, int len_pages_array) = 0;
Move PDF pages.
參數
nMoveAt(in) — The page index where the pages will move at.to_moved_pages_array(in) — An array specified the page indexies to be movied.len_pages_array(in) — Length of 'to_moved_pages_array'.
RotatePage
void RotatePage(int iPage, int nRotateFlag) = 0;
Rotate PDF page.
參數
iPage(in) — The page index specified the page to be rotated.nRotateFlag(in) — Rotate flag. 0 for no rotate, 1 for 90 degree clockwise, 2 for 180 degree clockwise, 3 for 270 degree clockwise.
ResetMediaBox
void ResetMediaBox(int iPage, const PDSDK_FloatRect* rect) = 0;
Reset page media box.
參數
iPage(in) — The page index specified the page to be setted the media box.rect(in) — The new media box.
ResetCropBox
void ResetCropBox(int iPage, const PDSDK_FloatRect* rect) = 0;
Reset page crop box.
參數
iPage(in) — The page index specified the page to be setted the crop box.rect(in) — The new crop box.
class IPDF_PageDesigner
PDF Page Designer interface.
方法(53)
| 簽章 | 說明 |
|---|---|
| Release() | Release page designer. |
| SetPreviewMode(int bPrevViewOnly) | Set preview mode. |
| GetDocument() | Get PDF document. |
| ResetDoc(IPDF_Document* pDoc) | — |
| SetFontInfo(int element_type, IPDF_Font* font, const wchar_t* font_face_…) | Set font information to art elements. |
| GetFontInfo(int element_type, float* font_size, int* charset, int* under…) | Get font information from art elements. |
| GetFontName(int element_type) | Get font name. |
| SetFixedPrint(int element_type, int fixed_printin) | Set fixed-printing flag. |
| IsFixedPrint(int element_type) | Test whether the element is fiexed-printing. |
| SetBackgroundOrTextColor(int element_type, unsigned int color) | Set color for background or watermark text. |
| GetColor(int element_type) | Get background color or text color for other typed element. |
| SetPageRange(int element_type, int start_page, int end_page, int bOddPage…) | Set page range to apply art element. |
| GetPageRange(int element_type, int* start_page, int* end_page, int* bOddP…) | Get page range which will be apply art element. |
| SetSource(int element_type, int type, const wchar_t* text_watermark, c…) | Set source for background or watermark. |
| GetWatermarkText() | Get watermark text. |
| GetSourceType(int element_type) | Get source type. |
| GetSourceFilePath(int element_type) | Get source file path. |
| GetSourceIndex(int element_type) | Get source pdf page index. |
| GetPassword(int element_type) | Get password of source pdf. |
| SetSourceIndex(int element_type, int index) | Set source page index for background or watermark. |
| SetElementPosition(int element_type, int is_showontop, int unit_type, int align…) | Set the position of element. |
| GetElementPosition(int element_type, int* is_showontop, int* unit_type, int* al…) | Get the position of element. |
| SetBasicSettings(int element_type, float scale, float rotate, float opacity) | Set scale, rotate, opacity to art element. |
| GetBasicSettings(int element_type, float* scale, float* rotate, float* opacit…) | Get scale, rotate, opacity setting from art element. |
| SetApperanceSettings(int element_type, int display_screen, int display_printing) | Set apperance setting to art element. |
| GetApperanceSettings(int element_type, int* display_screen, int* display_printing) | Get apperance setting to art element. |
| SetCurDate(int nYear, int nMonth, int nDay) | Set current date to Header&Footer element. |
| SetTextMargins(int element_type, float left_margin, float right_margin, flo…) | Set text margin to Header&Footer and bateNumbering element. |
| GetTextMargins(int element_type, float* left_margin, float* right_margin, f…) | Get text margins from Header&Footer and bateNumbering element. |
| SetShrink(int element_type, int shrink) | Set shrink flag to Header&Footer and bateNumbering element. |
| GetShrink(int element_type, int* shrink) | Get shrink flag from Header&Footer and bateNumbering element. |
| SetPageNumberSetting(int start_page_index, int type_pagenumber) | Set page number format to Header&Footer and bateNumbering element. |
| SetDateType(int type_date) | Set date format to Header&Footer and bateNumbering element. |
| SetHeaderText(int element_type, const wchar_t* left_text, const wchar_t* c…) | Set header text to Header&Footer and bateNumbering element. |
| SetFooterText(int element_type, const wchar_t* left_text, const wchar_t* c…) | Set footer text to Header&Footer and bateNumbering element. |
| GetHeaderText_Left(int element_type) | Get the left header text. |
| GetHeaderText_Center(int element_type) | Get the center header text. |
| GetHeaderText_Right(int element_type) | Get the right header text. |
| GetFooterText_Left(int element_type) | Get the left footer text. |
| GetFooterText_Center(int element_type) | Get the center footer text. |
| GetFooterText_Right(int element_type) | Get the right footer text. |
| SetBatesNumberingFormat(int digits, long long start_number, const wchar_t* prefix, c…) | Set BatesNumbering format. |
| GetBatesNumberingDigits() | Get digits of batesnumbbering. |
| GetBatesNumberingStartNumber() | Get start number of batesnumbbering. |
| GetBatesNumberingPrefix() | Get prefix text of batesnumbbering. |
| GetBatesNumberingSuffix() | Get suffix text of batesnumbbering. |
| IsExistBackground(int page_index, int bLoadSettings = 0) | Test whether the background element is exist. |
| IsExistWatermark(int page_index, int bLoadSettings = 0) | Test whether the watermark element is exist. |
| IsExistHeaderAndFooter(int page_index, int bLoadSettings = 0) | Test whether the header&footer element is exist. |
| IsExistBates(int page_index, int bLoadSettings = 0) | Test whether the batesNumbering element is exist. |
| DoInsert(IPDF_Page* page, int page_index, int element_type) | Insert art element to PDF page. |
| DoUpdate(IPDF_Page* page, int page_index, int element_type) | Update art element to PDF page. |
| DoRemove(IPDF_Page* page, int element_type) | Remove art element from PDF page. |
SetFontInfo
void SetFontInfo(int element_type, IPDF_Font* font, const wchar_t* font_face_name, float font_size, int charset, int underline) = 0;
Set font information to art elements.
參數
element_type(in) — The type of art elements. @see Art element typesfont(in) — The PDF font.font_face_name(in) — Font face name.font_size(in) — Font size.charset(in) — Charset ID. @see Font charsetsunderline(in) — A flag indicate whether text is need underline.1 for underline, 0 for normal.
GetFontInfo
IPDF_Font* GetFontInfo(int element_type, float* font_size, int* charset, int* underline) = 0;
Get font information from art elements.
參數
element_type(in) — The type of art elements. @see Art element typesfont_size(out) — Font size.charset(out) — Charset ID. @see Font charsetsunderline(out) — A flag indicate whether text is need underline. 1 for underline, 0 for normal.
GetFontName
const wchar_t* GetFontName(int element_type) = 0;
Get font name.
參數
element_type(in) — The type of art elements. @see Art element types
傳回值:The font name.
SetFixedPrint
void SetFixedPrint(int element_type, int fixed_printin) = 0;
Set fixed-printing flag.
參數
element_type(in) — The type of art elements. @see Art element typesfixed_printin(in) — The new fix-printing flag. 1 for fixed-printing, 0 for not.
SetBackgroundOrTextColor
void SetBackgroundOrTextColor(int element_type, unsigned int color) = 0;
Set color for background or watermark text.
參數
element_type(in) — The type of art elements. @see Art element typescolor(in) — The RGB color.Use the macro COLOR_MAKERGB to make a RGB format color.
GetColor
unsigned int GetColor(int element_type) = 0;
Get background color or text color for other typed element.
參數
element_type(in) — The type of art elements. @see Art element types
傳回值:The RGB color. if equal ((DWORD)-1), means no stroke color be used.
SetPageRange
void SetPageRange(int element_type, int start_page, int end_page, int bOddPagesOnly, int bEvenPagesOnly) = 0;
Set page range to apply art element.
參數
element_type(in) — The type of art elements. @see Art element typesstart_page(in) — The start page index.end_page(in) — The end page index.bOddPagesOnly(in) — Odd pages only flag. 1 for odd pages only, 0 for not.bEvenPagesOnly(in) — Even pages only flag. 1 for even pages only, 0 for not.
GetPageRange
void GetPageRange(int element_type, int* start_page, int* end_page, int* bOddPagesOnly, int* bEvenPagesOnly) = 0;
Get page range which will be apply art element.
參數
element_type(in) — The type of art elements. @see Art element typesstart_page(out) — Receiv start page index.end_page(out) — Receiv end page index.bOddPagesOnly(out) — Receiv odd pages only flag. 1 for odd pages only, 0 for not.bEvenPagesOnly(out) — Receiv even pages only flag. 1 for even pages only, 0 for not.
SetSource
void SetSource(int element_type, int type, const wchar_t* text_watermark, const wchar_t* file_source, const char* pwd, int page_index) = 0;
Set source for background or watermark.
參數
element_type(in) — The type of art elements. @see Art element typestype(in) — The source type. @see Element source types.text_watermark(in) — The text of wartermark, not useful for background element.file_source(in) — The pdf or image file path.pwd(in) — The password for encrypted pdf.page_index(in) — The page index specificed which source page will be use as wartermark or backgound.
SetSourceIndex
void SetSourceIndex(int element_type, int index) = 0;
Set source page index for background or watermark.
參數
element_type(in) — The type of art elements. @see Art element typesindex(in) — The page index specificed which source page will be use as wartermark or backgound.
SetElementPosition
void SetElementPosition(int element_type, int is_showontop, int unit_type, int align_h, float space_h, int align_v, float space_v) = 0;
Set the position of element.
參數
element_type(in) — The type of art elements. @see Art element typesis_showontop(in) — A flag indicate whether the art element is show on top or background. .unit_type(in) — Unit type. @see Unit typesalign_h(in) — Horizontal alignment. @see Alignment of background and watermarkspace_h(in) — The space on horizontal.align_v(in) — Vertical alignment. @see Alignment of background and watermarkspace_v(in) — The space on vertical.
GetElementPosition
void GetElementPosition(int element_type, int* is_showontop, int* unit_type, int* align_h, float* space_h, int* align_v, float* space_v) = 0;
Get the position of element.
參數
element_type(in) — The type of art elements. @see Art element typesis_showontop(out) — A flag indicate whether the art element is show on top or background. .unit_type(out) — Unit type. @see Unit typesalign_h(out) — Horizontal alignment. @see Alignment of background and watermarkspace_h(out) — The space on horizontal.align_v(out) — Vertical alignment. @see Alignment of background and watermarkspace_v(out) — The space on vertical.
SetBasicSettings
void SetBasicSettings(int element_type, float scale, float rotate, float opacity) = 0;
Set scale, rotate, opacity to art element.
參數
element_type(in) — The type of art elements. @see Art element typesscale(in) — The zoom factor.rotate(in) — The rotation radian.opacity(in) — The opacity.(0-1.0)
GetBasicSettings
void GetBasicSettings(int element_type, float* scale, float* rotate, float* opacity) = 0;
Get scale, rotate, opacity setting from art element.
參數
element_type(in) — The type of art elements. @see Art element typesscale(out) — Receiv zoom factor.rotate(out) — Receiv rotation radian.opacity(out) — Receiv opacity.(0-1.0)
SetApperanceSettings
void SetApperanceSettings(int element_type, int display_screen, int display_printing) = 0;
Set apperance setting to art element.
參數
element_type(in) — The type of art elements. @see Art element typesdisplay_screen(in) — A flag indicate whether the element can be display when PDF pages show in screen.display_printing(in) — A flag indicate whether the element can be display when print.
GetApperanceSettings
void GetApperanceSettings(int element_type, int* display_screen, int* display_printing) = 0;
Get apperance setting to art element.
參數
element_type(in) — The type of art elements. @see Art element typesdisplay_screen(out) — Receiv the display screen flag.display_printing(out) — Receiv the display printing flag.
SetCurDate
void SetCurDate(int nYear, int nMonth, int nDay) = 0;
Set current date to Header&Footer element.
參數
nYear(in) — The year.nMonth(in) — The month.nDay(in) — The day.
SetTextMargins
void SetTextMargins(int element_type, float left_margin, float right_margin, float top_margin, float bottom_margin) = 0;
Set text margin to Header&Footer and bateNumbering element.
參數
element_type(in) — The type of art elements. @see Art element typesleft_margin(in) — Left margin of text.right_margin(in) — Right margin of text.top_margin(in) — Top margin of text.bottom_margin(in) — Bottom margin of text.
GetTextMargins
void GetTextMargins(int element_type, float* left_margin, float* right_margin, float* top_margin, float* bottom_margin) = 0;
Get text margins from Header&Footer and bateNumbering element.
參數
element_type(in) — The type of art elements. @see Art element typesleft_margin(out) — Receiv left margin of text.right_margin(out) — Receiv right margin of text.top_margin(out) — Receiv top margin of text.bottom_margin(out) — Receiv bottom margin of text.
SetShrink
void SetShrink(int element_type, int shrink) = 0;
Set shrink flag to Header&Footer and bateNumbering element.
參數
element_type(in) — The type of art elements. @see Art element typesshrink(in) — Shrink flag. 1 for shrink, 0 for not.
GetShrink
void GetShrink(int element_type, int* shrink) = 0;
Get shrink flag from Header&Footer and bateNumbering element.
參數
element_type(in) — The type of art elements. @see Art element typesshrink(out) — Receiv shrink flag. 1 for shrink, 0 for not.
SetPageNumberSetting
void SetPageNumberSetting(int start_page_index, int type_pagenumber) = 0;
Set page number format to Header&Footer and bateNumbering element.
參數
start_page_index(in) — The start page index.type_pagenumber(in) — Specificate the format of page number. @see Page number format
SetDateType
void SetDateType(int type_date) = 0;
Set date format to Header&Footer and bateNumbering element.
參數
type_date(in) — Specificate the format of date. @see Date formate
SetHeaderText
void SetHeaderText(int element_type, const wchar_t* left_text, const wchar_t* center_text, const wchar_t* right_text) = 0;
Set header text to Header&Footer and bateNumbering element.
參數
element_type(in) — The type of art elements. @see Art element typesleft_text(in) — Left header text.center_text(in) — Center header text.right_text(in) — Right header text.
SetFooterText
void SetFooterText(int element_type, const wchar_t* left_text, const wchar_t* center_text, const wchar_t* right_text) = 0;
Set footer text to Header&Footer and bateNumbering element.
參數
element_type(in) — The type of art elements. @see Art element typesleft_text(in) — Left footer text.center_text(in) — Center footer text.right_text(in) — Right footer text.
SetBatesNumberingFormat
void SetBatesNumberingFormat(int digits, long long start_number, const wchar_t* prefix, const wchar_t* suffix) = 0;
Set BatesNumbering format.
參數
digits(in) — The digits number of bates numbering.start_number(in) — The start number of bates numbering.prefix(in) — The prefix text of bates numbering.suffix(in) — The suffix text of bates numbering.
IsExistBackground
int IsExistBackground(int page_index, int bLoadSettings = 0) = 0;
Test whether the background element is exist.
參數
page_index(in) — The page index specificate the page to be test the background element.bLoadSettings(in) — A flag indicate whether loading the backgound settings or not.
IsExistWatermark
int IsExistWatermark(int page_index, int bLoadSettings = 0) = 0;
Test whether the watermark element is exist.
參數
page_index(in) — The page index specificate the page to be test the watermark element.bLoadSettings(in) — A flag indicate whether loading the watermark settings or not.
IsExistHeaderAndFooter
int IsExistHeaderAndFooter(int page_index, int bLoadSettings = 0) = 0;
Test whether the header&footer element is exist.
參數
page_index(in) — The page index specificate the page to be test the header&footer element.bLoadSettings(in) — A flag indicate whether loading the header&footer settings or not.
IsExistBates
int IsExistBates(int page_index, int bLoadSettings = 0) = 0;
Test whether the batesNumbering element is exist.
參數
page_index(in) — The page index specificate the page to be test the batesNumbering element.bLoadSettings(in) — A flag indicate whether loading the batesNumbering settings or not.
DoInsert
int DoInsert(IPDF_Page* page, int page_index, int element_type) = 0;
Insert art element to PDF page.
參數
page(in) — The page which will insert the art element.page_index(in) — The page index of page parameter.element_type(in) — The type of art elements. @see Art element types
DoUpdate
int DoUpdate(IPDF_Page* page, int page_index, int element_type) = 0;
Update art element to PDF page.
參數
page(in) — The page which will insert the art element.page_index(in) — The page index of page parameter.element_type(in) — The type of art elements. @see Art element types
DoRemove
int DoRemove(IPDF_Page* page, int element_type) = 0;
Remove art element from PDF page.
參數
page(in) — The page which will insert the art element.element_type(in) — The type of art elements. @see Art element types
class IPDF_Combinner
PDF Combinner interface.
方法(8)
| 簽章 | 說明 |
|---|---|
| Release() | Release the PDF combinner. |
| SetDeviceDPI(int logx, int logy) | Set the logical dpi with device. The dpi will be used to convert image file to pdf page. |
| StartCombin(const wchar_t* imgfile_or_pdffile, const wchar_t* bookmark_t…) | Add files to combinner and do combin. |
| StartCombin(const char* imgfile_or_pdffile_utf8, const char* bookmark_ti…) | Add files to combinner and do combin. |
| StartCombin(const unsigned short* imgfile_or_pdffile_utf16, const unsign…) | Add files to combinner and do combin. |
| EndCombin(int bBookmark = 1) | End combin and build bookmark tree. |
| GetDestDoc() | Get the combinned PDF document. |
| TakeDestDoc() | Take the combinned PDF document out. |
SetDeviceDPI
void SetDeviceDPI(int logx, int logy) = 0;
Set the logical dpi with device. The dpi will be used to convert image file to pdf page.
參數
logx(in) — The x-direction logical width.logy(in) — The y-direction logical height.
StartCombin
int StartCombin(const wchar_t* imgfile_or_pdffile, const wchar_t* bookmark_title, const char* password = 0) = 0;
Add files to combinner and do combin.
參數
imgfile_or_pdffile(in) — The image file path or pdf path (unicode).bookmark_title(in) — The bookmark title associate with image file or pdf file. 0 for no bookmark title.password(in) — The password for encrypted pdf.
傳回值:1 for success, 0 for failure.
StartCombin
int StartCombin(const char* imgfile_or_pdffile_utf8, const char* bookmark_title_utf8, const char* password = 0) = 0;
Add files to combinner and do combin.
參數
imgfile_or_pdffile(in) — The image file path or pdf path (utf8).bookmark_title(in) — The bookmark title associate with image file or pdf file. 0 for no bookmark title.password(in) — The password for encrypted pdf.
傳回值:1 for success, 0 for failure.
StartCombin
int StartCombin(const unsigned short* imgfile_or_pdffile_utf16, const unsigned short* bookmark_title_utf16, const char* password = 0) = 0;
Add files to combinner and do combin.
參數
imgfile_or_pdffile(in) — The image file path or pdf path (utf16).bookmark_title(in) — The bookmark title associate with image file or pdf file. 0 for no bookmark title.password(in) — The password for encrypted pdf.
傳回值:1 for success, 0 for failure.
EndCombin
int EndCombin(int bBookmark = 1) = 0;
End combin and build bookmark tree.
參數
bBookmark(in) — A flag indicate whether build the bookmark tree. 1 for building bookmark tree, 0 for not.
傳回值:1 for success, 0 for failure.
GetDestDoc
IPDF_Document* GetDestDoc() = 0;
Get the combinned PDF document.
傳回值:The combinned PDF document. NOTE: Do not release the returned document, the combinner will free it.
TakeDestDoc
IPDF_Document* TakeDestDoc() = 0;
Take the combinned PDF document out.
傳回值:The combinned PDF document. NOTE: Must release the returned document, the combinner doesn't handle it now.