dim f as FolderItem = SpecialFolder.Desktop.Child("pic.png")
dim p as new Picture (CanvasDD(4).Width, CanvasDD(4).Height)
main.CanvasDD(4).DrawInto (p.Graphics, 0, 0)
If f <> Nil Then
p.Save(f, Picture.SaveAsPNG)
End If
how can i assign the name and location of the png file?
the output file is blank. the right size but blank. does the picture need to be displayed on the screen to be copied? for me it is not when that part of the code is executed.
Having tried writing the file after returning to the window with the picture, i realize that i want to add some to the picture. i need to be able to save a picture that will not appear on the screen. how do i do that.
The printer graphic object is yet another potentially long story. You are right, I gave you an example using 72 dpi, as this is the default resolution for g. But it is more complicated than that. For instance, drawing fonts onto the printer object prints out at full printer resolution by default.
In the post you refer to, I just tried to give you a quick way to obtain a nice printout. I am sorry if I gave you the impression you were limited to 72 dpi.
[quote=161160:@Carl Mize]but i don’t know how to save the file with a name and location of my choosing.
[/quote]
This is not true. Or at least not on Windows. The Report subsystem may scale things for you, but if you simply open a printer and DrawString to it, you must scale the font yourself.
Strange. I have been selling Check Writer for Windows for over a year, and it does seem the MICR font prints at full resolution while all I did was to set g.TextSize to 12.
MICR fonts being particularly finicky in terms of dimensions, I can assure you it is conformant to the most stringent dimension requirements, and exhibits no jaggies.
Incidentally, I have had a program, MICR Calibration Wizard, that prints a collection of MICR fonts and very fine lines secure numbers since late 2001 in RB that uses the same technique : http://micr-fonts.com/MICRfont/micr-fonts-windows.html
Since it is used for calibration, resolution and dimensions suffer no error.
I was surprised long ago when I found out fonts printed at a higher resolution than the printer graphics object, but I was taught never to question miracles
No prob, Michel … sometimes learning is an “iterative” process. Whatever impression I had from a past input got refined with this discussion … translate that as “I’m continuing to learn, sometimes in steps over a period of time, but always appreciating your advice.” Heck, you have no idea how much that input you gave me on that print issue saved me some potential heartache … it got the job out the door and made my customer happy. What does MasterCard call that? … “Priceless”? ^^
Glad it helped you get the project complete. Printing is sort of a hobby of mine. My very first commercial product was a Dos printer driver that allowed having accented characters and fonts over printers that did not support them. We are talking 1980 's
72 dpi was an Apple thing,
with HiDPI monitors, screen resolution can be higher than 72 dpi (OSX) or 96 dpi (Windows). I have 144 dpi on my MacBook Pro and 120 dpi on my Windows 8 laptop.