Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to compile one document so as that each page becomes one single picture. Is it-possible ?

share|improve this question
    
You can use the tool pdftk to split the pdf file. –  Marco Daniel Mar 10 '13 at 13:36
    
Is this convert PDF to JPEG for example ? –  projetmbc Mar 10 '13 at 13:39
    
If you compile to PDF, many PDF viewers are able to export as a series of images. –  Brent.Longborough Mar 10 '13 at 13:46
    
@projetmbc: No. But you can write a small script. First pdftk and than convert –  Marco Daniel Mar 10 '13 at 13:51
    
You can also use ImageMagick on the output file to split it to separate pages of pictures. –  hpesoj626 Mar 10 '13 at 13:53
show 1 more comment

1 Answer

up vote 2 down vote accepted

Once you have obtained a PDF file consisting of pages, you need to convert each page to a PNG (for example) using convert command provided by ImageMagick.

The syntax is as follows:

convert -density <number> -alpha <option> "filename.pdf" "filename-%03d.png"

Note:

  • <number> is any positive integer. The larger it is the bigger in size the produced image. It depends on the size you want to get. In my experience, you can choose between 100 to 300 or even more. Please make a trial and error test.

  • <option> is one of on (transparency enabled), off (transparency disabled), or remove (transparency removed). Actually I only use either on or remove.

  • %03d is used to append a zero-leading-3-digit counting number for each image. If three digit is too greedy, you can change to two!
  • Quotes can be removed if your filename has no spaces.

For example you invoke as follows,

convert -density 100 -alpha on "filename.pdf" "filename-%02d.png"

For more detailed explanation, see my another related answer here.

share|improve this answer
    
Could you add some common values for number please? –  Tobi Mar 10 '13 at 15:19
    
I know that it depends on the size, but don’t know the unit. So numer=20 could be big, but fairly isn’t ;-) Thats why I asked for common values, or an explantation on how the size is defined be number –  Tobi Mar 10 '13 at 15:22
    
@Tobi: Hopefully this link makes it more clearer. –  Please don't touch Mar 10 '13 at 15:28
add comment

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.