Printing without ReportGen.

As I printed directly to the printer the resolution of the Printer is 72.
This makes all the lines quite thick. So I tried to raise the MaxResolution and consequently raise also the textsize etc.
This worked on the pdf-Printer very well, but on the Laser-Printer not. Here the Priontig exceeds the size of the paper.
How can I scale all the stuff?

Which OS? It may be that the laser printer couldn’t handle your requested resolution and you’re still printing at 72. Check the value of HorizontalResolution/VerticalResolution after you open the printer and use those values to scale. Eg.,

dim scalefactor as double = ps.HorizontalResolution / 72

Also, the site seems to be stuttering tonight. I’ve had trouble posting replies and you just got 3 copies of this post.

sorry for the three posts, but as you said, it was not showing me, that it had been postetd.
OS Win 8.1

The reolution of the laser has to be higher, because, when I print the pdf-File, after having it produced with a higher resolution, then I get very fine lines
With 72 - Resoltion it doesnt look very well

On the other hand, if I look into the printersetup, the maxHorizontal resolution is 72, but this I can alter, but I cannot alter the Horzontal resolution or the width.

you can set it or you can just ask the printer to give you its maximum which is more likely to work properly

what do you mean, with: you can set it?

I can set the maximum, but then it prints outside of the paper

And to construct a Setupstring is also not a good solution, because it wont work on all printers, the name of the printer is included in the string

If you’re not scaling it properly or the printer can’t actually handle the resolution then you can have issues.

And no you should not construct a SetUpString as you’ll never get it right for all uses.
You should call one of the dialogs to interact with the user and ask them which printer scaling etc they want.
And then you can get the correct setting for whatever printer they selected.

in which dialog can I choose a scale - I didn’t find any

in the openprinterdialog there is nothing like this and also not in the printersetup

Set MaxHorizontalResolution before you open the printer. After you open the printer, HorizontalResolution will contain the resolution chosen by the printer. Scale based on that value.

No change -
but I cant believe, that the printer isn’t capable of a higher resolution, than 72

And in the Pagesetup-Variable “P” the resolution is set to 300, when I change it to this

but where can I set the scaling faktor -I couldn’t find this

You must calculate the factor yourself. HorzontalResolution/72.

I did calculate everything, but it went outside the paper!!!
factor is good, but if it does make the text so big, that it prints outside ?

How can I make it to stay on the paper, scale it down?

On the pdf-Printer it worked, but not on the real printer

thanks for future answers, I have to leave now

Are there still no answers to this?