Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an ipython notebook that I would like to print without having the page breaks cut through my figures.

Any suggestions? I tried the "awesome screenshot" extension for chromium, but it was buggy and ended up cutting out half of my page.

Any suggestions?

share|improve this question
    
Try wkhtmltopdf, as suggested here. –  user76204 Jan 9 '13 at 0:16
    
@Mik, Seems promising! I'll give it a try (but holy hell do they need to come up with a better name!) =D –  blz Jan 9 '13 at 0:27
1  
@Mik, This seems to print over multiple pages, which exactly the problem I'm trying to avoid. Am I missing something? –  blz Jan 9 '13 at 0:30
    
Yes you're right, but something like the gnome-photo plugin for shutter, as discussed here might be useful, but you would have to convert the image to pdf, as the answer below also mentions this relating to the chrome extension. –  user76204 Jan 9 '13 at 0:44

2 Answers 2

I recently had the same need, and did it in two steps:

1) I used the Chrome Screen Capture Extension (https://chrome.google.com/webstore/detail/screen-capture-by-google/cpngackimfmofbokmjmljamhdncknpmg?hl=en) to capture the page in a png

2) I printed the PNG to a PDF

share|improve this answer
    
this isn't quite doing the trick. The resulting PDF is an 8.5/11" page and it's impossible to zoom in close enough to see anything other than a blur... –  blz Jan 9 '13 at 0:47

I have managed to use gnome-web-photo in conjunction with imagemagick to produce a decent quality single, tall pdf of a webpage using a single command. You should already have imagemagick, but install gnome-web-photo with

sudo apt-get install gnome-web-photo

In this oneliner, convert is the program used from the imagemagick package:

gnome-web-photo --mode=photo http://www.askubuntu.com --file ask.png && cat ask.png | convert - ask.pdf 

The tall web page is downloaded by gnome-web-photo to file, and can't be piped directly to convert without saving it as an image file first. So one way for convert to receive that file though the pipe is to concatenate it and then use convert - so that the png file is received by convert via stdin (denoted as -) and then converted to pdf.

However, for the second part of the command you could use && convert ask.png ask.pdf instead of && cat ask.png | convert - ask.pdf, but both take about the same time.

You can use the --print option with gnome-web-photo to print a webpage to file (i.e. pdf), but it didn't produce a suitable single page result, so the oneliner above is about the best that can be done.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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