Fred D
asked on
Automated PHP Routine to print Membership Cards with Background
We tried to come up with a PHP routine to automatically print our membership cards that we send out to several thousand members but the background will not print unless we tell each user to modify their individual browser's printer properties to include background printing. The member's variable information that comes from our database looks and prints okay but the background image is missing when they go to print.
This is a pain especially for those that are not as computer literate. Is there a way to force their browsers to print the background image?
Our PHP routine is attached.
Thank you.
MembershipCardPrintRoutine.txt
This is a pain especially for those that are not as computer literate. Is there a way to force their browsers to print the background image?
Our PHP routine is attached.
Thank you.
MembershipCardPrintRoutine.txt
You might be better of serving up a PDF of the membership card and asking them to print that. Just a thought :)
I agree - PDF is the better way to go. It is a better, more consistent format for printing. Background images will always print and you'll have a consistent experience across all computers.
You can use a class like TCPDF to generate a PDF from PHP and then simply send it to the user via browser download.
You can use a class like TCPDF to generate a PDF from PHP and then simply send it to the user via browser download.
ASKER
I actually was considering using a PDF but didn't know how to create one on the fly in a PHP script.
Please elaborate on the TCPDF.
Thank you.
Please elaborate on the TCPDF.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.