From Mageia wiki
Jump to: navigation, search

Testing procedure

The following commands test some of the commands and backends associated with poppler. You need to have a terminal open in a directory where you have one or more PDF files available.


$ pdffonts example.pdf

lists the fonts used in the document


$ pdfimages -f 1 -l 10 example.pdf examplepdf


To see the result:

$ ls examplepdf*

examplepdf-000.ppm


To display the result:

$ gwenview examplepdf-000.ppm


$ pdfinfo example.pdf

Shows pdf info


Convert PDF to HTML:

$ pdftohtml -s -f 1 -l 10 example.pdf examplepdf


Page-1

Page-2

etc..

To see the resulting files:


$ ls examplepdf*

examplepdf-000.ppm

examplepdf004.png

examplepdf008.png

examplepdf-html.html

examplepdf001.png

examplepdf005.png

examplepdf009.png

examplepdfs.html

examplepdf002.png

examplepdf006.png

examplepdf010.png

examplepdf003.png

examplepdf007.png

examplepdf-10_1.png


Check the html file can be viewed in a browser:

$ konqueror examplepdf-html.html


Test that the original file opens in various programs:

$ okular example.pdf $ evince example.pdf $ epdfview example.pdf