VinnyCP Posted July 12, 2010 Share Posted July 12, 2010 Hey, Guys... I'm developing a web application that can arrange address stickers into a pattern page, wich has 9 rows and 3 columns of stickers to print on. I first tried to print the page with JavaScript, then the page could be printed in the browser. The problem is: There are to much trash in the page printed. For example: the website URL, the title of the page, the number of the page, etc. I would lose some stickers if I print that, because there's no margin in the stickers page. Then I tried to make a PDF file with a matrix coming from the XML document that I save the positions of the page where the addresses id's are. With this, the user could save the PDF and print it without margins... I looked for 3 PDF libraries documentations, and in none of them I could control the size of the cell. The stickers page has a fixed width of 21cm, what gives me ~793.700787 pixels on width, and it has a height of 29.61cm, that is ~1119.118110 pixels. With that, each sticker must be 7cm (264.566px) on width and 3.29cm (124.346px) on height. The questions are: Is there a PDF library that I can control the table size, the margin of the page and the cells size? If doesn't, what other technology is recommended by you guys, for printing some content like that? I have been thinking about another 2 options: - Dealing the XML with a C application; - Saving the document in other format, like XLS, wich I don't know if I can use predefined heights and widths to the cells. Are these two options recommended? Thank you. Link to comment https://forums.phpfreaks.com/topic/207504-about-pdfphp-xlsphp-cxml-to-make-printable-sticker-pages-and-stuff-related/ Share on other sites More sharing options...
Mchl Posted July 12, 2010 Share Posted July 12, 2010 Is there a PDF library that I can control the table size, the margin of the page and the cells size? TCPDF FPDF Link to comment https://forums.phpfreaks.com/topic/207504-about-pdfphp-xlsphp-cxml-to-make-printable-sticker-pages-and-stuff-related/#findComment-1084928 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.