You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Shalom Ben-Zvi <sh...@gmail.com> on 2012/03/22 20:12:55 UTC

PDType1Font - Can't read the embedded type1C font

Hi all
I am writing code that adds watermarks to pdf documents, I now have at
least one document that is problematic, I'm getting some font errors and
the document comes out empty:

22 Mar 2012 20:46:23,217 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - Initializing PdfWatermarkInputStream..
22 Mar 2012 20:46:23,229 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - Temp file created to /tmp/sfile7862373310127834572-watermark.pdf
22 Mar 2012 20:46:24,208 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font PSOgrkdutchbs
22 Mar 2012 20:46:24,278 [main] ERROR pdfbox.filter.FlateFilter - Stop reading corrupt stream
22 Mar 2012 20:46:24,281 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font PSOsymclas
22 Mar 2012 20:46:24,308 [main] ERROR pdfbox.filter.FlateFilter - Stop reading corrupt stream
22 Mar 2012 20:46:24,308 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font JHIACB+PSOwstletgoth
22 Mar 2012 20:46:25,327 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - PdfWatermarkInputStream initialized.


I can't attach the document coz the qmail-send program rejects it , but its this one: 
http://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCoQFjAA&url=http%3A%2F%2Fmmrc.caltech.edu%2FOscilliscope%2FTek%2520TDS210%2520service.pdf&ei=JnlrT8T2BoHN0QWY9uTVBg&usg=AFQjCNEGhFJhCSLGX0Ve11zFebKOiXFg1Q&sig2=NSlNZEPkrGyWFy4ZcxQWsQ


my code is very much like the pdfbox example AddMessageToEachPage, plus
some code that adds a graphicsState to make the watermark text opaque.

I googled and found some related discussions but nothing that helped me,
I have no idea how to fix that.
will appreciate any help

Thank you


Shalom



Re: PDType1Font - Can't read the embedded type1C font

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,


Am 04.04.2013 21:58, schrieb Kevin Brown:
> You're still awesome, but I'm still getting this when I use
> PDFPageContentStream.setFont() on a bunch of PDFs.  Did the fix go into
> 1.8?
I have the impression that there is a misunderstanding. I checked the pdf
you posted earlier and the rendering works as expected. I reread your posting
and realized that you're issue is about setting a new font, isn't it?

So let's start from the beginning. What exactly are you doing? Can you provide
some sample code/resulting pdf?

> On Thu, Jan 10, 2013 at 2:31 PM, Kevin Brown <kb...@gmail.com> wrote:
>
>> You are awesome.
>>
>> On Wed, Jan 9, 2013 at 2:19 AM, Andreas Lehmkuehler <an...@lehmi.de>
>> wrote:
>>> Hi,
>>>
>>> Am 31.12.2012 17:06, schrieb Kevin Brown:
>>>
>>>> Andreas, is this looking like it might make the 1.8 release? :)
>>>
>>> I won't promise it, but I guess it will. :-)
>>>
>>>
>>>> On Wed, Dec 26, 2012 at 6:22 PM, Andreas Lehmkuehler <an...@lehmi.de>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Am 19.12.2012 18:52, schrieb Kevin Brown:
>>>>>
>>>>>> Did you, or did anyone else, figure this out? I'm getting the same
>>>>>> issue with some PDFs, but a different font:
>>>>>>
>>>>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>>>>> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold
>>>>>>
>>>>>> This is with 1.7.1
>>>>>
>>>>>
>>>>> We improved the Type1C support recently, see [1] for further details.
>>>>>
>>> SNIP

BR
Andreas Lehmkühler


Re: PDType1Font - Can't read the embedded type1C font

Posted by Kevin Brown <kb...@gmail.com>.
You're still awesome, but I'm still getting this when I use
PDFPageContentStream.setFont() on a bunch of PDFs.  Did the fix go into
1.8?




On Thu, Jan 10, 2013 at 2:31 PM, Kevin Brown <kb...@gmail.com> wrote:

> You are awesome.
>
> On Wed, Jan 9, 2013 at 2:19 AM, Andreas Lehmkuehler <an...@lehmi.de>
> wrote:
> > Hi,
> >
> > Am 31.12.2012 17:06, schrieb Kevin Brown:
> >
> >> Andreas, is this looking like it might make the 1.8 release? :)
> >
> > I won't promise it, but I guess it will. :-)
> >
> >
> >> On Wed, Dec 26, 2012 at 6:22 PM, Andreas Lehmkuehler <an...@lehmi.de>
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> Am 19.12.2012 18:52, schrieb Kevin Brown:
> >>>
> >>>> Did you, or did anyone else, figure this out? I'm getting the same
> >>>> issue with some PDFs, but a different font:
> >>>>
> >>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> >>>> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold
> >>>>
> >>>> This is with 1.7.1
> >>>
> >>>
> >>> We improved the Type1C support recently, see [1] for further details.
> >>>
> > SNIP
> >
> >
> >>> BR
> >>> Andreas Lehmkühler
> >>> [1] https://issues.apache.org/jira/browse/PDFBOX-1473
> >
> >
> > BR
> > Andreas Lehmkühler
> >
>

Re: PDType1Font - Can't read the embedded type1C font

Posted by Kevin Brown <kb...@gmail.com>.
You are awesome.

On Wed, Jan 9, 2013 at 2:19 AM, Andreas Lehmkuehler <an...@lehmi.de> wrote:
> Hi,
>
> Am 31.12.2012 17:06, schrieb Kevin Brown:
>
>> Andreas, is this looking like it might make the 1.8 release? :)
>
> I won't promise it, but I guess it will. :-)
>
>
>> On Wed, Dec 26, 2012 at 6:22 PM, Andreas Lehmkuehler <an...@lehmi.de>
>> wrote:
>>>
>>> Hi,
>>>
>>> Am 19.12.2012 18:52, schrieb Kevin Brown:
>>>
>>>> Did you, or did anyone else, figure this out? I'm getting the same
>>>> issue with some PDFs, but a different font:
>>>>
>>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>>> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold
>>>>
>>>> This is with 1.7.1
>>>
>>>
>>> We improved the Type1C support recently, see [1] for further details.
>>>
> SNIP
>
>
>>> BR
>>> Andreas Lehmkühler
>>> [1] https://issues.apache.org/jira/browse/PDFBOX-1473
>
>
> BR
> Andreas Lehmkühler
>

Re: PDType1Font - Can't read the embedded type1C font

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,

Am 31.12.2012 17:06, schrieb Kevin Brown:
> Andreas, is this looking like it might make the 1.8 release? :)
I won't promise it, but I guess it will. :-)

> On Wed, Dec 26, 2012 at 6:22 PM, Andreas Lehmkuehler <an...@lehmi.de> wrote:
>> Hi,
>>
>> Am 19.12.2012 18:52, schrieb Kevin Brown:
>>
>>> Did you, or did anyone else, figure this out? I'm getting the same
>>> issue with some PDFs, but a different font:
>>>
>>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>>> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold
>>>
>>> This is with 1.7.1
>>
>> We improved the Type1C support recently, see [1] for further details.
>>
SNIP

>> BR
>> Andreas Lehmkühler
>> [1] https://issues.apache.org/jira/browse/PDFBOX-1473

BR
Andreas Lehmkühler


Re: PDType1Font - Can't read the embedded type1C font

Posted by Kevin Brown <kb...@gmail.com>.
Andreas, is this looking like it might make the 1.8 release? :)

On Wed, Dec 26, 2012 at 6:22 PM, Andreas Lehmkuehler <an...@lehmi.de> wrote:
> Hi,
>
> Am 19.12.2012 18:52, schrieb Kevin Brown:
>
>> Did you, or did anyone else, figure this out? I'm getting the same
>> issue with some PDFs, but a different font:
>>
>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold
>>
>> This is with 1.7.1
>
> We improved the Type1C support recently, see [1] for further details.
>
>
>> On Thu, Mar 22, 2012 at 3:12 PM, Shalom Ben-Zvi <sh...@gmail.com>
>> wrote:
>>>
>>> Hi all
>>> I am writing code that adds watermarks to pdf documents, I now have at
>>> least one document that is problematic, I'm getting some font errors and
>>> the document comes out empty:
>>>
>>> 22 Mar 2012 20:46:23,217 [main] DEBUG
>>> fileformat.pdf.PdfWatermarkInputStream - Initializing
>>> PdfWatermarkInputStream..
>>> 22 Mar 2012 20:46:23,229 [main] DEBUG
>>> fileformat.pdf.PdfWatermarkInputStream - Temp file created to
>>> /tmp/sfile7862373310127834572-watermark.pdf
>>> 22 Mar 2012 20:46:24,208 [main] INFO  pdmodel.font.PDType1Font - Can't
>>> read the embedded type1C font PSOgrkdutchbs
>>> 22 Mar 2012 20:46:24,278 [main] ERROR pdfbox.filter.FlateFilter - Stop
>>> reading corrupt stream
>>> 22 Mar 2012 20:46:24,281 [main] INFO  pdmodel.font.PDType1Font - Can't
>>> read the embedded type1C font PSOsymclas
>>> 22 Mar 2012 20:46:24,308 [main] ERROR pdfbox.filter.FlateFilter - Stop
>>> reading corrupt stream
>>> 22 Mar 2012 20:46:24,308 [main] INFO  pdmodel.font.PDType1Font - Can't
>>> read the embedded type1C font JHIACB+PSOwstletgoth
>>> 22 Mar 2012 20:46:25,327 [main] DEBUG
>>> fileformat.pdf.PdfWatermarkInputStream - PdfWatermarkInputStream
>>> initialized.
>>>
>>> I can't attach the document coz the qmail-send program rejects it , but
>>> its this one:
>>>
>>> http://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCoQFjAA&url=http%3A%2F%2Fmmrc.caltech.edu%2FOscilliscope%2FTek%2520TDS210%2520service.pdf&ei=JnlrT8T2BoHN0QWY9uTVBg&usg=AFQjCNEGhFJhCSLGX0Ve11zFebKOiXFg1Q&sig2=NSlNZEPkrGyWFy4ZcxQWsQ
>>>
>>> my code is very much like the pdfbox example AddMessageToEachPage, plus
>>> some code that adds a graphicsState to make the watermark text opaque.
>>>
>>> I googled and found some related discussions but nothing that helped me,
>>> I have no idea how to fix that.
>>> will appreciate any help
>>>
>>> Thank you
>>>
>>> Shalom
>
>
>
> BR
> Andreas Lehmkühler
> [1] https://issues.apache.org/jira/browse/PDFBOX-1473
>
>

Re: PDType1Font - Can't read the embedded type1C font

Posted by Kevin Brown <kb...@gmail.com>.
That's wonderful. Thank you!

On Wed, Dec 26, 2012 at 6:22 PM, Andreas Lehmkuehler <an...@lehmi.de> wrote:
> Hi,
>
> Am 19.12.2012 18:52, schrieb Kevin Brown:
>
>> Did you, or did anyone else, figure this out? I'm getting the same
>> issue with some PDFs, but a different font:
>>
>> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
>> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold
>>
>> This is with 1.7.1
>
> We improved the Type1C support recently, see [1] for further details.
>
>
>> On Thu, Mar 22, 2012 at 3:12 PM, Shalom Ben-Zvi <sh...@gmail.com>
>> wrote:
>>>
>>> Hi all
>>> I am writing code that adds watermarks to pdf documents, I now have at
>>> least one document that is problematic, I'm getting some font errors and
>>> the document comes out empty:
>>>
>>> 22 Mar 2012 20:46:23,217 [main] DEBUG
>>> fileformat.pdf.PdfWatermarkInputStream - Initializing
>>> PdfWatermarkInputStream..
>>> 22 Mar 2012 20:46:23,229 [main] DEBUG
>>> fileformat.pdf.PdfWatermarkInputStream - Temp file created to
>>> /tmp/sfile7862373310127834572-watermark.pdf
>>> 22 Mar 2012 20:46:24,208 [main] INFO  pdmodel.font.PDType1Font - Can't
>>> read the embedded type1C font PSOgrkdutchbs
>>> 22 Mar 2012 20:46:24,278 [main] ERROR pdfbox.filter.FlateFilter - Stop
>>> reading corrupt stream
>>> 22 Mar 2012 20:46:24,281 [main] INFO  pdmodel.font.PDType1Font - Can't
>>> read the embedded type1C font PSOsymclas
>>> 22 Mar 2012 20:46:24,308 [main] ERROR pdfbox.filter.FlateFilter - Stop
>>> reading corrupt stream
>>> 22 Mar 2012 20:46:24,308 [main] INFO  pdmodel.font.PDType1Font - Can't
>>> read the embedded type1C font JHIACB+PSOwstletgoth
>>> 22 Mar 2012 20:46:25,327 [main] DEBUG
>>> fileformat.pdf.PdfWatermarkInputStream - PdfWatermarkInputStream
>>> initialized.
>>>
>>> I can't attach the document coz the qmail-send program rejects it , but
>>> its this one:
>>>
>>> http://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCoQFjAA&url=http%3A%2F%2Fmmrc.caltech.edu%2FOscilliscope%2FTek%2520TDS210%2520service.pdf&ei=JnlrT8T2BoHN0QWY9uTVBg&usg=AFQjCNEGhFJhCSLGX0Ve11zFebKOiXFg1Q&sig2=NSlNZEPkrGyWFy4ZcxQWsQ
>>>
>>> my code is very much like the pdfbox example AddMessageToEachPage, plus
>>> some code that adds a graphicsState to make the watermark text opaque.
>>>
>>> I googled and found some related discussions but nothing that helped me,
>>> I have no idea how to fix that.
>>> will appreciate any help
>>>
>>> Thank you
>>>
>>> Shalom
>
>
>
> BR
> Andreas Lehmkühler
> [1] https://issues.apache.org/jira/browse/PDFBOX-1473
>
>

Re: PDType1Font - Can't read the embedded type1C font

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,

Am 19.12.2012 18:52, schrieb Kevin Brown:
> Did you, or did anyone else, figure this out? I'm getting the same
> issue with some PDFs, but a different font:
>
> org.apache.pdfbox.pdmodel.font.PDType1Font <init>
> INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold
>
> This is with 1.7.1
We improved the Type1C support recently, see [1] for further details.

> On Thu, Mar 22, 2012 at 3:12 PM, Shalom Ben-Zvi <sh...@gmail.com> wrote:
>> Hi all
>> I am writing code that adds watermarks to pdf documents, I now have at
>> least one document that is problematic, I'm getting some font errors and
>> the document comes out empty:
>>
>> 22 Mar 2012 20:46:23,217 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - Initializing PdfWatermarkInputStream..
>> 22 Mar 2012 20:46:23,229 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - Temp file created to /tmp/sfile7862373310127834572-watermark.pdf
>> 22 Mar 2012 20:46:24,208 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font PSOgrkdutchbs
>> 22 Mar 2012 20:46:24,278 [main] ERROR pdfbox.filter.FlateFilter - Stop reading corrupt stream
>> 22 Mar 2012 20:46:24,281 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font PSOsymclas
>> 22 Mar 2012 20:46:24,308 [main] ERROR pdfbox.filter.FlateFilter - Stop reading corrupt stream
>> 22 Mar 2012 20:46:24,308 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font JHIACB+PSOwstletgoth
>> 22 Mar 2012 20:46:25,327 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - PdfWatermarkInputStream initialized.
>>
>> I can't attach the document coz the qmail-send program rejects it , but its this one:
>> http://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCoQFjAA&url=http%3A%2F%2Fmmrc.caltech.edu%2FOscilliscope%2FTek%2520TDS210%2520service.pdf&ei=JnlrT8T2BoHN0QWY9uTVBg&usg=AFQjCNEGhFJhCSLGX0Ve11zFebKOiXFg1Q&sig2=NSlNZEPkrGyWFy4ZcxQWsQ
>>
>> my code is very much like the pdfbox example AddMessageToEachPage, plus
>> some code that adds a graphicsState to make the watermark text opaque.
>>
>> I googled and found some related discussions but nothing that helped me,
>> I have no idea how to fix that.
>> will appreciate any help
>>
>> Thank you
>>
>> Shalom


BR
Andreas Lehmkühler
[1] https://issues.apache.org/jira/browse/PDFBOX-1473



Re: PDType1Font - Can't read the embedded type1C font

Posted by Kevin Brown <kb...@gmail.com>.
Did you, or did anyone else, figure this out? I'm getting the same
issue with some PDFs, but a different font:

org.apache.pdfbox.pdmodel.font.PDType1Font <init>
INFO: Can't read the embedded type1C font MNJOCJ+Palatino-Bold

This is with 1.7.1

On Thu, Mar 22, 2012 at 3:12 PM, Shalom Ben-Zvi <sh...@gmail.com> wrote:
> Hi all
> I am writing code that adds watermarks to pdf documents, I now have at
> least one document that is problematic, I'm getting some font errors and
> the document comes out empty:
>
> 22 Mar 2012 20:46:23,217 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - Initializing PdfWatermarkInputStream..
> 22 Mar 2012 20:46:23,229 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - Temp file created to /tmp/sfile7862373310127834572-watermark.pdf
> 22 Mar 2012 20:46:24,208 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font PSOgrkdutchbs
> 22 Mar 2012 20:46:24,278 [main] ERROR pdfbox.filter.FlateFilter - Stop reading corrupt stream
> 22 Mar 2012 20:46:24,281 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font PSOsymclas
> 22 Mar 2012 20:46:24,308 [main] ERROR pdfbox.filter.FlateFilter - Stop reading corrupt stream
> 22 Mar 2012 20:46:24,308 [main] INFO  pdmodel.font.PDType1Font - Can't read the embedded type1C font JHIACB+PSOwstletgoth
> 22 Mar 2012 20:46:25,327 [main] DEBUG fileformat.pdf.PdfWatermarkInputStream - PdfWatermarkInputStream initialized.
>
>
> I can't attach the document coz the qmail-send program rejects it , but its this one:
> http://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCoQFjAA&url=http%3A%2F%2Fmmrc.caltech.edu%2FOscilliscope%2FTek%2520TDS210%2520service.pdf&ei=JnlrT8T2BoHN0QWY9uTVBg&usg=AFQjCNEGhFJhCSLGX0Ve11zFebKOiXFg1Q&sig2=NSlNZEPkrGyWFy4ZcxQWsQ
>
>
> my code is very much like the pdfbox example AddMessageToEachPage, plus
> some code that adds a graphicsState to make the watermark text opaque.
>
> I googled and found some related discussions but nothing that helped me,
> I have no idea how to fix that.
> will appreciate any help
>
> Thank you
>
>
> Shalom
>
>