Forum moved here!

Home / Barcode / label printer - orientation / size / quality not correct

Sandy60

Hi,

I’m greeting everyone from Hungary :slight_smile: I have a problem with printing PDF to a barcode printer. The problem is that we get labels from customers as PDF, in a size of letters about 14-16 dots. Thus the size of the label is about 12x12 cm. However, when I print it, it would shrink to an almost illegible size. I’ve tried “fit page”, “zoom”, “fit ANYTHING” nothing works. Do you have an idea what’s wrong?

Thank you in advance.

kjk

In theory fit option to -print-settings should work. See https://www.sumatrapdfreader.org/docs/Command-line-arguments-0c53a79e91394eccb7535ef6fed0678e.html for all print cmd-line settings.

You can also try latest pre-release https://www.sumatrapdfreader.org/prerelease.html to see if it’s better.

Sandy60

Thank you very much :slight_smile: I’ll try it.

Didier

Hi,

I’m using SumatraPdf to print a pdf (barcode) from the command-line on a labelprinter (Toshiba B-EV4T-GS14-QM-R)
This works but the problem is that the barcode is printed from bottom-to-top instead of from left-to-right.
When I print from the command-line to the Adobe Reader then the ticket is printed from left-to-right (but I do not want to use Adobe because it leaves the Reader open and I want a complete silent print).

I use sumatrapdf.exe -print-to “TEC B-EV4 (203dpi)” “c:\tmp\test.pdf”

I also tried to add -print-settings noscale but then I get a blank printout?

Can someone give me a hint how I can print this barcode with Sumatra by command-line

Thanks
Didier

GitHubRulesOK

Placement is a common issue with blind printing, but can usually be stabilised.

Position is often affected by scale when the source is not clipped, what is the printer default work area (say 4" x 2"?), what does SumatraPDF think the source pdf dimensions are (menu file properties)

Basic fit shrink and noscale will move the relative centres (possibly throwing print area outside printable area)

Depending on version there are other effects such as rotation, which version are you using?

Note if it is the Quality rather than placement that is an issue its best to see

Didier

Sumatra thinks it’s 5,01 x 2,5 cm
The labels are 14 x 5 cm but it looks like the printer defaults maximize on 11,2 x 5 cm.

Sumatra version = v3.1.2

Regards
Didier

GitHubRulesOK

Sorry other tasks (duties) interrupted my response to this thread

Looks like first test is try adding “fit” (enlarges) to command line so

sumatrapdf.exe -print-to "TEC B-EV4 (203dpi)" -print-settings "fit" "c:\tmp\test.pdf"

if it fits correctly but you don’t want it enlarged we may have to try some other way to fix page size

Didier

Hi,

I do not understand your comment “Sorry other tasks interrupted” but ok
It looks like this -print-settings “fit” makes my print a bit smaller, on the right side of the print I loose a few stripes from my barcode.but it’s still printed from bottom-to-top

Isn’t there some way to rotate the printing? Or some Orientation setting?

Regards
Didier

GitHubRulesOK
sumatrapdf.exe -print-to "TEC B-EV4 (203dpi)" -print-settings "fit,portrait" "c:\tmp\test.pdf"

You can also try combinations with landscape in place of portrait to see how it varies and permutations of both with shrink in place of fit (the alternatives to noscale)

Didier

hmmm, I tried with “fit,landscape” and with “fit,portrait” but no change in the printing.
The barcode keeps printed from bottom-to-top?
strange? As far as I can see I have the latest version so that can not be the problem.
Do you have some other possible solution?

I also looked what the dimensions are in Adobe and that’s the same as SumatrPDF thinks (5 x 2,5 cm)
So why does SumatraPDF prints the barcode 90° rotated?

regards
Didier

Didier

also tried “shrink,portrait” and “shrink,landscape”.
All the same result?

GitHubRulesOK

Deepest apologies I may have misled about rotation since it now see it may have been added after version 3.1.2 please try with latest portable from here https://www.sumatrapdfreader.org/prerelease.html

the acceptable values are all lower case and can be one of three options for each
unfortunately those values clash with other printer negotiation

[noscale|shrink|fit] and [autorotation|portrait|landscape]

One way to try and override issues is in settings.txt file try change the default shrink or fit value (noscale may need to be = none)

The other way to try and force printer to accept the data as sent is set the printer default values by first copy the printer to another name and change its settings to suit the incoming data so change from auto rotation in 2nd printers own definition.

Didier

Not sure if I understand everything correctly BUT with the prerelease and adding the printer-settings “landscape” it works :grinning:
So I didn’t change anything to the settings-file, I just use the command
sumatrapdf-prerelease-11105.exe -
print-to “TEC B-EV4 (203 dpi)” -print-settings “landscape” “c:\tmp\test.pdf”

The problem that I have now is that when i do ‘arrow-up’ and ‘enter’ to print another ticket from the same cmd nothing happens? Is that a bug in the prerelease?

Didier

Is there some possibility to get debug-information from SumatraPDF to see what can go wrong?

Didier

When i try a few times more (and also dit some ‘print test page’ from the printer properties - this always prints) I notice that sometimes the same command prints and sometimes it does nothing?
Have you also noticed that in the prerelease? Any idea?

Didier

After a few tries I get a msg that Sumatra has crashed --> that can be helpfull for you I gues
How can I provide you that file? (If you want it)

GitHubRulesOK

Personally I cant see the file

@kjk did you get a crash report ?

@Didier I have never noticed a “hang” or crash from a resend, nor have others reported it, however it is always possible to be a new bug.

From past knowledge some printers expected an intermediate handshake between pages (back in the days of steam it was a simple form feed)

One trick to clear the print buffer was to
DOS>copy “ctrl char in a 1byte file.txt” prn
However I have not had to do that over the past couple of decades.

I suggest

  1. try a different type of test file.
  2. does it only happen with landscape? can “wrong ways” prints without that setting repeat without error
  3. does it work with two settings e.g. -print-settings “fit,landscape”
Didier

What do you mean with @kjk did you get a crash report ?
I didn’t send that report? How can I send it?

GitHubRulesOK

kjk is the developer he sees any report that is sent via program

Didier

Now I’ve tried multiple things.
The version 3.1.2 always works but there my barcode is always printer from bottom-to-top
The prerelease versions (32/64) sometimes work (most of the time they don’t.
Sometimes with no message (and no print), sometimes with msg crash, sometimes the process keeps hanging (saw that in the task manager), also had some other situations/messages

So I guess that the prerelease is surrely not stable enough.

That brings me back to the official release 3.1.2.
What can I try there to make the print work fine (print from left-to-right) because there I can’t set the landscape

Also, is it possible that suddenly I do get a splash-screen when using "SumatraPDFPortable.exe -print-to “TEC B-EV4 (203 dpi)” c:\tmp\myticket.pdf
As far as I remember I didn’t had that splash-screen in the past (I can be wrong!, if I’m wrong can I prevent that from showing)

regards
Didier