Marcelo, I don't have any experience with this, but using GetFilteredCopy() looks the right way to handle it.
- Jo From: Marcelo Pita [mailto:[email protected]] Sent: maandag 6 september 2010 22:29 To: [email protected] Cc: Jo Van der Snickt Subject: Re: [Podofo-users] Found text but do not have a current font Jo, I discover that my PDF file have Flate coded text blocks. Yes, I am using the podofotxtextract, but I think that this special case is not been handled by this tool. At this moment I am investigating the PdfMemStream class, trying to apply the Uncompress() or GetFilteredCopy() methods. Is this the correct way? Thank you! Marcelo Pita On Mon, Sep 6, 2010 at 4:42 PM, Jo Van der Snickt <[email protected]> wrote: Marcelo, I presume to refer to the podofotxtextract tool. The error message indicates - as the message clearly says - that no current font is selected :-) The font is set as a result of the Tf (select-font) operator in the stream. If you are using the podofoextract tool, the Tf operator is correctly handled in the TextExtractor::ExtractText method. So, I see two possibilities: 1. Your PDF file does not select a font inside a text block. In this case, check where you find the Tf operator inside your PDF file. It should be somewhere before the operator that displays the text and it should be inside a text block (starts with BT and ends with ET). 2. You are using PODOFO version 0.8.1 or older. After this version a fix has been made to PdfPage::GetFromResources. But, in that case you should normally have received an exception stating "Cannot create font!". Alternatively, you can also send me your PDF file for investigation. - Jo From: Marcelo Pita [mailto:[email protected]] Sent: maandag 6 september 2010 16:30 To: [email protected] Subject: [Podofo-users] Found text but do not have a current font Hi friends, I am extracting text from PDF files, and it is not rare to receive the following warning when treating text objects: WARNING: Found text but do not have a current font How do I solve this problem? Thank you! Marcelo Pita This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other then the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. Dilys bvba Nieuwe Stationsstraat 23 9160 Lokeren tel +32 9 356 97 13 fax +32 9 353 90 11 mailto:[email protected] http://www.dilys.be ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users This e-mail and any attachments thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by persons other then the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. Dilys bvba Nieuwe Stationsstraat 23 9160 Lokeren tel +32 9 356 97 13 fax +32 9 353 90 11 mailto:[email protected] http://www.dilys.be ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
