You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2008/08/04 19:40:44 UTC
[jira] Resolved: (PDFBOX-298) pdfToImage: unstable
[ https://issues.apache.org/jira/browse/PDFBOX-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved PDFBOX-298.
----------------------------------
Resolution: Fixed
[Comment on SourceForge]
Date: 2008-05-15 14:52
Sender: danielwilson
Logged In: YES
user_id=1737686
Originator: NO
I have incorporated this as it passes the existing regression tests and
improves output.
I saw nothing here for the type0 font issue ... but I think you've given a
good hint in your writeup.
> pdfToImage: unstable
> --------------------
>
> Key: PDFBOX-298
> URL: https://issues.apache.org/jira/browse/PDFBOX-298
> Project: PDFBox
> Issue Type: Improvement
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552834&aid=1773675
> Originally submitted by nobody on 2007-08-14 00:42.
> currently the pdf to image conversion does only work partially. there are a few problems i would like to address with the patch:
> - draw ALL jpeg image which are inlined in the pdf doc.
> some of the jpeg image have some kind of ".Adobe"
> header instead of the "JFIF" header. ImageIO is unable
> to read the jpegs starting with the ".adobe" header.
> - catch a few nullpointer exceptions so that the draw
> "flow" is not interrupted
> - currently the PDType0Font class draws nothing at all,
> resp. throws which breaks as well the draw "flow".
> because i did not know how the type0 font should be
> drawn i simply extended from type1 (which is not cool)
> so that at least text is drawn.
> a lot more pdfs are drawn as images with this changes in a more or less good quality.
> you will find all "touched" files in the attached zip file.
> btw: i did the relying on the "PDFBox-0.7.4-dev-20070716" dev load.
> for any questions send my an email to: philipp.koch@day.com
> [attachment on SourceForge]
> http://sourceforge.net/tracker/download.php?group_id=78314&atid=552834&aid=1773675&file_id=241160
> pdfbox-patch.zip (application/x-zip-compressed), 13219 bytes
> patch
> [comment on SourceForge]
> Originally sent by danielwilson.
> Logged In: YES
> user_id=1737686
> Originator: NO
> This seems to work well -- given one more change that Philipp emailed me.
> You need to add this overload of write2file to org\pdfbox\pdmodel\graphics\xobject\PDXObjectImage.java
> /**
> * Writes the image to a file with the filename + an appropriate suffix, like "Image.jpg".
> * The suffix is automatically set by the
> * @param file the file
> * @throws IOException When somethings wrong with the corresponding file.
> */
> public void write2file(File file) throws IOException
> {
> FileOutputStream out = null;
> try
> {
> out = new FileOutputStream(file);
> write2OutputStream(out);
> out.flush();
> }
> finally
> {
> if( out != null )
> {
> out.close();
> }
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.