Hey guys i have a challenge on my hands and i can't seem to settle it...
see i made a car dealership script for my body and he needs to print out window stickers(window regular paper with car info)
so i made a litle script that echo's the info(from MySQL DB) on to an image.
all good.But when it comes to print a get a super small image on a paper..lol
so i re did the background image to fit printer size...but man is it big and i cant get the info on it..
is there a way to make a page with a background image that prints ok...
like this
http://www.autoplusnet.com/Graphics/...EMO_562_QR.jpg
print paper size dpi
Moderator: General Moderators
-
bobthebuilder
- Forum Commoner
- Posts: 32
- Joined: Tue Mar 22, 2011 5:06 pm
Re: print paper size dpi
Hello,
I'm not totally sure what you mean and the web link doesn't work, but I think what you need to do is work backwards from the printer end. For example the printer S/W will probably allow you to print out certain sizes of image, so say you want 4x3cm. Then work out the relative sizes for the background and the image you want to print, i.e. in your application the logo might only be 1x1cm. Then use the GD library to resize the images in terms of pixels, bearing in mind you will need say 200 pixels per inch to mke a reasonable image. You should not need to worry about dpi, that's what the printer S/W works out.
I'm not totally sure what you mean and the web link doesn't work, but I think what you need to do is work backwards from the printer end. For example the printer S/W will probably allow you to print out certain sizes of image, so say you want 4x3cm. Then work out the relative sizes for the background and the image you want to print, i.e. in your application the logo might only be 1x1cm. Then use the GD library to resize the images in terms of pixels, bearing in mind you will need say 200 pixels per inch to mke a reasonable image. You should not need to worry about dpi, that's what the printer S/W works out.
- greyhoundcode
- Forum Regular
- Posts: 613
- Joined: Mon Feb 11, 2008 4:22 am
Re: print paper size dpi
Maybe a question of using the right tools for the job.
Perhaps if your script produced CSV output then something similar to a mail merge could be used to import the details into Word, where you could have a nice template set up.
Perhaps if your script produced CSV output then something similar to a mail merge could be used to import the details into Word, where you could have a nice template set up.
-
thinsoldier
- Forum Contributor
- Posts: 367
- Joined: Fri Jul 20, 2007 11:29 am
- Contact:
Re: print paper size dpi
I believe you can set up a word document to be linked to an excel .csv file so you'd only have to set up the word document once then just keep overwriting the .csv file as necessary.
Since I can't make sense of GD my approach to this would be to have the template image defined in html as an <img> tag (browsers don't print css "background" images by default) and use css to absolutely position my data as plain html text over the img.
For print quality you can save your <img> file at 200ppi/dpi and in the web page force it to be about 660pixels wide. 660px is a good size for older IE and Firefox that don't have any "fit to page" print option. In recent IE, Firefox, Safari there is a shrink to fit option so the specific size is less of an issue.
But saving your img at a good resolution (width, height, dpi/ppi) is necessary since say a 4x6 at 72ppi looks like garbage compared to a 4x6 at 200ppi.
The text is not an issue since it's vector and will print crisp and clean no matter how big or small it is. That's the main reason why I'd print it like this since it keeps the quality of the raw text at it's highest instead of locking it into whatever the background image resolution might be.
Example of a print page I did recently:
http://www.buybahamasrealestate.com/vie ... 697/print/
Since I can't make sense of GD my approach to this would be to have the template image defined in html as an <img> tag (browsers don't print css "background" images by default) and use css to absolutely position my data as plain html text over the img.
For print quality you can save your <img> file at 200ppi/dpi and in the web page force it to be about 660pixels wide. 660px is a good size for older IE and Firefox that don't have any "fit to page" print option. In recent IE, Firefox, Safari there is a shrink to fit option so the specific size is less of an issue.
But saving your img at a good resolution (width, height, dpi/ppi) is necessary since say a 4x6 at 72ppi looks like garbage compared to a 4x6 at 200ppi.
The text is not an issue since it's vector and will print crisp and clean no matter how big or small it is. That's the main reason why I'd print it like this since it keeps the quality of the raw text at it's highest instead of locking it into whatever the background image resolution might be.
Example of a print page I did recently:
http://www.buybahamasrealestate.com/vie ... 697/print/
Warning: I have no idea what I'm talking about.