PS To PDF SDK

long MBegin()
long MAddFiles(long id,char *infile)
long MConvert(long id,char *infile,char *outfile)
long MConvertAll(long id,char *outfile)
long MEncrypt(long id,char *userpassword,char *ownerpassword, long encryptlevel,long printing,long copying,long changing,long adding)
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 angle,long xoff,long yoff,long background)
long MPageSize(long id,char *pagesize)
long MSetPDFA(long id,long pdfa)
long MEnd(long id)


Detailed Description


  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,
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 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,
long angle,
long xoff,
long yoff,
long background)
  Se 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 MConvert (long id,
char *infile,
char *outfile)
  Convert one ps file to one 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 MConvertAll (long id,
char *outfile)
  Combine all ps files into one pdf file, use MAddFiles to add ps files.
  Parameters:  
  id A handle to the file.
  outfile A string that is path to the output pdf file.
  Return Value:  
  Returns 1 if convert is successfully, -1 if output pdf path error, otherwise 0.
   
   
  long MAddFiles (long id,
char *infile)
  Add ps files.
  Parameters:  
  id A handle to the file.
  infile A string that is the path to the desired ps file.
  Return Value:  
  Returns 1 if successfully, otherwise 0.
   
   
  long MPageSize (long id,
char *pagesize)
  Set page size.
  Parameters:  
  id A handle to the file.
  pagesize Support: "Executive","Letter","Legal","Ledger","A4","A3","Monarch","COM_10","DL","C5","B5"
  Return Value:  
  Returns 1 if successfully, otherwise 0.
   
   
  long MSetPDFA (long id,
long pdfa)
  Create a PDF/A document, invalid if set MEncrypt.
  Parameters:  
  id A handle to the file.
  pdfa Set 1 to create a PDF/A document
  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.




Technical Support

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.


Copyright © 2022 Mgosoft.com, Inc