Print to label printer but orientation is not correct


Not sure if I understand all that you say here…

Another thing that I notice, I know its’ hard to explain/understand but when I can’t send files (like movie) to make my problem clearer …

In my printer I can set a few formats.
I created a format with the name ‘USER’ and dimensions 112x50
When I open Adobe reader and i open that ticket.pdf and I click on the print-icon
–> my standard-printer is selected so I need to select the label-printer
In that label-printer the format ‘USER’ is automatically selected and has the dimensions 112x50
The printing succeeds

If I do the same with SumatraPDF
–> my standard-printer is selected so I need to select the label-printer
In that label-printer the format ‘USER’ is automatically selected but has (the older) dimensions 112x297??
The printing gets in an error-state
But from where does Sumatra gets that ‘USER’ with dimensions 112x297??? That doesn’t exist anymore if I look to the settings of that labelprinter??

Sorry for all these messages and problems but I would like to use SumatraPDF for this so I need to get arround these problems.



SumatraPDF asks the print driver for basic info

  1. It depends how good the driver is at offering the information in a way that suits SumatraPDF

  2. the information comes from SYSTEM defaults If you simply change the driver details on the fly they will be ignored and the default used, HENCE the DEFAULT PRINTER is the key. It is the default page size and rotation that is offered by WINDOWS to SumatraPDF, thus you may even need to log out/reboot to be certain what is the DEFAULT PRINTER and IT’S default settings



Ok but the labelprinter is not the default printer.
It is a printer that is installed and defined on the system but not the default printer (and I may not set it as the default printer!!)
Because I can provide the printer to print on with the command line I expect that then that printer is used (= ok) with his default settings ( = ok). The problem is that the values of that default settings are the older values then the current ones!! So SumatraPDF needs to get those older values from somewhere.
When I do the same in Adobe then Adobe does excactly the same but there the current values are used.
Are you sure that SumatraPDF doesn’t use some cached settings when it comes to printers?



The defaults are possibly stored in the registry and I think some programmers have scripted a wrapper to modify the registry before print then reset after print, but I don’t get feedback when it works :slight_smile: only the grumbles when it does not :frowning:

SumatraPDF since version 3.0 depends entirely on a simple windows image transfer to minimise the need to resolve the myriad of issues that print drivers can cause (no staples, no plotter sizes and as you are seeing no custom sizes)

As a reader it works well for its weight in code, however there is no large team of programmers working on the code necessary to enhance printing.:frowning:

If you cant change printer default its best to talk to IT dept. as to how they can assist you.
Reminder there are two sets of defaults

To change the printer driver defaults for the currently logged in user, do the following:
1.Open Start > Settings > Printers & Faxes.
2.Right click printer, select Printing Preferences.
3.Change the settings.

To change the printer driver defaults for all users and for network users connecting to the shared printer, do the following:

Open Start > Settings > Printers & Faxes.
1.Right click printer, select Properties.
2.Go to Advanced tab.
3.Click Printing Defaults button.
4.Change the settings.


Don’t want to step on GitHubRulesOK’s toes but just wanted to comment on this one point:

Portable versions of Sumatra (for both stable and pre-release) are already provided here so there’s no need to use a third-party version from another site. Do keep in mind that support is provided here only for the official releases, and for obvious reasons the developer can’t be responsible for any issues that might be caused by using a third-party (PortableApps) wrapper or launcher.


@Didier I agree with @SumatraPeter that we can only compare the functions of official SumatraPDF portable from this site see versus the pre-release portable so I had hoped we were testing like against like.

If you are using portable apps version then that can be interfering with some of the settings and will skew any comparison as to difference in behaviour. It is best to shift the two portable versions from this site to a “clean” test environment (one you can control) then any comparison of different behaviour between two official portable versions will be fair.


OK, no problem.
I will download the latest stable version from your site and test if that one works.

I did not know that the prortable version of SumatraPDF on the PortableApps website is not an official one, i thought it was.


Hey, did not know that… Thanks
Those values where indeed different but none had the 112x297 that I saw?? Strange?
Also this should not matter because I was always printing on the same manner so should always use the same settings (I guess)

