The following compileable 8.04 code, extracted from an application of mine, creates TWO pages of output on my HP laserJet 1020. If I comment out the XPRINT SET ORIENTATION line then a single page results. Funnily enough, other non-PB applications which I use do not result in a blank page being printed first, even when the orientation appears to have been changed.
I would prefer not to have to ditch XPRINT, as I have an investment of time in the application, but this blank page makes the application look inept.
Am I misusing XPRINT? Expecting too much of XPRINT? Will there be a happy ending?
I would prefer not to have to ditch XPRINT, as I have an investment of time in the application, but this blank page makes the application look inept.
Am I misusing XPRINT? Expecting too much of XPRINT? Will there be a happy ending?
Code:
#COMPILE EXE #DIM ALL #INCLUDE "WIN32API.INC" %IDD_DIALOG1 = 101 CALLBACK FUNCTION ShowDIALOG1Proc() SELECT CASE AS LONG CBMSG CASE %WM_INITDIALOG XPRINT ATTACH "laserjet" XPRINT FONT "Courier New", 10, 0 XPRINT SET ORIENTATION 2 XPRINT : XPRINT :XPRINT "hello world!"; XPRINT CLOSE END SELECT END FUNCTION '---------------------------------------------------- FUNCTION ShowDIALOG1(BYVAL hParent AS DWORD) AS LONG LOCAL lRslt AS LONG LOCAL hDlg AS DWORD DIALOG NEW hParent, "LaserJet 1020 XPRINT test", 70, 70, 201, 121, %WS_POPUP OR %WS_BORDER OR %WS_DLGFRAME OR %WS_SYSMENU OR _ %WS_CLIPSIBLINGS OR %WS_VISIBLE OR %DS_MODALFRAME OR %DS_3DLOOK OR %DS_NOFAILCREATE OR %DS_SETFONT, %WS_EX_CONTROLPARENT _ OR %WS_EX_LEFT OR %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR, TO hDlg DIALOG SHOW MODAL hDlg, CALL ShowDIALOG1Proc TO lRslt FUNCTION = lRslt END FUNCTION '================================================ FUNCTION PBMAIN() ShowDIALOG1 %HWND_DESKTOP END FUNCTION
Comment