Message Boards Message Boards

0
|
7092 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problem importing PDF file format raster images encoded with ASCIIHexDecode

I have several PDF files, coming from scanners, that apparently have the raster streams encoded with the ASCIIHexDecode filter.

From the message I get from Mathematica, it doesn't seem that this decoder is available:

Unknown Filter type /ASCIIHexDecode >>

Interesting enough, my own PDF files do get imported, if I import them as "Pages" (default), although I get the above message.

If I try to import the "Images" (to avoid "parsing" the Graphics, Reversing and Transposing them into Images) I get a lot more error messages, and an empty list.

During evaluation of In[202]:= Import::general: Unknown Filter type /ASCIIHexDecode >>

During evaluation of In[202]:= Import::general: Object 2 65536 could not be read from byte offset 0 >>

During evaluation of In[202]:= LinkObject::linkd: Unable to communicate with closed link LinkObject["C:\Program Files\Wolfram Research\Mathematica\10.3\SystemFiles\Converters\Binaries\Windows-x86-64\PDF.exe",1290,8]. >>

During evaluation of In[202]:= LinkObject::linkn: Argument LinkObject["C:\Program Files\Wolfram Research\Mathematica\10.3\SystemFiles\Converters\Binaries\Windows-x86-64\PDF.exe",1290,8] in LinkWrite[LinkObject["C:\Program Files\Wolfram Research\Mathematica\10.3\SystemFiles\Converters\Binaries\Windows-x86-64\PDF.exe",1290,8],CallPacket[11,{7,3,0}]] has an invalid LinkObject number; the link may be closed. >>

During evaluation of In[202]:= LinkObject::linkn: Argument LinkObject["C:\Program Files\Wolfram Research\Mathematica\10.3\SystemFiles\Converters\Binaries\Windows-x86-64\PDF.exe",1290,8] in LinkWrite[LinkObject["C:\Program Files\Wolfram Research\Mathematica\10.3\SystemFiles\Converters\Binaries\Windows-x86-64\PDF.exe",1290,8],CallPacket[11,{7,4,0}]] has an invalid LinkObject number; the link may be closed. >>

During evaluation of In[202]:= LinkObject::linkn: Argument LinkObject["C:\Program Files\Wolfram Research\Mathematica\10.3\SystemFiles\Converters\Binaries\Windows-x86-64\PDF.exe",1290,8] in LinkWrite[LinkObject["C:\Program Files\Wolfram Research\Mathematica\10.3\SystemFiles\Converters\Binaries\Windows-x86-64\PDF.exe",1290,8],CallPacket[11,{7,5,0}]] has an invalid LinkObject number; the link may be closed. >>

During evaluation of In[202]:= General::stop: Further output of LinkObject::linkn will be suppressed during this calculation. >>

Out[202]= {}

I tried to import some test PDF files I found on the internet, containing ASCIIHexDecode stream, and they simply did not import, neither as "Pages" nor as "Images".

  • Am I doing something wrong?

  • Is there a workaround for this ASCIIHexDecode limitation?

  • If there are missing decoders on the PDF import framework, can this be improved for future releases?

(sorry for not linking it to my PDF files as examples, but at this moment I don't have any with me that can be distributed)

Thank you for any help,

POSTED BY: Pedro Fonseca
2 Replies

This is not exactly what you are asking, but it could help you. I normally use pdfimages (not part of Mathematica) to extract images out of PDF files, You could try with that before your Mathematica workflow..

https://en.wikipedia.org/wiki/Pdfimages For Mac: http://sourceforge.net/projects/pdf-images/

POSTED BY: Gustavo Delfino
Posted 9 years ago

In addition: Widows binaries of Poppler can be downloaded here.

POSTED BY: Alexey Popkov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract