The MASM Forum

General => The Workshop => Topic started by: JoeCousins on January 08, 2021, 08:03:26 AM

Title: Help on printing formfeeds
Post by: JoeCousins on January 08, 2021, 08:03:26 AM
I want to start using MASM again and I want to get formatted and paginated listings on my Brother mono-laser printer or my Canon color inkjet.  I can't seem to get formfeed control chars imbedded in the file to be recognized.  It just prints the chars and continues on its merry way.  I want to be able to add a control statement to my asm text file like "NP" for new page and have the printer eject to new page while its printing my asm listing.  How do I do that??  anybody?? :rolleyes:  I'm using Windows 10 and Windows 7 pro
Title: Re: Help on printing formfeeds
Post by: jj2007 on January 08, 2021, 09:15:13 AM
See this recent thread (http://masm32.com/board/index.php?topic=9033.msg99307#msg99307). StartDoc, StartPage, EndPage, EndDoc and the EM_FORMATRANGE message are what you need (I doubt that older methods still work).
Title: Re: Help on printing formfeeds
Post by: hutch-- on January 15, 2021, 11:43:36 PM
Joe, you might have to have a look at the printer manual as later printers have little reason to support very old character types.
Title: Re: Help on printing formfeeds
Post by: fearless on January 16, 2021, 01:40:16 AM
Yeh might have to use escape characters to control the line printing. Something like this might work perhaps: https://download.brother.com/welcome/docp000584/cv_pt9700_eng_escp_103.pdf

Printer driver might also have to be set to a dot matrix style line printer for basic escape characters to be recognized in some cases - but some trial and error might be required to test that out, the existing brother driver might be fine with the escape chars from the pdf. Not sure about canon, but the same principle applies about using certain escape chars depending on the printer make and model.


Title: Re: Help on printing formfeeds
Post by: TimoVJL on January 16, 2021, 01:48:29 AM
In GDI mode, scanning every line for FF and call EndPage() for it ?
Title: Re: Help on printing formfeeds
Post by: JoeCousins on January 20, 2021, 10:05:17 AM
I want to thank all who responded and viewed this problem.  Was not able to modify my laser printer driver.  I purchased a Texas Instruments 850 RO printer (dot-matrix) used and its manual off eBay.  In process of cleaning and testing.  Ordered new ribbon and fan-fold paper.  I'll let you guys know how successful I am in this endeavor.  Thanks again for all your help..  JOE