I have never used Xprint up to now as most of my printing requirements are Right to Left.
I have RTFM'd but I cannot find anything - is it possible?
I have RTFM'd but I cannot find anything - is it possible?
DWORD SetLayout( HDC hdc, // handle to DC DWORD dwLayout, // layout options );
#COMPILE EXE #DIM ALL #INCLUDE "win32api.inc" DECLARE FUNCTION SetLayout LIB "gdi32.dll" ALIAS "SetLayout" (BYVAL hdc AS DWORD, BYVAL dwLayout AS DWORD) AS DWORD %LAYOUT_BITMAPORIENTATIONPRESERVED = &H8 FUNCTION PBMAIN () AS LONG LOCAL hDC AS DWORD, oldDir AS DWORD XPRINT ATTACH DEFAULT IF ERR = 0 AND LEN(XPRINT$) > 0 THEN XPRINT COLOR RGB(225,225,255) XPRINT GET DC TO hDC ' prints on the left side of the page XPRINT "This is your printer talking" oldDir = SetLayout (hDC, %LAYOUT_BITMAPORIENTATIONPRESERVED) ' also prints on the left side of the page XPRINT "This is your printer talking" XPRINT FORMFEED ' Issue a formfeed SetLayout hDC, oldDir XPRINT CLOSE ' Deselect the printer END IF END FUNCTION
XPRINT TEXT SIZE thetext$ TO xx!,yy! XPRINT GET CLIENT TO ww!,hh! 'according to xprint scale XPRINT GET POS TO x!,y! 'current line info (column pos unimportant) x!=(ww!-xx!) 'figure the starting pos for text XPRINT SET POS (x!,y!) 'set the position XPRINT thetext$
'PBCC5 program #COMPILE EXE #DIM NONE FUNCTION PBMAIN () AS LONG XPRINT ATTACH CHOOSE XPRINT GET PPI TO x&,y& GRAPHIC BITMAP NEW 5000, 500 TO hBmp& 'a bitmap big enough to hold whatever text you might print PrintScale!= x&/72 'The approximate difference in scale, the screen is usually 72dpi, should be looked up in final code FONT NEW "Courier New",18 * PrintScale!,1,0,1,0 TO hFont& '18 point (quarter inch high), bold, MyText$="Text to print backwards red?." GRAPHIC ATTACH hBmp&, 0 GRAPHIC SET FONT hFont& GRAPHIC COLOR %BLACK,%WHITE GRAPHIC TEXT SIZE MyText$ TO w&,h& GRAPHIC PRINT MyText$ 'position on page to print the text WhereToX&=800 WhereToY&=400 'now copy the bitmap from the graphic to the printer but do it backwads. XPRINT STRETCH hBmp&,0,(0,0)-(w&-1,h&-1) TO (WhereToX&+w&-1,WhereToY&)-(WhereToX&,WhereToY&+h&-1) XPRINT FORMFEED XPRINT CLOSE END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment