Electronics-Related.com
Forums

printing with formfeeds

Started by John Larkin April 14, 2021
This is a multi-part message in MIME format.
--------------857FAEF7CFC1BC5E8B7C5AC0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

John Larkin wrote:
> On Thu, 15 Apr 2021 01:45:54 +0000 (UTC), > DecadentLinuxUserNumeroUno@decadence.org wrote: > >> John Larkin <jlarkin@highland_atwork_technology.com> wrote in >> news:o5se7gppa00im5svc5ej766pt5184virgk@4ax.com: >> >>> On Wed, 14 Apr 2021 22:09:45 +0000 (UTC), >>> DecadentLinuxUserNumeroUno@decadence.org wrote: >>> >>>> Ed Lee <edward.ming.lee@gmail.com> wrote in >>>> news:304707f9-4854-4c75- b2a1-f8504ddbfd06n@googlegroups.com: >>>> >>>>> On Wednesday, April 14, 2021 at 11:52:04 AM UTC-7, John Larkin >>>>> wrote: >>>>>> I have some old assembly listing files that are text, paged >>>>>> by formfeed characters. I can't find a way to print nice >>>>>> listings on a modern laser printer/copier. They ignore the >>>>>> formfeeds or print a black box. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Maybe I could write a program to replace the ff's with a >>>>>> control sequence or something? >>>>> >>>>> man pr >>>>> The old fashion way. >>>>> >>>> >>>> Output to a text file and then edit the file and remove the >>>> offending control sequences. >>> >>> It's already a text file, an assembly listing. >>> >>> The "control sequence" is a single formfeed character per page. >>> But I want that to shoot out a fresh page! >>> >>> There might actually be some escape sequence that the Cannon >>> copier/printer accepts as a page feed, but I can't find it. >>> >>> >> >> I am saying to use a filter to pull everything out but the text. >> Then you can put whatever you want there to make it work right. > > I can write a program to find formfeeds and replace with some escape > sequence that the copier/printer recognizes as a page feed; I just > don't know what will work. Googling didn't help. > > Actually, I'm not sure that I can actually send a stream of characters > to this kind of printer... opened as LPT3: or something. There may be > drivers in the way. >
GNU enscript will turn it into a PDF. You can control whether it observes or ignores formfeeds, among many other things (see attached). Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com --------------857FAEF7CFC1BC5E8B7C5AC0 Content-Type: text/plain; charset=UTF-8; name="enscript.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="enscript.txt" VXNhZ2U6IGVuc2NyaXB0IFtPUFRJT05dLi4uIFtGSUxFXS4uLgpNYW5kYXRvcnkgYXJndW1l bnRzIHRvIGxvbmcgb3B0aW9ucyBhcmUgbWFuZGF0b3J5IGZvciBzaG9ydCBvcHRpb25zIHRv by4KICAtIyAgICAgICAgICAgICAgICAgICAgICAgICBhbiBhbGlhcyBmb3Igb3B0aW9uIC1u LCAtLWNvcGllcwogIC0xICAgICAgICAgICAgICAgICAgICAgICAgIHNhbWUgYXMgLS1jb2x1 bW5zPTEKICAtMiAgICAgICAgICAgICAgICAgICAgICAgICBzYW1lIGFzIC0tY29sdW1ucz0y CiAgICAgIC0tY29sdW1ucz1OVU0gICAgICAgICAgc3BlY2lmeSB0aGUgbnVtYmVyIG9mIGNv bHVtbnMgcGVyIHBhZ2UKICAtYSwgLS1wYWdlcz1QQUdFUyAgICAgICAgICBzcGVjaWZ5IHdo aWNoIHBhZ2VzIGFyZSBwcmludGVkCiAgLUEsIC0tZmlsZS1hbGlnbj1BTElHTiAgICAgYWxp Z24gc2VwYXJhdGUgaW5wdXQgZmlsZXMgdG8gQUxJR04KICAtYiwgLS1oZWFkZXI9SEVBREVS ICAgICAgICBzZXQgcGFnZSBoZWFkZXIKICAtQiwgLS1uby1oZWFkZXIgICAgICAgICAgICBu byBwYWdlIGhlYWRlcnMKICAtYywgLS10cnVuY2F0ZS1saW5lcyAgICAgICBjdXQgbG9uZyBs aW5lcyAoZGVmYXVsdCBpcyB0byB3cmFwKQogIC1DW1NUQVJUXSwgLS1saW5lLW51bWJlcnNb PVNUQVJUXQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZWNlZGUgZWFja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g ICAgICAgIHJlYWQgaW5wdXQgZmlsZXMgdGhyb3VnaCBpbnB1dCBmaWx0ZXIgQ01ECiAgLWos IC0tYm9yZGVycyAgICAgICAgICAgICAgcHJpbnQgYm9yZGVycyBhcm91bmQgY29sdW1ucwog IC1KLCAgICAgICAgICAgICAgICAgICAgICAgIGFuIGFsaWFzIGZvciBvcHRpb24gLS10aXRs ZQogIC1rLCAtLXBhZ2UtcHJlZmVlZCAgICAgICAgIGVuYWJsZSBwYWdlIHByZWZlZWQKICAt SywgLS1uby1wYWdlLXByZWZlZWQgICAgICBkaXNhYmxlIHBhZ2UgcHJlZmVlZAogIC1sLCAt LWxpbmVwcmludGVyICAgICAgICAgIHNpbXVsYXRlIGxpbmVwcmludGVyLCB0aGlzIGlzIGFu IGFsaWFzIGZvcjoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tbGluZXMtcGVy LXBhZ2U9NjYsIC0tbm8taGVhZGVyLCAtLXBvcnRyYWl0LAogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgLS1jb2x1bW5zPTEKICAtTCwgLS1saW5lcy1wZXItcGFnZT1OVU0gICBz cGVjaWZ5IGhvdyBtYW55IGxpbmVzIGFyZSBwcmludGVkIG9uIGVhY2ggcGFnZQogIC1tLCAt LW1haWwgICAgICAgICAgICAgICAgIHNlbmQgbWFpbCB1cG9uIGNvbXBsZXRpb24KICAtTSwg LS1tZWRpYT1OQU1FICAgICAgICAgICB1c2Ugb3V0cHV0IG1lZGlhIE5BTUUKICAtbiwgLS1j b3BpZXM9TlVNICAgICAgICAgICBwcmludCBOVU0gY29waWVzIG9mIGVhY2ggcGFnZQogIC1O LCAtLW5ld2xpbmU9TkwgICAgICAgICAgIHNlbGVjdCB0aGUgbmV3bGluZSBjaGFyYWN0ZXIu ICBQb3NzaWJsZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlcyBmb3IgTkwg YXJlOiBuIChgXG4nKSBhbmQgciAoYFxyJykuCiAgLW8gICAgICAgICAgICAgICAgICAgICAg ICAgYW4gYWxpYXMgZm9yIG9wdGlvbiAtLW91dHB1dAogIC1PLCAtLW1pc3NpbmctY2hhcmFj dGVycyAgIGxpc3QgbWlzc2luZyBjaGFyYWN0ZXJzCiAgLXAsIC0tb3V0cHV0PUZJTEUgICAg ICAgICAgbGVhdmUgb3V0cHV0IHRvIGZpbGUgRklMRS4gIElmIEZJTEUgaXMgYC0nLAogICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGxlYXZlIG91dHB1dCB0byBzdGRvdXQuCiAgLVAs IC0tcHJpbnRlcj1OQU1FICAgICAgICAgcHJpbnQgb3V0cHV0IHRvIHByaW50ZXIgTkFNRQog IC1xLCAtLXF1aWV0LCAtLXNpbGVudCAgICAgIGJlIHJlYWxseSBxdWlldAogIC1yLCAtLWxh bmRzY2FwZSAgICAgICAgICAgIHByaW50IGluIGxhbmRzY2FwZSBtb2RlCiAgLVIsIC0tcG9y dHJhaXQgICAgICAgICAgICAgcHJpbnQgaW4gcG9ydHJhaXQgbW9kZQogIC1zLCAtLWJhc2Vs aW5lc2tpcD1OVU0gICAgIHNldCBiYXNlbGluZXNraXAgdG8gTlVNCiAgLVMsIC0tc3RhdHVz ZGljdD1LRVlbOlZBTFVFXQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhc3MgYSBz dGF0dXNkaWN0IGRlZmluaXRpb24gdG8gdGhlIG91dHB1dAogIC10LCAtLXRpdGxlPVRJVExF ICAgICAgICAgIHNldCBiYW5uZXIgcGFnZSdzIGpvYiB0aXRsZSB0byBUSVRMRS4gIE9wdGlv bgogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHMgYWxzbyB0aGUgbmFtZSBvZiB0 aGUgaW5wdXQgZmlsZSBzdGRpbi4KICAtVCwgLS10YWJzaXplPU5VTSAgICAgICAgICBzZXQg dGFidWxhdG9yIHNpemUgdG8gTlVNCiAgLXVbVEVYVF0sIC0tdW5kZXJsYXlbPVRFWFRdICAg ICAg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cmludCB0YWJsZSBv ZiBjb250ZW50cwogIC0tdWwtYW5nbGU9QU5HTEUgICAgICAgICAgIHNldCB1bmRlcmxheSB0 ZXh0J3MgYW5nbGUgdG8gQU5HTEUKICAtLXVsLWZvbnQ9TkFNRSAgICAgICAgICAgICBwcmlu dCB1bmRlcmxheXMgd2l0aCBmb250IE5BTUUKICAtLXVsLWdyYXk9TlVNICAgICAgICAgICAg ICBwcmludCB1bmRlcmxheXMgd2l0aCBncmF5IHZhbHVlIE5VTQogIC0tdWwtcG9zaXRpb249 UE9TICAgICAgICAgIHNldCB1bmRlcmxheSdzIHN0YXJ0aW5nIHBvc2l0aW9uIHRvIFBPUwog IC0tdWwtc3R5bGU9U1RZTEUgICAgICAgICAgIHByaW50IHVuZGVybGF5cyB3aXRoIHN0eWxl IFNUWUxFCiAgLS13b3JkLXdyYXAgICAgICAgICAgICAgICAgd3JhcCBsb25nIGxpbmVzIGZy b20gd29yZCBib3VuZGFyaWVzCgpSZXBvcnQgYnVncyB0byA8YnVnLWVuc2NyaXB0QGdudS5v cmc+Lgo= --------------857FAEF7CFC1BC5E8B7C5AC0--
On Thu, 15 Apr 2021 19:55:32 -0400, Phil Hobbs
<pcdhSpamMeSenseless@electrooptical.net> wrote:

