PDF Split Merge SDK

long MSplitBegin(char *infile, char *password);
long MSplit(long id, char *output, long mode, char *range)
long MSplitEnd(long id)
long MMergeBegin()
long MMergeSetFiles(long id, char *infile, char *password, char *range)
long MMerge(long id, char *outfile)
long MMergeEnd(long id)
long MWatermark(long id, char *text, long fsize, long fcolor, long position, long angle, long xoff, long yoff, long asbackground)


Detailed Description


  long MSplitBegin ( char *infile,
  char *password )
  Open a pdf file for split.
  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 restricted.
  Return Value:  
  Return a handle if the open was successful.
Return -1 if pdf file unexist or damaged.
Return -2 if pdf file is restricted.
   
   
  long MSplit (long id,
char *output,
long mode,
char *range)
  Split pdf.
  Parameters:  
  id A handle to the file.
  output Specify output path or file. while mode=1, is output path; while mode=2, is output file; while mode=3, is output file.
  mode Specify output mode, 1=split pdf into single pages, 2=delete specify pages, 3=extract specify pages.
  range Specify page range to split.
  Return Value:  
  Returns 1 if split is successfully, otherwise 0.
   
   
  long MSplitEnd (long id)
  Close the opened pdf file.
  Parameters:  
  id A handle to the file.
  Return Value:  
  Returns 1 if successfully, otherwise 0.
   
   
  long MMergeBegin ()
  Create a pdf file for merge.
  Parameters:  
  NULL  
  Return Value:  
  Return a handle if the create was successful, otherwise 0.
   
   
  long MMergeSetFiles (long id,
char *infile,
char *password,
char *range)
  Add pdf file for merge.
  Parameters:  
  id A handle to the file.
  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 restricted.
  range Specify page range to merge, merge all page if NULL.
  Return Value:  
  Return 1 if add file successful.
Return -1 if pdf file unexist or damaged.
Return -2 if pdf file is restricted.
   
   
  long MMerge (long id,
char *outfile)
  Merge pdf.
  Parameters:  
  id A handle to the file.
  outfile A string that is the path to the merge pdf file.
  Return Value:  
  Returns 1 if merge is successfully, otherwise 0.
   
   
  long MMergeEnd (long id)
  Close the merged pdf file.
  Parameters:  
  id A handle to the 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 asbackground)
  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
  asbackground Placed text watermark under the existing content.
  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 © 2017 Mgosoft.com, Inc