News for hackers. Stuff that matters.
Re:Amazing HTML to PDF Converter by ewiethoff on Tuesday March 03, 2009 @04:01PM (#501981)
Cocoa apps: File -> Print -> Save As PDF. Probably scriptable with AppleScript/osascript, though I haven't tried.
Re:Amazing HTML to PDF Converter by sjs382 on Tuesday March 03, 2009 @04:17PM (#502017)
Does that preserve the css, too? In windows, "Print as PDF" does not.. I've actually been looking for something like this for a long time.
Re:Amazing HTML to PDF Converter by jncraton on Tuesday March 03, 2009 @04:31PM (#502051)
http://sourceforge.net/projects/pdfcreator/

This should let you print to a PDF exactly as you would print to a real printer. The only difference is that you end up with a PDF file instead of a physical printed copy. As far as CSS goes, I think that it prints websites using the style sheets that are defined for printing, just as you would expect from a real printer.

Re:Amazing HTML to PDF Converter by sjs382 on Tuesday March 03, 2009 @04:40PM (#502066)
Yeah, but using the printer-specific style sheets is exactly what I do not want. Which is why I find this tool useful. If I wanted to print the printer-specific style sheets, I'd use Adobe's PDF printer driver, which I already own.
Re:Amazing HTML to PDF Converter by ewiethoff on Tuesday March 03, 2009 @04:27PM (#502038)
Yes, at least Firefox on OSX does. And if the site/page has <link media="print"> or @media print in place, the printing CSS is used for layout.
Re:Amazing HTML to PDF Converter by ejs on Tuesday March 03, 2009 @06:59PM (#502264)
This could be one way to do it, change the css to media="print" and do a print... you can change it on a page with firebug and see the difference it makes on print...
Re:Amazing HTML to PDF Converter by whughes on Tuesday March 03, 2009 @07:04PM (#502272)
That's what Print Preview should be for; I'm not sure how Firefox and other browsers handle this on other platforms, but OS X builds the Preview right into the Print dialog, so I don't see the Print Preview option. That would be the easiest way to view how a page looks when printed.
Re:Amazing HTML to PDF Converter by ejs on Tuesday March 03, 2009 @07:17PM (#502287)
Even on print preview, if the css sheet does not include print (like media="screen") it will not be pulled in, at least in firefox (on linux that I can test). If you open firebug and set the css sheets to media="all" it will pull the css into the print preview and look (more) correct