Forum > Beginners

printing stuff

(1/1)

pentilisea:
Hu guys,
stuck again awefully dispite googling the printer stuff.

I've got the printer dialog:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---if PrintDialog1.Execute then
I've got a small png file about 75k bits.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Image1.Picture.LoadFromFile('savegrid.png');
How do I bring both together so the pic gets printed on the standard printer?

I looked at a lot of printer stuff with complicated setting - my guess: shouldn't be done with long code pages and printer/doc settings....

Hmm, seems I'm keeping you busy, will try to not post any stupid too basic stuff.....

Any help apreciated.
Klaus

KodeZwerg:
You should read this.
If I had a printer I would create a small demo but unfortunately I haven't anymore.

pentilisea:
Hi Mr. Zwerg,
thanks fo far. Already have this link looked at. But haven't yet figured out how to implement it as it is not dealing with PrintDialog.

I need a simple solution, as nothing else will be printed in the app as .png of a small size.

The other Load and Safe file Dialogs are pretty easy to use so I would expect not to fumble around with paper size, margins ....
The components of the PrintDialog seam to not have a print.image or somethiong like this...... or using the OS provided
printer settings...

Will poke around and see what works....

wp:
Here is a small project for you, it should work (I tested on Windows).

pentilisea:

--- Quote from: wp on March 22, 2023, 10:35:51 pm ---Here is a small project for you, it should work (I tested on Windows).

--- End quote ---

Hi WP,
works like a charm and gets me started ...

Klaus

Navigation

[0] Message Index

Go to full version