2

Currently using a HTML to PDF converter written in PHP to attach a printable readonly page to an email.

This can be a little temperamental at the best of times, producing strange results. I was wondering if there was perhaps a better option to achieve this end result?

(Granted the end PDF is not entirely "un-editable", but it does the job for my purposes atm)

I have been thinking perhaps: - HTML > image - Attach HTML and advise the mail client to open the file in a application

Can anyone offer any advice? Thanks

4
  • It's going to be very difficult to offer advice here, as you're not giving any info about what your current solution (which one?) doesn't do sufficiently. Can you show some screen shots?
    – Pekka
    Jun 23, 2010 at 11:17
  • Also, I don't understand why can't you just attach an HTML page with content-type attachment? That way it will be readonly, would look like an attachment, and you will be able to print it.
    – bezmax
    Jun 23, 2010 at 11:21
  • The current solution is using html2pdf which falls over on things such as nested tables and colspans. I am working to a set of arbitrary requirements, that don't make an awful lot of technical sense, ie "html can be edited pdf cannot" - this is a false statement, i know. But i am feeling-around for an alternative solution which might be easier than correcting an awful lot of people's stubborn perceptions.
    – Ryan
    Jun 23, 2010 at 12:34
  • I did imply attaching the html as an attachment using the content-type to "advise" the mail client... as something I have already considered, more alternatives/elaboration on such an approach or other approaches and their pros and cons is what I am after.
    – Ryan
    Jun 23, 2010 at 12:35

1 Answer 1

3

An alternative to your current solution. You could always write a stylesheet for print.

<link rel="stylesheet" type="text/css" href="print.css" media="print" />

And then email this page to your clients? Or simply attach this page itself.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.