Message-ID: <637febcd@news.ausics.net> From: not@telling.you.invalid (Computer Nerd Kev) Subject: Re: printing a webpage to pdf (that isn't crap)? Newsgroups: comp.os.linux.misc References: User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i586)) NNTP-Posting-Host: news.ausics.net Date: 25 Nov 2022 08:10:21 +1000 Organization: Ausics - https://www.ausics.net Lines: 39 X-Complaints: abuse@ausics.net Path: csiph.com!news.bbs.nz!news.ausics.net!not-for-mail Xref: csiph.com comp.os.linux.misc:36213 The Natural Philosopher wrote: > On 24/11/2022 13:37, Robert Heller wrote: >> At Thu, 24 Nov 2022 21:07:53 +0800 P-P-Pete wrote: >> >>> >>> Need to convert current bank balances to pdf. >>> The banks only issue a statement every 1 or 2 months. They allow one >>> to save latest history as Excel, text, MYOB etc, but not pdf. Can obtain >>> latest balances via internet banking pages, but when print them to pdf, >>> they are shit-house. Formatting is way out and parts are truncated. Get >>> the same result in Firefox or Chromium. I presume it depends on some >>> rendering core in the linux distro? I am using Debian. >> >> No, more likely really awful webpage code. The banking webpages are probably >> loaded with "clever" JavaScript & css and "lack" proper style sheets for print >> media. There is not much you can do about that. Either the bank's IT dept is >> totally clueless or (likely) they don't really want you to *print* their >> webpages and so have deliberately coded the webpages to be "unprintable". >> Both Firefox and Chromium generally do a good job of rendering webpages as >> PDF, but if the webpages are either badly crafted or specificly designed to be >> "unprintable", there is not much Firefox or Chromium can do. >> > Amen to all that, however there remains one other option and that is to > use a screen snapshot and import that into e.g. Gimp and save as a PDF > (image) If you right-click on a page in Firefox, it has its own built-in webpage screenshot function too. I'm using that more and more as these horrible Javascript-formatted websites spread ever wider. Sometimes simply selecting all text on a page and copy/pasting it into a text editor actually gives you something either workably formatted, or consistent enough that you can write a simple script to reformat it. Although at least in this case there are some export options available already. -- __ __ #_ < |\| |< _#