2

I try to convert a webpage into pdf.

wkhtmltopdf http://orion.lcg.ufrj.br/Dr.Dobbs/books/book9/mf1201.htm my.pdf

The problem is that the created pdf has very small images, where the image files are quoted in the html file as, for example,

<P ALIGN="Center">
<a href="images/fig1_5.gif">
<img src="images/fig1_5t.gif">
</A>
</P>

<P ALIGN="Center">
<B>Fig. 1.5.</B> A coloring of the graph of Fig. 1.2.
</P>

Can I instruct wkhtmltopdf to use the high resolution images/fig1_5.gif rather than the low resolution images/fig1_5t.gif in the pdf file? Thanks.

2

I advise you to use cutycapt instead.

CutyCapt is a small cross-platform command-line utility to capture WebKit's rendering of a web page into a variety of vector and bitmap formats, including SVG, PDF, PS, PNG, JPEG, TIFF, GIF, and BMP

sudo apt-get install cutycapt

To save a html as PDF

cutycapt --url=http://whatever/ --out=output.pdf
  • why use it instead of wkhtmltopdf? – Tim May 8 '15 at 6:29
  • better and faster in rendering, I've used it 3 years ago and never faced any problem – Maythux May 8 '15 at 6:30
  • Give it a try, it deserves – Maythux May 8 '15 at 6:30
  • can it create pdf outlines/bookmarks from html headings? – Tim May 8 '15 at 6:35
  • I don't know yet, I don't need this for me but I'm gonna search if it is – Maythux May 8 '15 at 6:39
0

Try using *.svg files - they are vector images and print great! Use the style:size to size it appropriately.

<div class="logo"><img src="./Print/images/fig1_5.svg" style="height:75px" /></div>

I am using these are they come out great!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.