Good news - the official latest release does the same as the one from the portableApps website so I can test further with the official - but then again that one has no orientation/rotate setting


Ok tried again…
Official SumatraPDF prints fine from command-line (only is the label printed from bottom-to-top)
when I use the prerelease (portable download) from the command-line with the same command it always crashes (I get a msg “We’re sorry, SumatraPDF crashed”)
I do not try the installable prerelease (I always use portable versions)
When i open the official SumatraPDF latest release en then open that ticket in there and I click on the printer-icon my default-printer is selected, when I change to the label-printer I again see that not existing/old value 112x297. I already changed the 2 places for the default dimensions of that labelprinter.

You wrote that those values come from the registry but when I use the portable version I expected that the registry is/was not used (like mentioned on the download page).

Isn’t it helpfull if I send you the crash-file so you can examine that?


I also made a procmon dump file for both (1 with SumatraPDF and 1 with the prerelease) command-line execution.
I then compared these 2 files and i see a lot of differences (probably normal) but maybe those files can also help you to find the reason for crasching


Your experience of repeatable crashing with latest pre release versus stable
Is best reported as a NEW formal issue on GitHub please add a sample pdf test file with the other attachments .

SumatraPDF portable does not WRITE to registry it is the printer setup that does
Windows then hands registry data to SumatraPDF thus if it is changed by scripts SumatraPDF will be given the necessary info to turn the page around


I’ve tried again with the prerelease and sometimes it works and sometime it does not (without a msg)
Now I’m looking at the process monitor and I see that there are 5 instances of SumatraPDF-prerelease are running and 1 of those is constantly using 20 to 25 % of the CPU???
I guess thats the reason why it doesn’t work no more

When I kill all those processes and I run the command line again (with procmon open)
command = SumatraPDF-prerelease-11105.exe -print-to “TEC B-EV4 (203 dpi)” -print-settings “landsca
pe” c:\tmp\myticket.pdf
I see that that process is started, I get no print, no msg and the process keeps using 20 to 25% op the CPU.
The last events that the process has fired are 2 times a ‘Thread Create’ with result ‘Success’ but why the process keeps using so much CPU and why it doesn’t close after printing (but yeah, it did not print …)


Win10 64bit (OK not exactly latest) prerelease portable 32bit (should work) open file cpu 0% (max 2-3% when zooming about in window)

Normal print from app peaks at 76% but rapidly drops to a few percent

3.1.2 standard portable command line print peaks at 76% same as from inside app

From command line preview version (tested several variants) Windows Command processor with wrong printer command hangs at over 50%

print to default (no other commands) either NO action or again hangs at 50 %

SO I have to agree there is a bug with command line printing in pre-release

I am not developer so can’t change what you down load but looks like we got some where

SO its back to 3.1.2 and some how get windows to rotate the settings that it passes from the printer profile to SumatraPDF


Glad you can verify the problem! This way I also helped a bit to make this very nice tool better.
I hope you can show this to a developer so he can look at the problem before it’s released.
In my case it keeps hanging between 20 and 25% but maybe thats OS dependent, I work on Windows 8.1 Pro.

OK for 3.1.2.
What can I try there to make this work?

So your not a developer?
How are you involved with the SumatraPDF project?


Hover over the shield logo next to his username. :slight_smile:

Krzysztof is the creator and (practically sole) developer of this project.


After some other urgent matters I’m back to this printing

So I’m back on version 3.1.2 (portable version from the SumatrPDF website).
What can i try next in this version to ge my labels get printed correctly, there is no orientation possibility in this version.


@Didier I ran several tests with both SumatraPDF and other apps for comparison. My tests were not exhaustive as I am also tied down with other issues (I am a moderator/user not the developer)

My summary so far is that basic applications (not just SumatraPDF) that rely on windows simple image transfer to the print driver are thwarted in attempting to rotate hence SumatraPDF has always found it difficult to override rotation via that route other than getting output at 180 degrees! (I have lots of portrait test prints either ways up from several other apps) The only way to workaround that failing is to increase the image canvas so that the landscape “lable” is offset in one corner of a portrait image.