>John Larkin wrote: >> On Thu, 15 Apr 2021 01:45:54 +0000 (UTC), >> DecadentLinuxUserNumeroUno@decadence.org wrote: >> >>> John Larkin <jlarkin@highland_atwork_technology.com> wrote in >>> news:o5se7gppa00im5svc5ej766pt5184virgk@4ax.com: >>> >>>> On Wed, 14 Apr 2021 22:09:45 +0000 (UTC), >>>> DecadentLinuxUserNumeroUno@decadence.org wrote: >>>> >>>>> Ed Lee <edward.ming.lee@gmail.com> wrote in >>>>> news:304707f9-4854-4c75- b2a1-f8504ddbfd06n@googlegroups.com: >>>>> >>>>>> On Wednesday, April 14, 2021 at 11:52:04 AM UTC-7, John Larkin >>>>>> wrote: >>>>>>> I have some old assembly listing files that are text, paged >>>>>>> by formfeed characters. I can't find a way to print nice >>>>>>> listings on a modern laser printer/copier. They ignore the >>>>>>> formfeeds or print a black box. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Maybe I could write a program to replace the ff's with a >>>>>>> control sequence or something? >>>>>> >>>>>> man pr >>>>>> The old fashion way. >>>>>> >>>>> >>>>> Output to a text file and then edit the file and remove the >>>>> offending control sequences. >>>> >>>> It's already a text file, an assembly listing. >>>> >>>> The "control sequence" is a single formfeed character per page. >>>> But I want that to shoot out a fresh page! >>>> >>>> There might actually be some escape sequence that the Cannon >>>> copier/printer accepts as a page feed, but I can't find it. >>>> >>>> >>> >>> I am saying to use a filter to pull everything out but the text. >>> Then you can put whatever you want there to make it work right. >> >> I can write a program to find formfeeds and replace with some escape >> sequence that the copier/printer recognizes as a page feed; I just >> don't know what will work. Googling didn't help. >> >> Actually, I'm not sure that I can actually send a stream of characters >> to this kind of printer... opened as LPT3: or something. There may be >> drivers in the way. >> >GNU enscript will turn it into a PDF. You can control whether it >observes or ignores formfeeds, among many other things (see attached). > >Cheers > >Phil Hobbs
I used Foxit to turn it into a PDF. It recognizes the pages. But it doesn't print as pages!
On Thu, 15 Apr 2021 19:34:22 -0400, Spehro Pefhany
<speffSNIP@interlogDOTyou.knowwhat> wrote:

