When printing to PDF, Courier New font spacing is not fixed like it is when printing to a printer
I'm on Bartender 2019 R9 under Windows 10.
This is an issue I've been dealing with for a while now so I thought I'd run it by everyone in case there's a way to cure this :)
I have a packing list form I did in Bartender that pulls from a delimeted file. When this form is pulled up in Designer and I hit PREVIEW it looks great and everything lines up.
If I instead go into FILE / PRINT, it will show that my current printer is set to the default printer (an HP Laserjet).
If I choose PREVIEW from that screen, it again pulls up the preview screen with everything lined up.
If I then change the printer to Microsoft Print To PDF or just the plain PDF printer entry and then hit PREVIEW, it will display with certain columns not lined up - like the Courier New (non-proportional) font is not spacing things out properly when using a PDF-related printer. It seems that each character is ever-so-slightly differently spaced so by the time you get towards the end of the line it's off by 2 or 3 full chars.
To explain, I have multiple columns on this Packing Slip, but only a single field that encompasses them all which I populate from the delimeted file, and everything is lined up with the proper spaces between all the fields, and since I'm using Courier New, the spacing is fixed across all the columns.
Any idea why these PDF-related "printers" do not handle this font correctly? I thought Courier New was Courier New, but I'm beginning to wonder...
Not sure if this has been fixed but from a quick Google search it looks like there maybe an issue with certain fonts with the Microsoft Print to PDF driver. Have you tried using a different font?
Since 2019 whenever I want print to PDF I use the in built BarTender PDF driver (just called PDF in the printer list) and have not noticed an issue with this0
Unfortunately the “built-in” Bartender PDF printer option also has issues with Courier New :(
You will get differences where there are differences in the dpi of the printers being used but I cannot find anything thats states what the DPI is of the PDF/Micro PDF printer.
I always recommend that, where possible, when my customers create their labels that they use the driver/printer that they will be printing to as this means that all the defaults etc of that device will be used when creating the label as this can eliminate a number of the issues although a lot of these occur when printing to thermal transfer printers with difference in start of print positions and page widths etc.
Have you tried adjusting the text format (auto-fit) options in the fields to see if you get a better result?
(I did mock something up here using a standard laser printer and two pdfs driver with wrapped databased text and did not notice any issue but then I did not have your data or exact layout etc)0
I have column headings accross the page and lines drawn to separate each column, and then there is a single field that goes across the page and encompasses each column. When I generate the single data field that populates that field on the form, I make sure and space everything out and pad the data with spaces so it falls within the column lines on the report. Because I am using a non-proportional font, I know that if I put in 20 chars it will always end up in the same place because every font is the same width. When I send it to the built-in PDF printer or the one from Microsoft and view or print it, the width of each char of data is slightly different so the spacing gets off more and more and by the time I get to the end of the data, it could be off several chars so nothing lines up with my column lines.
I guess for some reason non-proportional fonts like Courier New, Lucida Console, and Consolas are ending up proportional and different chars have different widths...or they ARE staying non-proportional, but the size of each char is smaller with the PDF versions.
The first pic is how it looks when not using a PDF-related printer. The second is using PDF or Msoft Print to PDF.
You can see that the final columns are not lining up. The issue is present in the book description field and carries over into the final fields where it makes a big difference. If you flip between these two pics you will see what's happening (if you can save them and bring them up in a viewer)
Note that if I create a doc in Word in Courier New and print it to a PDF file it DOES WORK ok there and everything lines up, so this is probably just another little "undocumented feature" of Bartender that I will have to accept :)
I think the problem is the way you are generating each line of data with the space padding to try and align the columns.
As you are creating each line as one field I think the only way round it would be to add extra spaces between the ordered and shipped values.0
Then I'd have to have one Bartender form for PDF and one for printers, so that won't work in our situation :)
I could also make 5 separate fields per line, but that is a major task and not worth the effort....and even then, the spacing problem will still be there, but it just won't show because the fields won't depend on the spacing from previous ones as they will each start at a fixed position...
As I mentioned before, if I paste each line of source data from the packing slip into a Word or Wordpad doc in the Courier New font and then send it to a PDF it works as it should (i.e the text is fixed-width) so the problem lies with how Bartender outputs non-prop fonts to PDF-based printers.
Hopefully this issue will "magically" get fixed in a future release (heck, it could be fixed already in ver 2021 which I will be installing soon!)
Thanks again for all your help! :)
Are you pasting the fields in as Text or Word Processor variants? Have you tried the other way?0
Please sign in to leave a comment.