[poppler] Segmentation fault happens with poppler_page_render in pdftotext

Albert Astals Cid aacid at kde.org
Fri Oct 31 10:33:24 PDT 2008


A Dilluns 27 Octubre 2008, andy huang va escriure:
> Hi All:
>   I want to transfer one pdf page to text file and png file at the same
> function.
> So I use the pdftotext.cc to implement my function , but I always encounter
> the segmentation fault problem.
> The text part and poppler_page_render part is running ok individually.
> But when I put text part and render part together , the program always dead
> at poppler_page_render function.
> I hope someone can help me to figure out this situation.

Tried to compile your code, dropped it over current pdftotext.cc and it does 
not compile, so can't help you.

But you should run the typical tools, that is valgrind and gdb to get a clue. 

Albert

>
> I attach the source code and binary file
> Here is the log file
> --------------------------------------------------------------
> ./pdftotext -f 1 -l 1 -raw /home/andy/pdf/English.pdf eng1.txt
> start to load pdf file
> png pdf 3
> png pdf 4
> png pdf 5
> ***** MediaBox = ll:0,0 ur:612,792
> ***** CropBox = ll:0,0 ur:612,792
> ***** Rotate = 0
> Segmentation fault
> ------------------------------------------------------
>
>
>
> Thank you very much.
> Best regards
> Andy




More information about the poppler mailing list