Created attachment 23133 [details] Failing document Evince, Okular and pdftohtml all crash with SIGABRT when viewing certain PDFs from Altera, such as <http://www.altera.com/literature/hb/nios2/qts_qii55005.pdf>. The other pdfto* utilities seem to have no problem with it. The error output is: Error: Illegal file spec in link Error (0): Call to Object where the object was type 13, not the expected type 3 Aborted Here is a GDB backtrace from running pdftohtml (current git, last commit 2009-02-03): $ libtool --mode=execute gdb ./pdftohtml GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu"... (gdb) set args /work/abbotti/Docs/qts_qii55005.pdf (gdb) r Starting program: /work/abbotti/poppler/poppler-build/utils/.libs/pdftohtml /work/abbotti/Docs/qts_qii55005.pdf [Thread debugging using libthread_db enabled] Error: Illegal file spec in link Error (0): Call to Object where the object was type 13, not the expected type 3 [New Thread 0x7fdb0f085700 (LWP 18638)] Program received signal SIGABRT, Aborted. [Switching to Thread 0x7fdb0f085700 (LWP 18638)] 0x00007fdb0dedddc5 in raise () from /lib/libc.so.6 (gdb) bt #0 0x00007fdb0dedddc5 in raise () from /lib/libc.so.6 #1 0x00007fdb0dedf13a in abort () from /lib/libc.so.6 #2 0x00007fdb0ebbc918 in LinkGoToR (this=0x6c23b0, fileSpecObj=<value optimized out>, destObj=0x7fff170cc710) at ../../poppler/poppler/Object.h:193 #3 0x00007fdb0ebbdd54 in LinkAction::parseAction (obj=<value optimized out>, baseURI=0x0) at ../../poppler/poppler/Link.cc:82 #4 0x00007fdb0ebbe17d in Link (this=0x6abc10, dict=0x66cbd0, baseURI=0x0) at ../../poppler/poppler/Link.cc:829 #5 0x00007fdb0ebbe2c3 in Links (this=0x690d70, annots=0x7fff170cc840, baseURI=0x0) at ../../poppler/poppler/Link.cc:871 #6 0x00007fdb0ebc4152 in Page::getLinks (this=<value optimized out>, catalog=<value optimized out>) at ../../poppler/poppler/Page.cc:357 #7 0x000000000040cc29 in HtmlOutputDev::endPage (this=0x659350) at ../../poppler/utils/HtmlOutputDev.cc:1101 #8 0x00007fdb0eb7aebb in ~Gfx (this=0x63b9e0) at ../../poppler/poppler/Gfx.cc:580 #9 0x00007fdb0ebc4016 in Page::displaySlice (this=0x6, out=0x659350, hDPI=72, vDPI=72, rotate=<value optimized out>, useMediaBox=<value optimized out>, crop=<value optimized out>, sliceX=<value optimized out>, sliceY=-1, sliceW=-1, sliceH=-1, printing=0, catalog=0x6392d0, abortCheckCbk=0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0, annotDisplayDecideCbkData=0x0) at ../../poppler/poppler/Page.cc:467 #10 0x00007fdb0ebc40dd in Page::display (this=0x48ce, out=0x48ce, hDPI=40.5, vDPI=31.5, rotate=6, useMediaBox=-1, crop=-1, printing=<value optimized out>, catalog=0x6392d0, abortCheckCbk=0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0, annotDisplayDecideCbkData=0x0) at ../../poppler/poppler/Page.cc:371 #11 0x00007fdb0ebc7342 in PDFDoc::displayPages (this=0x638e40, out=0x659350, firstPage=<value optimized out>, lastPage=6, hDPI=72, vDPI=72, rotate=0, useMediaBox=1, crop=0, printing=0, abortCheckCbk=0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0, annotDisplayDecideCbkData=0x0) at ../../poppler/poppler/PDFDoc.cc:406 #12 0x00000000004052d5 in main (argc=2, argv=<value optimized out>) at ../../poppler/utils/pdftohtml.cc:320 (gdb) q The program is running. Exit anyway? (y or n) y
The problem is the following Filespec dict <</UF(þÿ^@.^@.^@/^@B^@o^@o^@k^@f^@i^@l^@e^@s^@/^@n^@2^@c^@p^@u^@_^@n^@i^@i^@5^@v^@3^@.^@p^@d^@f)/Type/Filespec>> There's an UF entry (not supported by poppler) and there isn't an F entry. According to the PDF spec an F entry should always be included along with the UF for backwards compatibility. We should definitely add support for UF entries, but I'd say it's a bug in document itself too.
Fixed in git master. Thanks for reporting.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.