aspose file tools*
The moose likes Java in General and the fly likes Split multi-page tiff throwing: End of data reached before next EOL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Split multi-page tiff throwing: End of data reached before next EOL" Watch "Split multi-page tiff throwing: End of data reached before next EOL" New topic
Author

Split multi-page tiff throwing: End of data reached before next EOL

Raul Medina
Greenhorn

Joined: Sep 01, 2010
Posts: 3
Hi,

I've a little code that attempts to split a multi-page tiff into single tiffs (or single whatever, can be jpeg, gif, png), but I'm getting the following exception: End of data reached before next EOL.

The code I'm using:



And the FULL exception log:



Thank you for you help!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18856
    
    8

Just a guess, but that suggests to me that the input file is corrupted in some way. Since the message mentions "end of data" then perhaps the file has been truncated.
Fabrice Barotin
Greenhorn

Joined: Jan 18, 2013
Posts: 1
Hi, this topic is old so I guess you fixed your problem but I'll give more info in case it happens to someone else : I had the same error while trying to do the same thing. In my process I had Apache FOP generating a multipage TIFF file, then I split it into single page TIFFs using more or less the same code as you. For some reason FOP sometimes returned a corrupted multipage TIFF, and JAI returned this InvocationTargetException . I advise you to use tools like AsTiffTagViewer to analyze the header of the TIFF files you have in input, you may be able to find some anomalies (as a corrupted TIFF can still be readable in image viewers).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Split multi-page tiff throwing: End of data reached before next EOL