PDF To JPEG SDK

long MLoad (char *filename,char *password)
long MEncode (long id,long pageno)
void MFree (long id)
long MGetCount (long id)
long MSetParam (long id,char *outpath,long imagetype, long bitcount,long quality,long grayscale,long rotate,long width,long height,long xdpi,long ydpi)


Detailed Description


  long MLoad ( char *filename,
  char *password
)
  Open a pdf file.
  Parameters:  
  filename 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 filename is NULL or an empty string.
Return -2 fi pdf file is restricted and password is NULL or error.
   
   
  long MEncode ( long id,
  long pageno
)
  Convert Multi-page PDF file to single page JPG, JPEG2000 files.
  Parameters:  
  id A handle to the file.
  pageno Specify page number to convert.
  Return Value:  
  Returns 1 if convert is successfully, otherwise 0.
   
   
  long MFree ( long id )
  Closes pdf file and deletes the object.
  Parameters:  
  id A handle to the file.
  Return Value:  
  Returns 1 if the file is successfully closed, otherwise 0.
   
   
  long MGetCount ( long id )
  Retrieves the pages count of the pdf file.
  Parameters:  
  id A handle to the file.
  Return Value:  
  The count of pages, otherwise 0.
   
   
  long MSetParam ( long id,
  char *outpath,
  long imagetype,
  long bitcount,
  long quality,
  long grayscale,
  long rotate,
  long width,
  long height,
  long xdpi,
  long ydpi
)
  Set the parameter.
  Parameters:  
  id A handle to the file.
  outpath Set output path. If path is NULL or an empty string, it save in the same folder as source file.
  imagetype Set generated image format. see ENUM_IMAGE_FORMATS.
  bitcount Set the color depth in the generated image file, 8=256 colors, 24=true color. see COLOR_DEPTH.
  quality Set quality (1 ~ 100) in the generated JPEG file, default 75.
  grayscale The 1 is convert to grayscale image file, this option is only available while bitcount equal 4 and 8.
  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.
  Return Value:  
  Returns 1 if set is successfully, otherwise 0.




ENUM_IMAGE_FORMATS

Formats Value Support color depth, 8=256 colors, 24=true color, g=grayscale
IMAGE_FORMAT_JPG 1 8-g,, 24
IMAGE_FORMAT_JP2 2 8-g,, 24
IMAGE_FORMAT_JPC 3 8-g,, 24




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 © 2013 Mgosoft Corporation.