long | MBegin() |
long | MSetImageParam (long id, long imagetype, long bitcount, long quality, long rotate, long width, long height, long xdpi, long ydpi, long compression, long multipage) |
long | MConvertToImage(long id, char *infile, char *outpath, char *filename) |
long | MConvertToPDF(long id, char *infile, char *outfile) |
long | MConvertToPDFEx(long id, char *infile, char *outfile, char *pagerange) |
long | MPDFEncrypt(long id, char *userpassword, char *ownerpassword, long encryptlevel, long printing, long copying, long changing, long adding) |
long | MPDFInformation(long id, char *title, char *subject, char *author, char *keywords, char *creator, char *producer) |
long | MPDFWatermark(long id, char *text, long fsize, long fcolor, long position, long angle, long xoff, long yoff, long background) |
long | MConvertToText(long id, char *infile, char *outfile, long mode, long pagebreak); |
long | MEnd(long id) |
long MBegin | () | |
Create a handle for convert. | ||
Parameters: | ||
NULL | ||
Return Value: | ||
Return a handle if the create was successful, -1 if load "pscore.dll" error, -2 if load "mstar.dll" error, otherwise 0. | ||
long MSetImageParam | (
long id, long imagetype, long bitcount, long quality, long rotate, long width, long height, long xdpi, long ydpi, long compression, long multipage ) |
|
Set the parameter. | ||
Parameters: | ||
id | A handle to the file. | |
imagetype | Set generated image format. see ENUM_IMAGE_FORMATS. | |
bitcount | Set the color depth in the generated image file, 1=black and white, 3=16 grayscale, 4=16 colors, 7=256 grayscale, 8=256 colors, 24=true color. see COLOR_DEPTH. | |
quality | Set quality (1 ~ 100) in the generated JPEG file or TIFF file jpeg compression, default 75. | |
rotate | Set page rotate angle(0~360). | |
width | Set page width. e.g. width=1, height=1280, set height as 1280 pixels, and width to according to the pdf page size relative. | |
height | Set page height. e.g. width=800, height=1, set width as 800 pixels, and height to according to the pdf page size relative. | |
xdpi | Set horizontal resolution (72 ~ 600), default 72. | |
ydpi | Set vertical resolution (72 ~ 600), default 72. | |
compression | Set the Compression method in the generated TIFF file, this option is only available for TIFF files. see ENUM_TIFF_COMPRESSION. | |
multipage | The 1 is generate a multi-page TIFF file, the 0 is generate a TIFF file for each page, this option is only available for TIFF files | |
Return Value: | ||
Returns 1 if set is successfully, otherwise 0. | ||
long MConvertToImage | (long id, char *infile, char *outpath, char *filename) |
|
Convert to Image file. | ||
Parameters: | ||
id | A handle to the file. | |
infile | A string that is path to the input PS file. | |
outpath | Set output path. If path is NULL or an empty string, it save in the same folder as source file. | |
filename | A string that is name to the output Image file. | |
Return Value: | ||
Returns 1 if convert is successfully, -1 if input ps path error, -2 if output Image path error, otherwise 0. | ||
long MPDFEncrypt | (long id, char *userpassword, char *ownerpassword, long encryptlevel, long printing, long copying, long changing, long adding) |
|
Set pdf encryption. | ||
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. | |
adding | Permit Adding or changing form fields. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MPDFInformation | (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 MPDFWatermark | (long id, char *text, long fsize, long fcolor, long position, long angle, long xoff, long yoff, long background) |
|
Set pdf 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. |
|
angle | The Angle for stamps,range from 0-360. | |
xoff | Offset from current position. e.g 10 Move to right 10 point e.g -10 Move to left 10 point |
|
yoff | Offset from current position. e.g 10 Move to bottom 10 point e.g -10 Move to top 10 point |
|
background | Placed text watermark under the existing content. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MConvertToPDF | (long id, char *infile, char *outfile) |
|
Convert file to pdf file. | ||
Parameters: | ||
id | A handle to the file. | |
infile | A string that is path to the input PS file. | |
outfile | A string that is path to the output PDF file. | |
Return Value: | ||
Returns 1 if convert is successfully, -1 if input ps path error, -2 if output pdf path error, otherwise 0. | ||
long MConvertToText | (long id, char *infile, char *outfile, long mode, long pagebreak) |
|
Convert file to Text file. | ||
Parameters: | ||
id | A handle to the file. | |
infile | A string that is path to the input PS file. | |
outfile | A string that is path to the output Text file. | |
mode | Text output mode. 1 = Maintain original physical layout. 2 = Keep strings in content stream order. |
|
pagebreak | Insert page breaks between pages. | |
Return Value: | ||
Returns 1 if convert is successfully, -1 if input ps path error, -2 if output txt path error, otherwise 0. | ||
long MEnd | (long id) | |
Close the handle. | ||
Parameters: | ||
id | A handle to the file. | |
Return Value: | ||
Returns 1 if successfully, otherwise 0. | ||
long MConvertToPDFEx | (long id, char *infile, char *outfile, char *pagerange) |
|
Convert file to pdf file. | ||
Parameters: | ||
id | A handle to the file. | |
infile | A string that is path to the input PS file. | |
outfile | A string that is path to the output PDF file. | |
pagerange | Specified page range, pagerange=1,3,5 indicates that pages 1, 3 and 5 should be processed. pagerange=5-10 indicates that pages 5, 6, 7, 8, 9 and 10 should be processed. pagerange=1, 5-10, 12- indicates that pages 1, 5, 6, 7, 8, 9, 10 and 12 onwards should be processed. |
|
Return Value: | ||
Returns 1 if convert is successfully, -1 if input ps path error, -2 if output pdf path error, otherwise 0. |
Formats | Value | Support color depth, see COLOR_DEPTH. |
IMAGE_FORMAT_BMP | 1 | 1,, 3,, 4,, 7,, 8,, 24 |
IMAGE_FORMAT_EMF | 2 | 24 |
IMAGE_FORMAT_WMF | 3 | 24 |
IMAGE_FORMAT_JPG | 4 | 7,, 24 |
IMAGE_FORMAT_PNG | 5 | 1,, 3,, 4,, 7,, 8,, 24 |
IMAGE_FORMAT_GIF | 6 | 1,, 3,, 4,, 7,, 8 |
IMAGE_FORMAT_TIF | 7 | 1,, 3,, 4,, 7,, 8,, 24 |
IMAGE_FORMAT_PCX | 8 | 1,, 3,, 4,, 7,, 8,, 24 |
IMAGE_FORMAT_TGA | 9 | 7,, 8,, 24 |
IMAGE_FORMAT_JP2 | 10 | 7,, 24 |
IMAGE_FORMAT_RAS | 11 | 7,, 24 |
IMAGE_FORMAT_JPC | 12 | 7,, 24 |
Compression | Value | Support color depth, see COLOR_DEPTH. | |
COMPRESSION_NONE | 0 | dump mode | 1,, 3,, 4,, 7,, 8,, 24 |
COMPRESSION_LZW | 1 | Lempel-Ziv & Welch | 1,, 3,, 4,, 7,, 8,, 24 |
COMPRESSION_JPEG | 2 | %JPEG DCT compression | 7,, 24 |
COMPRESSION_PACKBITS | 3 | Macintosh RLE | 3,, 4,, 7,, 8,, 24 |
COMPRESSION_CCITTFAX4 | 4 | CCITT Group 4 fax encoding | 1 |
COMPRESSION_CCITTFAX3 | 5 | CCITT Group 3 fax encoding | 1 |
COMPRESSION_CCITTRLE | 6 | CCITT modified Huffman RLE | 1 |
Color | Value | ||
BITCOUNT_1 | 1 | black/white( 1 bits ) | |
BITCOUNT_4G | 3 | 16 color grayscale( 4 bits ) | |
BITCOUNT_4 | 4 | 16 color( 4 bits ) | |
BITCOUNT_8G | 7 | 256 color grayscale( 8 bits ) | |
BITCOUNT_8 | 8 | 256 color( 8 bits ) | |
BITCOUNT_24 | 24 | True color( 24 bits ) |
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.