LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-25-2015, 07:52 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post Some web pages can't saved in PDF format.


Hello.
I want to save a web page as PDF like below in Google Chrome :

http://www.tecmint.com/install-java-jdk-jre-in-linux/

But when I press "Ctrl+P" the page format is not correct :/. How can I save it?

Thank you.
 
Old 08-25-2015, 08:35 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan with some Tiny Core, Fatdog, Haiku, & BSD thrown in.
Posts: 5,009

Rep: Reputation: Disabled
Print it 'to a file'.
 
1 members found this post helpful.
Old 08-25-2015, 03:07 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,602

Rep: Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648Reputation: 2648
Quote:
Some web pages can't saved in PDF format.
i would expect that most sites will not save well as a pdf
they are javascript and php and perl and ruby driven from databases and from other sites

you can try to save it a a postsctipt ( print to file) a "*.ps" file or a pdf from "print to file"

-- i just tried
the pdf IS GARBAGE and almost unusable the page formatting is TRASHED and basically unusable crap
NONE!!!! of the "code" sections are usable they are ALL cut off and unusable



but for replacing OpenJDK with Oracle java you REALLY SHOULD use your packagemanager
yum
dnf
zypper
apt-git
packman

use what is in your OS's repos

then "alternatives" will be taken care of

Last edited by John VV; 08-25-2015 at 03:11 PM.
 
1 members found this post helpful.
Old 08-25-2015, 03:19 PM   #4
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Can you just save the page as a local HTM?

Something like this?

Last edited by Ihatewindows522; 08-25-2015 at 03:24 PM.
 
Old 08-25-2015, 08:51 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 18,759
Blog Entries: 28

Rep: Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965Reputation: 5965
You could try saving the page to HTML from your browser, then opening the HTML in LibreOffice or OpenOffice and exporting it the *.pdf.

I know that works, but I don't know whether any links would remain clickable unless you reconfigured them in the word processor.
 
Old 08-25-2015, 11:59 PM   #6
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
My Chromium can't save web page as a file, I just see "Save as PDF" and print using my printer
 
Old 08-26-2015, 09:49 AM   #7
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Yes it can.

Menu >> Save Page As
 
1 members found this post helpful.
Old 08-26-2015, 10:02 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,788
Blog Entries: 13

Rep: Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830Reputation: 4830
With the whole variety of web pages forms out there as well as what I coin as active content, such as flash, or embedded video, plus animated images I'm sitting here wondering what the benefit/requirement is.

You can save it likely as HTML, as web page complete, as text, and also take a screen shot. Pretty much most of those things you can then import into a PDF. Likely I'd follow a procedure like that so that I could make the presentation appear as I wanted it too, not just raw information. For instance, a black rectangle where an active image or video was, I'd probably fix that.

And maybe you can save it directly as PDF, but the question here really is what you're saving and how you intend to use it beyond just grabbing the content.
 
Old 08-29-2015, 09:21 AM   #9
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by Ihatewindows522 View Post
Yes it can.

Menu >> Save Page As
Then, Import saved files into LibreOffice?
 
Old 08-29-2015, 09:46 AM   #10
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
I saved file and open it in Libreoffice but some photo can't be loaded from internet.
Can you save "http://www.tecmint.com/install-openldap-server-and-administer-with-phpldapadmin-in-debianubuntu/" as PDF for me?
 
Old 08-30-2015, 04:35 PM   #11
teckk
Senior Member
 
Registered: Oct 2004
Distribution: Arch
Posts: 4,789
Blog Entries: 6

Rep: Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695
Some examples: I tried this example, header is awful but body is fine. With wkhtmltopdf
Code:
wkhtmltopdf http://www.tecmint.com/install-java-jdk-jre-in-linux/ mypage.pdf
This example works fine, gives you a nice looking .pdf. With Lynx and a2ps and ps2pdf
Code:
lynx -dump -nolist -nomargins http://www.tecmint.com/install-java-jdk-jre-in-linux/ | a2ps -B --borders=0 --columns=1 -o - | ps2pdf - mypage.pdf
To html
Code:
curl -A "Mozilla/5.0" -Ls "http://www.tecmint.com/install-java-jdk-jre-in-linux/" -o - > mypage.html
Code:
wget -U "Mozilla/5.0" "http://www.tecmint.com/install-java-jdk-jre-in-linux/" -O - > mypage.html
To text This example worked fine.
Code:
lynx -dump "http://www.tecmint.com/install-java-jdk-jre-in-linux/" >  mypage.txt
Code:
w3m -dump -T text/html "http://www.tecmint.com/install-java-jdk-jre-in-linux/" >  mypage.txt
Google if you want more.
 
1 members found this post helpful.
Old 08-31-2015, 02:03 PM   #12
Ihatewindows522
Member
 
Registered: Oct 2014
Location: Fort Wayne
Distribution: Ubuntu 16.04 LTS
Posts: 616
Blog Entries: 2

Rep: Reputation: 166Reputation: 166
Quote:
Originally Posted by hack3rcon View Post
I saved file and open it in Libreoffice but some photo can't be loaded from internet.
Can you save "http://www.tecmint.com/install-openldap-server-and-administer-with-phpldapadmin-in-debianubuntu/" as PDF for me?
Well, the raw PDF print from Firefox doesn't look good at all, after importing into LibreOffice 5...all the images loaded fine, but there are some Javascript elements pertaining to the images (I'm guessing a zoom feature) that didn't quite render right.

After I got rid of the JS elements, I exported it as a PDF and cut out the nonessentail pages with PDF Mod.

https://drive.google.com/file/d/0B6m...ew?usp=sharing
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Rendering Web Pages to PDF using Railo Open Source LXer Syndicated Linux News 0 03-12-2010 07:21 PM
Can't open saved web pages just saved by web browser... JeanBrownHarrel General 2 04-06-2008 11:52 AM
Linux MAN Pages in PDF format SolarDegree Linux - Newbie 5 03-23-2003 01:01 PM
Linux MAN Pages in PDF format SolarDegree Linux - General 1 03-23-2003 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration