You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Tilman Hausherr <TH...@t-online.de> on 2016/05/30 16:14:55 UTC

Weird content stream in ImageToPD

Weird content stream in PDF created by ImageToPDF:

q
   2 ,
   598 0 0 3 ,
   543 20 20 cm
   /Im1 Do
Q

I looked in the hex view and it is really

q
   2,598 0 0 3,543 20 20 cm
   /Im1 Do
Q

which is still incorrect.

Could this have to do with the recent changes in PDPageContentStream?

Tilman


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


Re: Weird content stream in ImageToPDF

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 31.05.2016 um 08:29 schrieb Maruan Sahyoun:
> Hi,
>> Am 30.05.2016 um 21:41 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
>>
>> thanks - will fix it tomorrow morning when I'm back.
>>
>> BR
>> Maruan
>>
>>> Am 30.05.2016 um 20:59 schrieb Tilman Hausherr <TH...@t-online.de>:
>>>
>>> I think I got it. The problem is the grouping of large numbers, i.e. 1234 must not appear in "US style" as 1,234 so setGrouping is set to false.
>>>
>>> However this isn't done for the abstract class.
>>>
>>> @Maruan - either you'll have to set it for the abstract class too,  or you'll need  a common field.
> I've shared NumberFormat and reused some more code from the abstract class.
>
> Could you test again?

Thanks, it works now.

Tilman


>
> BR
> Maruan
>
>
>>> Tilman
>>>
>>> Am 30.05.2016 um 18:59 schrieb Tilman Hausherr:
>>>> The build works fine, and in it the numbers are written correctly. I also looked at the source code, which looks fine to me. Very weird.
>>>>
>>>> Tilman
>>>>
>>>> Am 30.05.2016 um 18:14 schrieb Tilman Hausherr:
>>>>> Weird content stream in PDF created by ImageToPDF:
>>>>>
>>>>> q
>>>>> 2 ,
>>>>> 598 0 0 3 ,
>>>>> 543 20 20 cm
>>>>> /Im1 Do
>>>>> Q
>>>>>
>>>>> I looked in the hex view and it is really
>>>>>
>>>>> q
>>>>> 2,598 0 0 3,543 20 20 cm
>>>>> /Im1 Do
>>>>> Q
>>>>>
>>>>> which is still incorrect.
>>>>>
>>>>> Could this have to do with the recent changes in PDPageContentStream?
>>>>>
>>>>> Tilman
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>>>>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>


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


Re: Weird content stream in ImageToPDF

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,
> Am 30.05.2016 um 21:41 schrieb Maruan Sahyoun <sa...@fileaffairs.de>:
> 
> thanks - will fix it tomorrow morning when I'm back.
> 
> BR
> Maruan
> 
>> Am 30.05.2016 um 20:59 schrieb Tilman Hausherr <TH...@t-online.de>:
>> 
>> I think I got it. The problem is the grouping of large numbers, i.e. 1234 must not appear in "US style" as 1,234 so setGrouping is set to false.
>> 
>> However this isn't done for the abstract class.
>> 
>> @Maruan - either you'll have to set it for the abstract class too,  or you'll need  a common field.

I've shared NumberFormat and reused some more code from the abstract class.

Could you test again?

BR
Maruan


>> 
>> Tilman
>> 
>> Am 30.05.2016 um 18:59 schrieb Tilman Hausherr:
>>> The build works fine, and in it the numbers are written correctly. I also looked at the source code, which looks fine to me. Very weird.
>>> 
>>> Tilman
>>> 
>>> Am 30.05.2016 um 18:14 schrieb Tilman Hausherr:
>>>> Weird content stream in PDF created by ImageToPDF:
>>>> 
>>>> q
>>>> 2 ,
>>>> 598 0 0 3 ,
>>>> 543 20 20 cm
>>>> /Im1 Do
>>>> Q
>>>> 
>>>> I looked in the hex view and it is really
>>>> 
>>>> q
>>>> 2,598 0 0 3,543 20 20 cm
>>>> /Im1 Do
>>>> Q
>>>> 
>>>> which is still incorrect.
>>>> 
>>>> Could this have to do with the recent changes in PDPageContentStream?
>>>> 
>>>> Tilman
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


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


Re: Weird content stream in ImageToPDF

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
thanks - will fix it tomorrow morning when I'm back.

BR
Maruan

> Am 30.05.2016 um 20:59 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> I think I got it. The problem is the grouping of large numbers, i.e. 1234 must not appear in "US style" as 1,234 so setGrouping is set to false.
> 
> However this isn't done for the abstract class.
> 
> @Maruan - either you'll have to set it for the abstract class too,  or you'll need  a common field.
> 
> Tilman
> 
> Am 30.05.2016 um 18:59 schrieb Tilman Hausherr:
>> The build works fine, and in it the numbers are written correctly. I also looked at the source code, which looks fine to me. Very weird.
>> 
>> Tilman
>> 
>> Am 30.05.2016 um 18:14 schrieb Tilman Hausherr:
>>> Weird content stream in PDF created by ImageToPDF:
>>> 
>>> q
>>>  2 ,
>>>  598 0 0 3 ,
>>>  543 20 20 cm
>>>  /Im1 Do
>>> Q
>>> 
>>> I looked in the hex view and it is really
>>> 
>>> q
>>>  2,598 0 0 3,543 20 20 cm
>>>  /Im1 Do
>>> Q
>>> 
>>> which is still incorrect.
>>> 
>>> Could this have to do with the recent changes in PDPageContentStream?
>>> 
>>> Tilman
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


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


Re: Weird content stream in ImageToPDF

Posted by Tilman Hausherr <TH...@t-online.de>.
I think I got it. The problem is the grouping of large numbers, i.e. 
1234 must not appear in "US style" as 1,234 so setGrouping is set to false.

However this isn't done for the abstract class.

@Maruan - either you'll have to set it for the abstract class too,  or 
you'll need  a common field.

Tilman

Am 30.05.2016 um 18:59 schrieb Tilman Hausherr:
> The build works fine, and in it the numbers are written correctly. I 
> also looked at the source code, which looks fine to me. Very weird.
>
> Tilman
>
> Am 30.05.2016 um 18:14 schrieb Tilman Hausherr:
>> Weird content stream in PDF created by ImageToPDF:
>>
>> q
>>   2 ,
>>   598 0 0 3 ,
>>   543 20 20 cm
>>   /Im1 Do
>> Q
>>
>> I looked in the hex view and it is really
>>
>> q
>>   2,598 0 0 3,543 20 20 cm
>>   /Im1 Do
>> Q
>>
>> which is still incorrect.
>>
>> Could this have to do with the recent changes in PDPageContentStream?
>>
>> Tilman
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>


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


Re: Weird content stream in ImageToPDF

Posted by Tilman Hausherr <TH...@t-online.de>.
The build works fine, and in it the numbers are written correctly. I 
also looked at the source code, which looks fine to me. Very weird.

Tilman

Am 30.05.2016 um 18:14 schrieb Tilman Hausherr:
> Weird content stream in PDF created by ImageToPDF:
>
> q
>   2 ,
>   598 0 0 3 ,
>   543 20 20 cm
>   /Im1 Do
> Q
>
> I looked in the hex view and it is really
>
> q
>   2,598 0 0 3,543 20 20 cm
>   /Im1 Do
> Q
>
> which is still incorrect.
>
> Could this have to do with the recent changes in PDPageContentStream?
>
> Tilman
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>


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