> -----Original Message----- > From: Govinda [mailto:govinda.webdnatalk@xxxxxxxxx] > Sent: Friday, December 03, 2010 3:12 PM > To: PHP-General List > Subject: desire your recommendation for our specific HTML -> PDF > project > > Hi all > > I have a question which I see from googling has been discussed at length.. > but I want to know what you would recommend based on our particular > needs. I want to be on the right track before I find out a- week-of-work > later that I chose the wrong tool (a tool which works, but whose peculiarity, > in the end, would rule it out for our project). > > We have a dynamic HTML page that displays 30 "address labels" within the > dimensions of one single US-letter-size document. We want the user to be > able to print the single letter-sized page and have the content line up > perfectly (as it does in the browser) for the Avery address label (printed) > sticker paper which they will use to then peel the 30 stickers and affix to > physical product. The HTML page is ~ 200k worth of HTML (<div>s and > <table>s), text, gifs, jpgs, a barcode PNG graphic, and heavy use of exacting > CSS - CSS2 as well as a touch of CSS3 (CSS3 property transform), i.e. this: > /* --- for firefox, safari, chrome, etc. --- */ > -webkit-transform: rotate(90deg); > -moz-transform: rotate(90deg); > /* --- for ie --- */ > filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); > > ...which I use to rotate (90 degrees) a barcode which I grab off of this > site/service: > http://www.barcodesinc.com/generator/index.php > > We could drop that barcode PNG/service only if I could easily replace it with > another... and the barcode must be rotated 90 degrees - to thus fit in its tiny > (vertically-oriented) alloted slot on each of the > 30 "address label cells". > > A thread on stackOverflow has people making recommendations all over > the map.. as I would expect - our needs and experiences are all over the > map. > > - I wish we had budget for the server version of PrinceXML ;-) ... but no luck. > - I have never used any PHP libraries like FPDF or TCPDF, but am concerned > about speed; corporate users (on various browsers) will need the pdf in real > time. They may be patient and wait for the final PDF if keep the solution > free.. but if it takes minutes to generate, that is a minus point. Govinda, Have you/your team consider using pure CSS (using media screen & print) for formatting? This may save you from having to deal with PDF (extra codes -> slower performance, extra steps in save then print, extra storage space just for temp save, etc... ) since they only need to print as you mentioned. If you use CSS pt (1/72 inch) unit, you should get a pretty good precision. IMO, I only see the need to save as/generate PDF if it's to create an e-book, just to print to paper is not worth the time & effort. With either method CSS/PDF, you'd still have to deal with the exact formatting & layout (with PDF, you may have to twice - once for the screen and again in PDF). > Also I am not sure how good these are for HTML -> PDF (as opposed to > straight PDF from scratch).. plus not sure how good is the CSS support. Our > page is a bit of an HTML/CSS kludge. > - I have used the command-line tools HTMLDOC and wkpdf, but the former > lacked the CSS I need now, and the latter introduces margin that kills it for > exact address-label formatting (plus this project is on Linux). > > My PHP skills are not super strong yet.. but I am willing to do whatever it > takes to pull any solution together. > In case you have any familiarity with any PDF generation tools that you feel > would fit the need here, then *please advise*! > > Thanks! > -Govinda > > > ------------ > Govinda > govinda(DOT)webdnatalk(AT)gmail(DOT)com > > Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php