Things changed too much since Windows XP and macOS Tiger days.
Xojo is far behind the curve. They need to redesign and refresh their printing API for all platforms.
Non attended printing selection could be done.
And throw away that “setup string” platform dependent.
And let people retrieve and set most of the printing settings (that Xojo by themselves will need to recreate a new report designer)
They need to make the reports made in their report designer being printed flawlessly in any platform, setting margins, portrait and landscape, auto fitting the layout or setting a scale.
For MS, info can be found here (for Xojo, not you ):
I think you can’t do what you want with the current tools.
That is what I meant… the correct sentence is:
“So, I will export my text to html, and tell the user to print it for pdf to 55% (or print it to the printer at 55%)”.
The current code can print either to pdf or to a real paper printer (under MacOS), since 2013 (10 years ago this month).
Just create your report.
I suspect you think its 55% because you are thinking everyone uses A4 paper.
They may want to use A2, or several sheets
And many printers have a ‘shrink to fit’ option in the print dialog somewhere.
But on my VirtualBox / Windows 10 (without printer), I do not saw “Scale to paper size”. And this time, I looked carefully.
This feature exists on MacOS, so I searched it.
Next time I go to the client, I will ask them if they need to print… I display her two pdf: one in ListBox (List) mode, the other in Record mode (both Landscape). There was no reaction. Maybe she do not need it.
(The two features are in the base software as used by another organization).
I think the issue is whether to try and set the scale in code (which Emile believes he needs),
versus allowing the user to decide how to print it using the print dialog (which I am proposing)
if Emile has no printer installed, then it’s clear why there are no interesting options for scale, color, quality etc…
Worst, I use 2015r1 !!!
So do I.
So in that case, the way to get 55% reduction is to :
render the report onto an image 2 or 3 times larger than the graphics offered by the printer ,
then throw the image at the graphics using .drawpicture, scaling it to fit.
Yup. Install a printer driver, even if you don’t have the printer.
Try HP Deskjets… they are pretty standard PCL based machines.
I have an Envy 5540 for example.
Don’t talk to me about Epson… On my m1, I downloaded the Epson updated software, and once I was back home, it was not the Printer Driver, but a Printer Driver Downloader (that say nothing is available; no internet at home) ! I will have to take my printer in my car, power it up and connect to the Epson web site to download the files.
Edit: once more, I overlooked something on their web page. A click display a generic download file (120MB). I have to go back home to check if everything is OK now.
When something goes wrong, many other things (not even related) goes wrong too.
But the question here is the DEV controlling the printer, not the USER trying to hack things (if possible) to make what the DEV could programmatically using the printer API.
True.
But (unless I missed something), the DEV scaling stuff is easy.
The printer tells the dev what the page size is.
The dev should make the output fit that size.
In exactly the same way we make a bitmap fit on a canvas.
if the printer says you have 8.5 inches left to right, then draw to the printer graphics in such a way that the drawing does not exceed the available space.
We don’t need to find some mystical scaling setting, we just render the output to fit the size we get back from the printer.
Works no matter whether the printer driver exposes a scaling method or not, and whethere Xojo even looks for such a setting.
if the intention is to get the output onto the selected page size, what am I missing?
Is it impossible to render the output to a graphic at a size for some reason?