>On Thu, 15 Apr 2021 14:58:19 -0700, boB <boB@K7IQ.com> wrote: > >>On Wed, 14 Apr 2021 17:22:25 -0700 (PDT), Ed Lee >><edward.ming.lee@gmail.com> wrote: >> >>>On Wednesday, April 14, 2021 at 4:47:12 PM UTC-7, chris wrote: >>>> On 04/14/21 19:51, John Larkin wrote: >>>> > I have some old assembly listing files that are text, paged >>>> > by formfeed characters. I can't find a way to print nice >>>> > listings on a modern laser printer/copier. They ignore the >>>> > formfeeds or print a black box. >>>> > >>>> > Any ideas? >>>> > >>>> > Maybe I could write a program to replace the ff's with a >>>> > control sequence or something? >>>> > >>>> A unix / Linux one line script using sed would do that. Using >>>> the substitute s command. Something like: >>>> >>>> echo <infile> | sed s/oldchar/newchar/ > <outfile> >>>> >>>> Don't do much script here, but quite amazing what can be done in >>>> a single line with standard commands and pipes... >>> >>>You also need to count lines before FF and pad up to 66 lines (55 + top and bot margins). That's exactly what "pr" does. >>> >>>Interesting to know how many ways to replace "pr". >> >> >> >>Many times now I kind of wish I still had a nice page printer with >>tractor feed and lots of paper for those long listings... Like we >>used to do decades ago. >> >>I should not have recycled my big box of tractor feed paper just a >>few years ago ! >> > >You can still buy it. I see 2700 sheets for about $87 USD equivalent. > >I have a Panasonic KX-P1124 kicking around- you can still get clone >ribbons for it at $14 for 6 pieces free ship in the US. > >But .. why ? These days most likely the issue is in some code that >someone else wrote or in your interpretation of it.
I still write plenty of code. As Don said, nowadays it's LOTS more lines of code, but that's OK. It is still good to be able to print out parts of code. Not like old assembly listings though. Maybe I need one of those tall portait oriented monitors ?
On 4/15/2021 9:05 PM, boB wrote:
> Maybe I need one of those tall portait oriented monitors ?
Being able to COMFORTABLY read a "page" of text is, IMO, almost essential. Esp for things like source code -- you don't want to have to scroll (much) to see The Big Picture. It's also helpful when viewing PDFs, etc. The problem with portrait orientation is the screen ends up too narrow for most other things. I experimented with a 30" landscape flanked by a pair of 24" portrait (they end up comparable dimensions, vertically). This was good if I wanted to have a PDF open on a "side" monitor and use the larger monitor for my main workspace. But, when there was no need for a PDF (or other "page display"), the tall skinny monitors on each side ended up underutilized; too narrow to do "real work". I ended up leaving a pair of 30" on my software workstation. I "work" on one and have the other available for supporting documents (schematics, datasheets, etc.) Install a PDF printer and route whatever you want to that device. Then, open the PDF and annotate it as needed. If you really want to have a piece of paper to scribble on, print the page(s) that are important to you. Just remember to discard them lest you find yourself with scraps of various "vintage" lying around.
John Larkin wrote:
> On Thu, 15 Apr 2021 19:55:32 -0400, Phil Hobbs > <pcdhSpamMeSenseless@electrooptical.net> wrote: > >> John Larkin wrote: >>> On Thu, 15 Apr 2021 01:45:54 +0000 (UTC), >>> DecadentLinuxUserNumeroUno@decadence.org wrote: >>> >>>> John Larkin <jlarkin@highland_atwork_technology.com> wrote in >>>> news:o5se7gppa00im5svc5ej766pt5184virgk@4ax.com: >>>> >>>>> On Wed, 14 Apr 2021 22:09:45 +0000 (UTC), >>>>> DecadentLinuxUserNumeroUno@decadence.org wrote: >>>>> >>>>>> Ed Lee <edward.ming.lee@gmail.com> wrote in >>>>>> news:304707f9-4854-4c75- b2a1-f8504ddbfd06n@googlegroups.com: >>>>>> >>>>>>> On Wednesday, April 14, 2021 at 11:52:04 AM UTC-7, John Larkin >>>>>>> wrote: >>>>>>>> I have some old assembly listing files that are text, paged >>>>>>>> by formfeed characters. I can't find a way to print nice >>>>>>>> listings on a modern laser printer/copier. They ignore the >>>>>>>> formfeeds or print a black box. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Maybe I could write a program to replace the ff's with a >>>>>>>> control sequence or something? >>>>>>> >>>>>>> man pr >>>>>>> The old fashion way. >>>>>>> >>>>>> >>>>>> Output to a text file and then edit the file and remove the >>>>>> offending control sequences. >>>>> >>>>> It's already a text file, an assembly listing. >>>>> >>>>> The "control sequence" is a single formfeed character per page. >>>>> But I want that to shoot out a fresh page! >>>>> >>>>> There might actually be some escape sequence that the Cannon >>>>> copier/printer accepts as a page feed, but I can't find it. >>>>> >>>>> >>>> >>>> I am saying to use a filter to pull everything out but the text. >>>> Then you can put whatever you want there to make it work right. >>> >>> I can write a program to find formfeeds and replace with some escape >>> sequence that the copier/printer recognizes as a page feed; I just >>> don't know what will work. Googling didn't help. >>> >>> Actually, I'm not sure that I can actually send a stream of characters >>> to this kind of printer... opened as LPT3: or something. There may be >>> drivers in the way. >>> >> GNU enscript will turn it into a PDF. You can control whether it >> observes or ignores formfeeds, among many other things (see attached). >> >> Cheers >> >> Phil Hobbs > > I used Foxit to turn it into a PDF. It recognizes the pages. But it > doesn't print as pages! >
Try enscript. It's good medicine. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
John Larkin <jlarkin@highland_atwork_technology.com> wrote:
>>The way that "pr" handles that is by adding the correct number of >>linefeeds at every formfeed character to skip exactly to the next page. > > Is that a Linux thing?
It originates in Unix, in the days of the lineprinter.
> I thought about writing a program to do that, but Word seems to work. > > > >> >>It is a broken approach that falls apart when the printer does auto-wrap >>too long lines (printers did not do that at the time pr was written...) >>or when there are other uncontrollable vertical spacing problems. > > > Yes, some lines wrap, even in landscape mode.
When you use Word you have the backend that I described: Word does the formatting and sends ready-made pages to the printer. That should work, even when there are wrapped lines (if not too many to destroy the layout). I don't know offhand if Word treats a FF character as a hard page break when it reads textfiles, but when it does you should be OK.
John Larkin wrote:

> I have some old assembly listing files that are text, paged > by formfeed characters. I can't find a way to print nice > listings on a modern laser printer/copier. They ignore the > formfeeds or print a black box. > > Any ideas? > > Maybe I could write a program to replace the ff's with a > control sequence or something?
Have a PostScript printer? Use a2ps, should be available on any Linux system, the source should be available to compile it on Windows. It takes in raw ASCII text and puts out PostScript with all the formatting. It can also do portrait or landscape, and multiple pages/sheet, there are a ton of options. Jon