News for hackers. Stuff that matters.
Re:Minimal PDF by mp3geek on Saturday July 08, 2017 @11:21PM (#14728191)
Would be nice if browsers would support saving pages directly as pdf using there own pdf librarys.
Re:Minimal PDF by kazinator on Saturday July 08, 2017 @11:41PM (#14728239)
Chrome has great HTML to PDF saving, which is in fact all I use it for.

My home-brew accounting software generates HTML invoices; I need them in PDF also, though.

Re:Minimal PDF by rwallace on Sunday July 09, 2017 @06:17AM (#14729112)
I had no idea Chrome could do that. Tried it just now and it works perfectly. Thanks!
Re:Minimal PDF by mp3geek on Sunday July 09, 2017 @02:50AM (#14728676)
Save page as? Note, I'm not refering to print to pdf here.
Re:Minimal PDF by Dylan16807 on Sunday July 09, 2017 @04:03AM (#14728844)
What's the difference?
Re:Minimal PDF by tempay on Sunday July 09, 2017 @06:36AM (#14729151)
Printing tries to reformat the page to fit on some paper size and often removes details such as the background. Often it would be nice to make a PDF that shows a screenshot of the full current page, extensions exist for this but ntjifn natively.
Re:Minimal PDF by kazinator on Sunday July 09, 2017 @10:37AM (#14729911)
Why PDF then; it could be saved as a PNG, which an ImageMagick one-liner can turn into a PDF (or several of them into a multi-pager).

It would be good if a way was available for any application to take a full window screenshot, rather than the viewport screenshot.

Re:Minimal PDF by izacus on Sunday July 09, 2017 @12:51PM (#14730601)
PNG is an image format which is usually significantly larger than the corresponding PDF document and rendered at fixed quality. PDF is (mostly) a vector format which can be resized at will.
Re:Minimal PDF by kazinator on Sunday July 09, 2017 @01:42PM (#14730797)
But "details such as the background" will probably consist of a whole lot of raster images.
Re:Minimal PDF by tempay on Sunday July 09, 2017 @11:44PM (#14733245)
Or just a block of colour which will be very efficient. If there are images they are probably jpegs and can be embedded in the PDF without any loss of quality while still keeping the quality benefits of a vector format for text.
Re:Minimal PDF by porker on Monday July 10, 2017 @03:41AM (#14734059)
> Why PDF then

It's nice to have the web page's text searchable without having to OCR the PNG.

Re:Minimal PDF by abritinthebay on Sunday July 09, 2017 @01:15AM (#14728452)
Everything on the Mac has Print to PDF natively and it’s so nice

It’s one of the things I miss most when using an other OS.

Re:Minimal PDF by rcarmo on Sunday July 09, 2017 @03:54AM (#14728818)
Not just print, but also the ability to natively _manipulate_ PDF, because the Mac still has the display Postscript stack from the NeXT era and PDF essentially an envelope for it.

It's underused these days, but still available to apps, and they can interchange data in that format. Linux support for PDF isn't anywhere near as integrated.

Re:Minimal PDF by duskwuff on Monday July 10, 2017 @06:22PM (#14740196)
> the Mac still has the display Postscript stack from the NeXT era and PDF essentially an envelope for it.

This is a common misconception. Display PostScript was never present in any released version of macOS. It was replaced by the Quartz renderer, which is rather different.

Quartz can display and output to PDFs, but it does not use PDF as an internal format.

Re:Minimal PDF by tonyedgecombe on Sunday July 09, 2017 @01:28AM (#14728486)
Windows has that now.
Re:Minimal PDF by abritinthebay on Sunday July 09, 2017 @02:43AM (#14728665)
Got to admit - not used Win10 much, is it’s PDF support good out of the box system wide now?
Re:Minimal PDF by shitlord on Sunday July 09, 2017 @03:08AM (#14728720)
Yeah, there's a printer called "Microsoft Print to PDF" now, which works in pretty much everything (even something as crappy as notepad).
Re:Minimal PDF by isatty on Sunday July 09, 2017 @04:44AM (#14728906)
Notepad is probably the only program that I wouldn't call crappy in windows. I think it follows the unix philosophy of doing only one thing and doing it right. I'm not a windows user but it's been useful.
Re:Minimal PDF by icebraining on Sunday July 09, 2017 @05:44AM (#14729041)
No, Notepad does one thing but it doesn't do it right. Can't open large files without locking up. Still saves UTF-8 files with a BOM. It can't deal with unix-style newlines.
Re:Minimal PDF by chungy on Sunday July 09, 2017 @02:10AM (#14728597)
Linux has had that since around 2000.
Re:Minimal PDF by abritinthebay on Sunday July 09, 2017 @02:46AM (#14728671)
It’s had the ability to but even in recent Ubuntu versions you have to install a pdf printer.

The level of integration is not even close to the same & it’s disingenuous to pretend it is currently, let alone from 2000.

Re:Minimal PDF by asdfgadsfgasfdg on Sunday July 09, 2017 @03:16AM (#14728739)
Weird every Ubuntu install I've ever seen had a "Print to file" option in the print dialogue - which just worked.
Re:Minimal PDF by Freak_NL on Sunday July 09, 2017 @05:19AM (#14728975)
Indeed. I can't remember installing a PDF-printer any time the past decade. It's just been there.
Re:Minimal PDF by icebraining on Sunday July 09, 2017 @05:40AM (#14729027)
This SE answer from six years ago corroborates that: https://askubuntu.com/questions/81817/how-to-install-a-pdf-p...

Although, they say it doesn't show up in every application.

Re:Minimal PDF by abritinthebay on Sunday July 09, 2017 @04:33PM (#14731532)
Indeed - it does not. I’m looking at it right now not doing so.

So, as I said, not the same level of integration.

Re:Minimal PDF by icebraining on Sunday July 09, 2017 @04:41PM (#14731563)
Yeah, apparently it requires the application to use GTK and its printing dialog: https://developer.gnome.org/gtk3/stable/GtkPrintUnixDialog.h...
Re:Minimal PDF by abritinthebay on Sunday July 09, 2017 @05:13PM (#14731688)
That makes sense. It also highlights why Linux/Unix will likely never have the kind of seamless system wide integration I’m talking about - different design choices for the structure of the OS & GUI.

Nothing wrong with those choices (they give the end user more flexibility & control for example) but it is a trade off

Re:Minimal PDF by asdfgadsfgasfdg on Monday July 10, 2017 @03:48PM (#14739037)
Applications from the KDE side do have a different printing dialog.