long | MBegin() |
long | MAddFiles(long id,char *infile) |
long | MConvert(long id,char *outfile) |
long | MEncrypt(long id,char *userpassword,char *ownerpassword, long encryptlevel,long printing,long copying,long changing) |
long | MInformation(long id,char *title,char *subject,char *author, char *keywords,char *creator,char *producer) |
long | MWatermark(long id,char *text,long fsize,long fcolor, long position) |
long | MSetParam(long id,long type,char *sparam,char *sparam2, long iparam, long iparam2) |
long | MEnd(long id) |
long MBegin | () | |
Create a handle for convert. | ||
Parameters: | ||
NULL | ||
Return Value: | ||
Return a handle if the create was successful, otherwise 0. | ||
long MEncrypt | (long id, char *userpassword, char *ownerpassword, long encryptlevel, long printing, long copying, long changing) |
|
Encrypt pdf. | ||
Parameters: | ||
id | A handle to the file. | |
userpassword | Document Open password. | |
ownerpassword | Permissions password. | |
encryptlevel | Encryption Level. 128-bit, 40-bit. | |
printing | Permit Printing. | |
copying | Permit Content Copying or Extraction. | |
changing | Permit Changing the Document. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MInformation | (long id, char *title, char *subject, char *author, char *keywords, char *creator, char *producer) |
|
Set pdf information. | ||
Parameters: | ||
id | A handle to the file. | |
title | Set 'title' to PDF file | |
subject | Set 'subject' to PDF file. | |
author | Set 'author' to PDF file. | |
keywords | Set 'keywords' to PDF file. | |
creator | Set 'creator' to PDF file. | |
producer | Set 'producer' to PDF file. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MWatermark | (long id, char *text, long fsize, long fcolor, long position) |
|
Text stamping. | ||
Parameters: | ||
id | A handle to the file. | |
text | The content of the stamp. | |
fsize | Set the font size, default is 16 point. | |
fcolor | Specify the text color,range from 0-16777215,default is 255(red). | |
position | The Position of stamps. 1 = Stamps on the Top-Left of the page. (default) 2 = Stamps on the Top-Center of the page. 3 = Stamps on the Top-Right of the page. 4 = Stamps on the Right-Center of the page. 5 = Stamps on the Right-Bottom of the page. 6 = Stamps on the Bottom-Center of the page. 7 = Stamps on the Left-Bottom of the page. 8 = Stamps on the Left-Center of the page. 9 = Stamps on the Center of the page. |
|
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MConvert | (long id, char *outfile) |
|
Convert one file to one pdf file. | ||
Parameters: | ||
id | A handle to the file. | |
outfile | A string that is path to the output PDF file.
e.g. "c:\image.pdf", Combine all files into one PDF file. "c:\imagepdf\", Convert to the destination folder. NULL, Convert to the source file folder. |
|
Return Value: | ||
Returns 1 if convert is successfully, -1 if no image file input, otherwise 0. | ||
long MAddFiles | (long id, char *infile) |
|
Add file. | ||
Parameters: | ||
id | A handle to the file. | |
infile | A string that is the path to the desired file. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MSetParam | (long id, long type, char *sparam, char *sparam2, long iparam, long iparam2) |
|
Set pdf information. | ||
Parameters: | ||
id | A handle to the file. | |
type | Set parameter type, see TYPE. | |
sparam | A String value of the parameter. | |
sparam2 | A String value of the parameter. | |
iparam | A integer value of the parameter. | |
iparam2 | A integer value of the parameter. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MEnd | (long id) | |
Close the pdf file. | ||
Parameters: | ||
id | A handle to the file. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. |
Type | Value | |
PARAM_DPI | 100 | Set DPI (72-1200). invalid if set "PARAM_PAGESIZE". |
PARAM_SKEW | 101 | Skew correct for black/white tiff file. (only for tiff file) |
PARAM_BOOKMARK | 102 | Set Bookmarks. 1 = use the page number as bookmarks. 2 = use the short filename as bookmarks. 3 = use the full filename as bookmarks. |
PARAM_ROTATE | 103 | Set page rotate. "90, 180, 270" |
PARAM_PAGESIZE | 104 | Set page size and image position, Page size support: "A3, A4, A5, B5, Letter, Legal",or set custom size. Image position: 1 = Fit page, 2 = Stretch, 3 = Center. e.g. MSetParam(id,PARAM_PAGESIZE,"600","800",1,0) is set page width 600, height 800, and image fit page. e.g. MSetParam(id,PARAM_PAGESIZE,"A4",0,3,0) is set page A4, and center image. |
PARAM_CTIFF | 105 | Set color tiff recompress,"lzw","zip","packbits","jpeg". Jpeg quality (0-100,default is 75) if selected jpeg compress arithmetic. e.g. MSetParam(id,PARAM_CTIFF,"jpeg",0,80,0) is set jpeg recompress, and quality is 80. |
PARAM_GTIFF | 106 | Set graycale tiff recompress,"lzw","zip","packbits","jpeg". Jpeg quality (0-100,default is 75) if selected jpeg compress arithmetic. e.g. MSetParam(id,PARAM_GTIFF,"jpeg",0,50,0) is set jpeg recompress, and quality is 50. |
PARAM_BWTIFF | 107 | Set black-white tiff recompress,"lzw","zip","g3","g4". |
VIEW_SHOW | 200 | Document options 1 = Show page only 2 = Show the bookmark panel 3 = Show the thumbnail panel |
VIEW_ZOOM | 201 | Display & zoom 1 = Fit to width of page 2 = Fit one full page to window |
VIEW_RESIZE | 202 | Resize window to the initial page |
VIEW_CENTER | 203 | Center window on screen |
VIEW_FULL | 204 | Open in full screen mode |
VIEW_HIDEM | 205 | Hide Menu bar |
VIEW_HIDET | 206 | Hide Toolbars |
VIEW_HIDEC | 207 | Hide Window controls |
Any time that you need help while using products, please contact our support team at support@mgosoft.com.
We promise to our customers that we will deal with emails within 24 hours after receiving them.