Skip to main content

My legacy code generates a lot of long reports targeted at printers that used mono-spaced fonts to get all the column alignments right.

Usually this was Courier.

I would rather print to PDF as most of these reports are reviewed and disposed of almost immediately.

I am moving the system to Windows and have found that I can print to PDF using the built in "Microsoft Print to PDF" driver. The problem is that they print with a proportional font and the columns don't line up and a few characters on a few lines go off the right side of the page. I would guess the font is Arial.

Is there a config file that I can edit/create to change this font?

I know there are 3rd party tools that bring in a whole slew of additional features, but that would require me to review and edit dozens of reports.

Thanks,

Brian

My legacy code generates a lot of long reports targeted at printers that used mono-spaced fonts to get all the column alignments right.

Usually this was Courier.

I would rather print to PDF as most of these reports are reviewed and disposed of almost immediately.

I am moving the system to Windows and have found that I can print to PDF using the built in "Microsoft Print to PDF" driver. The problem is that they print with a proportional font and the columns don't line up and a few characters on a few lines go off the right side of the page. I would guess the font is Arial.

Is there a config file that I can edit/create to change this font?

I know there are 3rd party tools that bring in a whole slew of additional features, but that would require me to review and edit dozens of reports.

Thanks,

Brian

Also, it will not print to PDF from RM/Cobol for non-admin users. If I "Run as Admin" it works. The error message is printer not open but I don't have an error number yet.


My legacy code generates a lot of long reports targeted at printers that used mono-spaced fonts to get all the column alignments right.

Usually this was Courier.

I would rather print to PDF as most of these reports are reviewed and disposed of almost immediately.

I am moving the system to Windows and have found that I can print to PDF using the built in "Microsoft Print to PDF" driver. The problem is that they print with a proportional font and the columns don't line up and a few characters on a few lines go off the right side of the page. I would guess the font is Arial.

Is there a config file that I can edit/create to change this font?

I know there are 3rd party tools that bring in a whole slew of additional features, but that would require me to review and edit dozens of reports.

Thanks,

Brian

Brian,

I was able to get Microsoft Print to PDF to use a monospace font (not Courier) as follows:

Printers & Scanners =>Microsoft Print to PDF=> Printer properties.  This brings up a dialog box.

Click on Change Properties (Admin permission).  Another dialog box.

Click on Advanced tab. Click on Print Processor.  Select TEXT under Default data type.  Click OK/OK.


Brian,

I was able to get Microsoft Print to PDF to use a monospace font (not Courier) as follows:

Printers & Scanners =>Microsoft Print to PDF=> Printer properties.  This brings up a dialog box.

Click on Change Properties (Admin permission).  Another dialog box.

Click on Advanced tab. Click on Print Processor.  Select TEXT under Default data type.  Click OK/OK.

Looks like I also have to set 18 CPI to make this work. May need to punt and buy something.


My legacy code generates a lot of long reports targeted at printers that used mono-spaced fonts to get all the column alignments right.

Usually this was Courier.

I would rather print to PDF as most of these reports are reviewed and disposed of almost immediately.

I am moving the system to Windows and have found that I can print to PDF using the built in "Microsoft Print to PDF" driver. The problem is that they print with a proportional font and the columns don't line up and a few characters on a few lines go off the right side of the page. I would guess the font is Arial.

Is there a config file that I can edit/create to change this font?

I know there are 3rd party tools that bring in a whole slew of additional features, but that would require me to review and edit dozens of reports.

Thanks,

Brian

Reading the users manual, Googling and trial and error showed me the answer.

In the runcobol.cfg file I used this line:

DEFINE-DEVICE device=PRINTER4 path="Microsoft Print to PDF,,courier new,7"

device printer4 is our default printer. the two commas in the path make it go to whatever port the printer is using. The font name has to match an installed font and the 7 is the point size. It ignored 7.5 so I guess it does not do half points. I need to find a narrow font as 7 is kind of hard to read. I may flip everything to landscape.