PDA

View Full Version : PrintFile problem


panfeng
December 13th, 2006, 07:57 PM
Hi,
I want to ask you a question. Could I set paper size before I print it out? And I want to pint paper one by one,but when I use FoxitReaderSDK1.PrintFile,it will appear dialog box
.For example:...

FoxitReaderSDK1.openfile('d:\a.pdf');
FoxitReaderSDK1.papersize:=DM_PAPER_A3;
FoxitReaderSDK1.print;

Could you have good idea? Thanks a lot.

wanli_zi
January 9th, 2007, 05:13 PM
Hi,it's sure that you can set paper size before you print it out, and you must change the paper's name. There is a example for vc as follow :

DEVMODE* lpDevMode = (DEVMODE*)PrintDialog.GetDevMode(); //Get
//the printer mode
lpDevMode->dmPaperSize =0;// DMPAPER_USER;
lpDevMode->dmFields |= DM_PAPERSIZE;
lpDevMode->dmPaperLength = length;
lpDevMode->dmPaperWidth = width;
strcpy((char *)lpDevMode->dmFormName,"");//set the paper size
//as NULL or “Custom Size”


Our FoxitReaderSDK (.DLL) also print paper one by one