Export a page to an image using current ini settings or prompt user with export options
Export a page to an image using the specified settings
bool export_page_to_image( Page & pg, LPCSTR lpcszFileName, LPCSTR lpcszFormat, BOOL bShowOptions = FALSE )
bool export_page_to_image( LPCSTR lpcszFileName, LPCSTR lpcszFormat, Page & pg, int nWidth, int nHeight, int nBitsPerPixel, int nCompression = 0, bool bGrayScale = false )
Returns 0 for success, non-zero for error.
Returns TRUE for success, FALSE for failure.
EX1
int export_page_to_image_ex1() { GraphPage gp; gp.Create(); if( !gp) { return 1; } bool bRet=export_page_to_image( gp, "c:\\test.bmp", "bmp", false); if( bRet) printf("export succeed!"); else printf("export fail!"); return 0; }
EX2
void export_page_to_image_ex2() { GraphPage gp; gp.Create(); if( !gp ) { return; } string strImagePath("C:\\Test.bmp"); int nRet = export_page_to_image(strImagePath, "bmp", gp, 1024, 768, 8, 0, false); }
origin.h