Printing a Graphic

I have a Picture object of size 400 width, 100 height. Dropping it on a window (canvas) it looks fine but when I print it to a printer graphics object it seems to grow and get very fuzzy. I am not sure what the actual size is in the printed graphic even though I have set it correctly.

The printer resolution is 72dpi. How should I adjust the picture to be the same size?

Are you printing on the Mac or Windows? It’s been a while since I done any windows work, so maybe someone else can help out, however on the Mac you don’t need to worry about the printer DPI. All you need to worry about is what DPI the image you’re printing is.

For instance if your image is 400 x 100, and you’re printing it at 400 x 100, then it’s only 72 DPI. If it’s 800 x 200, then it’s 144 DPI… Most users cannot really see past 300 ~ 400 DPI. An experienced user might be able to tell, but beyond 2400 DPI, even I can’t tell.

If you don’t ask for anything better , the printer graphic will be 72dpi.
As Sam says, thats not important at the moment.

More important is “how many pixels have I got”?

72dpi on A4 is about 595 x 842 pixels (check the page height and width properties)

If you print your graphic to FILL that area, then it will get bigger as it is small than that number of pixels now.
And not in a perfect multiple of 2 or 3 times. So it ends up fuzzy.

To keep it pixel perfect, you need to .drawpicture the image to the printer graphic at the original size of 400 x100

g.drawpicture mypicture,0,0,400,100,0,0,400,100

It will not fill the paper, but should be sharp.

UNLESS your printer driver thinks you are printing a photo, in which case it will probably want to do all sorts of things to ‘improve’ the image, and if its an inkjet with poor quality paper, the inks may bleed, causing more loss of sharpness.

So if this is a line drawing or something that needs to be sharp, tell the printer to use clip art settings, and use coated printer paper.

Sam/Jeff

I am on a Mac.

The printer dpi is being reported as 72 dpi. I am attempting to print the graphic one to one on the printer graphic. The code that I am using is as follows:

if iHeaderGraphic <> nil then select case iHeaderGraphicOrient case orLeft iHeaderArea.DrawPicture(iHeaderGraphic, 0, 0, iHeaderGraphic.Width, iHeaderGraphic.Height, 0, 0, iHeaderGraphic.Width, iHeaderGraphic.Height) case orRight iHeaderArea.DrawPicture(iHeaderGraphic, iHeaderArea.Width - iHeaderGraphic.Width, 0, iHeaderGraphic.Width, iHeaderGraphic.Height, 0, 0, iHeaderGraphic.Width, iHeaderGraphic.Height) end Select end if
iHeaderGraphic is the picture that I want to print, loaded from disk and is reporting under the debugger to be 400X100.

iHeaderArea is the section of the open printer graphic that I have .Clip to be the top area of my page graphic.

I have set two constants, orLeft and orRight, that designate where the graphic should be printed (left or right side of the area graphic).

My code above seems to emulate Jeff’s suggestion of:

g.drawpicture mypicture,0,0,400,100,0,0,400,100

but…

Hence my original post. The graphic is being printed larger than I expected which causes it to be fuzzy.

Any further ideas?

How big is it being printed?
400 x 100 at 72 dpi is 5.5 x 1.4 inches on paper.

When you get the print dialog up, you can save the preview.
Is the preview also blurry?

Yes, the preview is fuzzy.

So, how do I adjust the graphic to print? Surely I don’t divide the 400X100 by 72?

In the Mac Printer Setup, you can ask the printing to fills the page or…

Get an eye there too.

I found it.

I need to adjust the area by ( * 100 / 72) or 1.38888889!

This seems to reproduce the graphic correctly on the printed page.

Hi - sorry this was a while ago, but I have the same thing with text on a webcanvas. (595 x 842 A4 size)
Text looks good onscreen but When I print it’s pixelated.
I’ve tried making the canvas huge (3 times scaled up) - doesn’t improve. any ideas?
thanks, G

Start a new thread, Web is a different beast.