long |
MExtractxtBegin(char *infile, char *password) |
long |
MExtractxt(long id,char *output,long mode,long firstpage,long endpage,long pagebreaks) |
long |
MExtractxtEnd(long id) |
|
|
long |
MTextToPDFBegin() |
long |
MTextToPDFInputFiles(long id, char *infile) |
long |
MTextToPDFMargin(long id,long top,long left,long right,long bottom,long tabsize) |
long |
MTextToPDFFont(long id, char *pfontname, long fsize, long frotate, long fcolor, long bgcolor, long outline) |
long |
MTextToPDFRotate(long id, long rotate) |
long |
MTextToPDFEncrypt(long id, char *userpassword, char *ownerpassword, long level, long printing, long copying, long modifying) |
long |
MTextToPDFInfo(long id, char *title, char *subject, char *author, char *keywords, char *creator, char *producer) |
long |
MTextToPDFSize(long id, char *psize, long width, long height, long newline, long pagebreak) |
long |
MTextToPDF(long id, char *output) |
long |
MTextToPDFEnd(long id) |
|
|
long MExtractxtBegin |
( char *infile, char *password ) |
Open a pdf file. |
Parameters: |
|
|
infile |
A string that is the path to the desired pdf file. |
|
password |
A string that is the password to open pdf file if pdf is encrypted. |
Return Value: |
|
|
Return a handle if file open was successful.
Return -1 if the pdf file is encrypted.
Return -2 if the pdf file cannot open. |
|
|
long MExtractxt |
(long id,
char *output,
long mode,
long firstpage,
long endpage,
long pagebreaks) |
Start extract txt. |
Parameters: |
|
|
id |
A handle to the file. |
|
output |
Specify output text file. |
|
mode |
0 = Maintain original physical layout.
1 = Keep strings in content stream order. |
|
firstpage |
First page to convert. |
|
endpage |
Last page to convert. |
|
pagebreaks |
1 = Insert page breaks between pages. |
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
long MExtractxtEnd |
(long id) |
Close the pdf file. |
Parameters: |
|
|
id |
A handle to the file. |
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
|
|
|
|
long MTextToPDFBegin |
() |
Create a handle for PDF. |
Parameters: |
|
|
NULL |
|
Return Value: |
|
|
Return a handle if the create was successful, otherwise 0. |
|
|
long MTextToPDFInputFiles |
(long id,
char *infile) |
Parameters: |
|
|
id |
A handle to the file. |
|
infile |
The path of input text file. |
Return Value: |
|
|
Returns 1 if successfully, otherwise 0.
|
|
|
long MTextToPDF |
(long id, char *output) |
Start converting. |
Parameters: |
|
|
id |
A handle to the file. |
|
outfile |
The path of output.. e.g.
"c:\\out\\", it mean one text to one pdf.
"c:\\out.pdf", it mean merge all input text files to one pdf. |
Return Value: |
|
|
Returns 1 if successfully,
Returns 0 if convert failed.
Return -1 if can't create target pdf file. |
|
|
long MTextToPDFEnd |
() |
Close the PDF file. |
Parameters: |
|
|
NULL |
|
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
long MTextToPDFEncrypt |
(long id,
char *userpassword,
char *ownerpassword,
long level,
long printing,
long copying,
long changing) |
Parameters: |
|
|
id |
A handle to the file. |
|
userpassword |
Document open password. |
|
ownerpassword |
Permission password. |
|
level |
Set encrypt level, 1 = 40bit RC4, 2 = 128bit RC4, 3 = 128bit AES |
|
printing |
1 = Permit print. |
|
copying |
1 = Permit copy. |
|
changing |
1 = Permit modify. |
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
long MTextToPDFMargin |
(long id, long top, long left, long right, long bottom, long tabsize) |
Set page margin to PDF file |
Parameters: |
|
|
id |
A handle to the file. |
|
top |
Set top margin. 1-999, default is 64. |
|
left |
Set left margin. 1-999, default is 64. |
|
right |
Set right margin. 1-999, default is 64. |
|
bottom |
Set bottom margin. 1-999, default is 64. |
|
tabsize |
Set tab size. 1-16. default is 4. |
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
long MTextToPDFFont |
(long id, char *pfontname, long fsize, long frotate, long fcolor, long bgcolor, long outline) |
Set Text font parameter. |
Parameters: |
|
|
id |
A handle to the file. |
|
pfontname |
Set Text font name, default is "Courier", support Base 14 Fonts and Windows System Fonts e.g. "Arial", |
|
fsize |
Font size. 1-1000, default is 12 |
|
frotate |
Text rotate. 0-360 |
|
fcolor |
Text color. 0-16777215. |
|
bgcolor |
Text background color. 0-16777215. -1 = No set background colors |
|
outline |
Set Text outline. |
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
long MTextToPDFRotate |
(long id, long rotate)
|
Set PDF page orientation. |
Parameters: |
|
|
id |
A handle to the pdf file. |
|
rotate |
Page orientation, 0, 90, 180, 270
|
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
long MTextToPDFInfo |
(long id, char *title, char *subject, char *author, char *keywords, char *creator, char *producer) |
Set PDF Information |
Parameters: |
|
|
id |
A handle to the pdf 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 MTextToPDFSize |
(long id, char *psize, long width, long height, long newline, long pagebreak) |
Start to stamping. |
Parameters: |
|
|
id |
A handle to the pdf file. |
|
psize |
Set page size to PDF file. supoort "a3, a4, a5, b5, letter, legal, custom" |
|
width |
Custom page with. |
|
height |
Custom page height.
|
|
newline |
Set Newline, 0 = none, 1 = word wrap(default), 2 = char wrap
|
|
pagebreak |
1 = Set Page Break.
|
Return Value: |
|
|
Returns 1 if successfully, otherwise 0. |
|
|
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.