LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-15-2012, 05:08 AM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 30
Embed jpg to html


I have a html file , I want to convert it to pdf , can advise if I want to embed a jpg to it before convert to pdf , what can i do ? thx
 
Old 07-15-2012, 03:31 PM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,826

Rep: Reputation: 221Reputation: 221Reputation: 221
If you have ghostscript installed, your web browser will print to file.pdf
Open office or Libre office may do it to.

wkhtmltopdf
http://madalgo.au.dk/~jakobt/wkhtmlt...0.9.9-doc.html

http://html-pdf-converter.com/
http://linux.die.net/man/1/htmldoc
 
Old 07-15-2012, 04:14 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Link the picture using the image tag (<img>)

http://www.w3schools.com/tags/tag_img.asp

then, any converter will probably expect the file to be in the same directory as the html. (the file does not actually get **inserted**----it gets linked.
 
Old 07-15-2012, 09:20 PM   #4
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
thx replies ,

Yes , I know there are many tools may convert html to pdf , may be I explain more what I would like to do .

I have many html files ,I also have a jpg file (photo) , I want convert all these html files to pdf ( I can do it by using the tools ) . Now I want the pdf files can be embedded the jpg , that mean all pdf have the photo , can advise what can i do ?

thx
 
Old 07-15-2012, 11:01 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
If you have a program that will display a web page and then convert to PDF, then we have given you the steps:

1. Link the picture file
2. display the page and convert.
 
Old 07-15-2012, 11:58 PM   #6
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by pixellany View Post
If you have a program that will display a web page and then convert to PDF, then we have given you the steps:

1. Link the picture file
2. display the page and convert.
thx reply ,

the suggestion 1 is not work , I will send the files to external users , they can not link the picture file , they only have pdf read in their desktop .
I am not very clear what the mean of suggestion 2 .
 
Old 07-16-2012, 12:14 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
ust;

Using a browser, save a simple website. In the directory where you save it, you will find 2 things--the html file, and a folder containing various elements, including pictures. Examine the code, and you will see the picture links that I mentioned.

I do not know how the html-pdf convertors work. Assuming that you have a program that will display the webpage, then I'm assuming that what you see on the screen---including all the pictures--- gets saved to PDF.
 
Old 07-16-2012, 04:51 PM   #8
psyhe
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 1
You can try PhantomJS#Rendering for an example of how to render a web page to a pdf.
It is a scriptable webkit headless browser, and renders html and images just like for example google chrome or safari do.
 
  


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
embed terminal in html-php webpage maradnus Programming 2 12-07-2011 12:28 PM
HELP! BASH - Convert filenames from dsc00***.jpg to *.jpg jimmybond01 Programming 9 05-08-2007 07:17 AM
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 04:21 PM
CMD line tool for PDF -> HTML or JPG/PNG/GIF ilhbutshm Linux - Software 5 10-23-2004 05:18 AM
How do I change HTML to jpg? akihandyman Mandriva 4 05-20-2004 11:42 AM


All times are GMT -5. The time now is 02:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration