You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by karthick g <ik...@gmail.com> on 2017/07/03 03:40:37 UTC

Catching log warnings

Hi team,

Is their way to catch the warnings that print at the console .

For example am getting the warning while rendering the Image



*Unexpected object type: org.apache.pdfbox.cos.COSDictionary*
I need to catch this info and do some action based on this warning

Please let me know if you need more info.

Regards,
Karthick G

Re: Catching log warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.07.2017 um 05:40 schrieb karthick g:
> Hi team,
>
> Is their way to catch the warnings that print at the console .
>
> For example am getting the warning while rendering the Image
>
>
>
> *Unexpected object type: org.apache.pdfbox.cos.COSDictionary*
> I need to catch this info and do some action based on this warning

That's not a warning, that's an exception.

Usually it should be passed upwards so that you can catch the exception. 
If not, then it is one of the many cases where we catch it, because 
users insist that we process even the worst broken PDF files ("but it 
works with Adobe Reader!!1!"). In that case, modifying the source code 
to be non-lenient is your only option.

So please tell what you did, and upload your PDF somewhere.

Tilman

>
> Please let me know if you need more info.
>
> Regards,
> Karthick G
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Catching log warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 03.07.2017 um 12:46 schrieb karthick g:
> Hi team,
>
> This is the corresponding pdf file link
>
> https://www.dropbox.com/s/hzkzfowl29b62fy/corrupt.pdf?dl=0

The link was purple in my mail program, so it must have been mentioned 
before, and it looks familiar. Anyway, the problem here is that an image 
is referenced by the content stream:

q
   56.87601 0 0 71.54601 504.907 663.76 cm
   /Im1 Do
Q

/Im1 is broken, because it isn't even a stream, there is no image data. 
It is at the top right of the page. There's some white area there.

Tilman

>
> Regards,
> karthick G
>
> On Mon, Jul 3, 2017 at 4:15 PM, karthick g <ik...@gmail.com> wrote:
>
>> Hi Team,
>>
>> This is the corresponding PDF file.
>>
>> Regards,
>> karthick g
>>
>> On Mon, Jul 3, 2017 at 9:10 AM, karthick g <ik...@gmail.com>
>> wrote:
>>
>>> Hi team,
>>>
>>> Is their way to catch the warnings that print at the console .
>>>
>>> For example am getting the warning while rendering the Image
>>>
>>>
>>>
>>> *Unexpected object type: org.apache.pdfbox.cos.COSDictionary*
>>> I need to catch this info and do some action based on this warning
>>>
>>> Please let me know if you need more info.
>>>
>>> Regards,
>>> Karthick G
>>>
>>>
>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Catching log warnings

Posted by Tilman Hausherr <TH...@t-online.de>.
You have to configure your logger to write to a file instead of the 
console. Just google the name of your logger (e.g. log4j) and 
"configuration".

Tilman


Am 04.07.2017 um 07:58 schrieb karthick g:
> Hi,
>
> Yes you are right, It is already given to you. What my nature of job is to
> identify the error  and to write it in our log file.
> Since it is given as warning in console, I can not able to log the error in
> my file. The errors identified are ok, even we can not open the file in
> Acrobat.  So if it is thrown as error it will be useful. Since it is a
> error file, it should be thrown as error right.
> Please let me know for for further clarification. Thanks for your support.
>
> Regards,
> Karthick G
>
>
> On Mon, Jul 3, 2017 at 4:16 PM, karthick g <ik...@gmail.com> wrote:
>
>> Hi team,
>>
>> This is the corresponding pdf file link
>>
>> https://www.dropbox.com/s/hzkzfowl29b62fy/corrupt.pdf?dl=0
>>
>> Regards,
>> karthick G
>>
>> On Mon, Jul 3, 2017 at 4:15 PM, karthick g <ik...@gmail.com>
>> wrote:
>>
>>> Hi Team,
>>>
>>> This is the corresponding PDF file.
>>>
>>> Regards,
>>> karthick g
>>>
>>> On Mon, Jul 3, 2017 at 9:10 AM, karthick g <ik...@gmail.com>
>>> wrote:
>>>
>>>> Hi team,
>>>>
>>>> Is their way to catch the warnings that print at the console .
>>>>
>>>> For example am getting the warning while rendering the Image
>>>>
>>>>
>>>>
>>>> *Unexpected object type: org.apache.pdfbox.cos.COSDictionary*
>>>> I need to catch this info and do some action based on this warning
>>>>
>>>> Please let me know if you need more info.
>>>>
>>>> Regards,
>>>> Karthick G
>>>>
>>>>
>>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Catching log warnings

Posted by karthick g <ik...@gmail.com>.
Hi,

Yes you are right, It is already given to you. What my nature of job is to
identify the error  and to write it in our log file.
Since it is given as warning in console, I can not able to log the error in
my file. The errors identified are ok, even we can not open the file in
Acrobat.  So if it is thrown as error it will be useful. Since it is a
error file, it should be thrown as error right.
Please let me know for for further clarification. Thanks for your support.

Regards,
Karthick G


On Mon, Jul 3, 2017 at 4:16 PM, karthick g <ik...@gmail.com> wrote:

> Hi team,
>
> This is the corresponding pdf file link
>
> https://www.dropbox.com/s/hzkzfowl29b62fy/corrupt.pdf?dl=0
>
> Regards,
> karthick G
>
> On Mon, Jul 3, 2017 at 4:15 PM, karthick g <ik...@gmail.com>
> wrote:
>
>> Hi Team,
>>
>> This is the corresponding PDF file.
>>
>> Regards,
>> karthick g
>>
>> On Mon, Jul 3, 2017 at 9:10 AM, karthick g <ik...@gmail.com>
>> wrote:
>>
>>> Hi team,
>>>
>>> Is their way to catch the warnings that print at the console .
>>>
>>> For example am getting the warning while rendering the Image
>>>
>>>
>>>
>>> *Unexpected object type: org.apache.pdfbox.cos.COSDictionary*
>>> I need to catch this info and do some action based on this warning
>>>
>>> Please let me know if you need more info.
>>>
>>> Regards,
>>> Karthick G
>>>
>>>
>>>
>>
>

Re: Catching log warnings

Posted by karthick g <ik...@gmail.com>.
Hi team,

This is the corresponding pdf file link

https://www.dropbox.com/s/hzkzfowl29b62fy/corrupt.pdf?dl=0

Regards,
karthick G

On Mon, Jul 3, 2017 at 4:15 PM, karthick g <ik...@gmail.com> wrote:

> Hi Team,
>
> This is the corresponding PDF file.
>
> Regards,
> karthick g
>
> On Mon, Jul 3, 2017 at 9:10 AM, karthick g <ik...@gmail.com>
> wrote:
>
>> Hi team,
>>
>> Is their way to catch the warnings that print at the console .
>>
>> For example am getting the warning while rendering the Image
>>
>>
>>
>> *Unexpected object type: org.apache.pdfbox.cos.COSDictionary*
>> I need to catch this info and do some action based on this warning
>>
>> Please let me know if you need more info.
>>
>> Regards,
>> Karthick G
>>
>>
>>
>

Re: Catching log warnings

Posted by karthick g <ik...@gmail.com>.
Hi Team,

This is the corresponding PDF file.

Regards,
karthick g

On Mon, Jul 3, 2017 at 9:10 AM, karthick g <ik...@gmail.com> wrote:

> Hi team,
>
> Is their way to catch the warnings that print at the console .
>
> For example am getting the warning while rendering the Image
>
>
>
> *Unexpected object type: org.apache.pdfbox.cos.COSDictionary*
> I need to catch this info and do some action based on this warning
>
> Please let me know if you need more info.
>
> Regards,
> Karthick G
>
>
>