You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Thomas Möller <th...@muenster.de> on 2019/07/08 10:07:16 UTC
Rotated overlay problem in commandline tool
Hi,
I try to overlay one pdf with another with pdfbox-app-2.0.16.
In the output pdf the overlay is rotated by 90 degrees although both input pdfs are displayed in correct orientation in Acrobat Reader.
When converting the affected overlay pdf with PDFToImage the jpg is also in correct orientation.
When using PDFDebugger on the overlay pdf it shows rotate: 90
So it seems that it was rotated before and the rotation is ignored by OverlayPDF.
Is there any workaround for this?
Thanks, Tom Moeller
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Tom Möller <th...@muenster.de>.
Hi,
thanks for your reply and excuse me for the late response, the files are here:
The example files:
https://moellersoft.de/downloads/overlay.pdf
https://moellersoft.de/downloads/background.pdf
The result:
https://moellersoft.de/downloads/pdfbox_wrong_result.pdf
How it should look:
https://moellersoft.de/downloads/result_made_w_acrobat.pdf
Greetings, Tom
> Am 08.07.2019 um 21:03 schrieb Tilman Hausherr <TH...@t-online.de>:
>
> Hi,
>
> I don't see a workaround for this in the CL tool.
>
> Can you share your files on a sharehoster?
>
> Tilman
>
> Am 08.07.2019 um 12:07 schrieb Thomas Möller:
>> Hi,
>>
>> I try to overlay one pdf with another with pdfbox-app-2.0.16.
>>
>> In the output pdf the overlay is rotated by 90 degrees although both input pdfs are displayed in correct orientation in Acrobat Reader.
>>
>> When converting the affected overlay pdf with PDFToImage the jpg is also in correct orientation.
>>
>> When using PDFDebugger on the overlay pdf it shows rotate: 90
>>
>> So it seems that it was rotated before and the rotation is ignored by OverlayPDF.
>> Is there any workaround for this?
>>
>> Thanks, Tom Moeller
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Thomas Möller <th...@zuendquelle.de>.
It is working with snapshot -46 and 48 :-)
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Tilman Hausherr <TH...@t-online.de>.
Please try with a snapshot:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.17-SNAPSHOT/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Tilman Hausherr <TH...@t-online.de>.
Am 13.07.2019 um 21:49 schrieb Thomas Möller:
> the overlay file is not made by me, I just removed the original content and added some text in Acrobat.
OK, I'll create some myself.
> How did you manage to get a correct result?
I had to change the source code in Overlay.createOverlayXObject(), add a
matrix to the XObject form that X-translates to the width and rotates -90.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Thomas Möller <th...@zuendquelle.de>.
I’m sorry,
the overlay file is not made by me, I just removed the original content and added some text in Acrobat. The problematic behavior was not affected by saving it again with Acrobat.
The only solution I found was to send the file to ghostscript and create a new file, so the rotation-infomation was removed from the file.
How did you manage to get a correct result?
Tom
> Am 13.07.2019 um 20:50 schrieb Tilman Hausherr <TH...@t-online.de>:
>
> Thank you, I've created
> https://issues.apache.org/jira/browse/PDFBOX-4596
>
> and played around a bit. I managed to find out how to work with your file so it it appears properly in the result. Did you create this file yourself and if yes, could you also easily create test files for 180 and 270 too with the same effect i.e. that the text appears "right" when the overlay is displayed but that there is a secret rotation?
>
> If you can't - no problem, just say so, I would then search such files myself from our test set.
>
> Tilman
>
>> Am 12.07.2019 um 18:49 schrieb Thomas Möller:
>> Hi,
>>
>> thanks for your reply and excuse me for the late response, the files are here:
>>
>> The example files:
>> https://moellersoft.de/downloads/overlay.pdf
>> https://moellersoft.de/downloads/background.pdf
>>
>> The result:
>> https://moellersoft.de/downloads/pdfbox_wrong_result.pdf
>>
>> How it should look:
>> https://moellersoft.de/downloads/result_made_w_acrobat.pdf
>>
>>
>> Greetings, Tom
>>
>>> Am 08.07.2019 um 21:03 schrieb Tilman Hausherr <TH...@t-online.de>:
>>>
>>> Hi,
>>>
>>> I don't see a workaround for this in the CL tool.
>>>
>>> Can you share your files on a sharehoster?
>>>
>>> Tilman
>>>
>>>> Am 08.07.2019 um 12:07 schrieb Thomas Möller:
>>>> Hi,
>>>>
>>>> I try to overlay one pdf with another with pdfbox-app-2.0.16.
>>>>
>>>> In the output pdf the overlay is rotated by 90 degrees although both input pdfs are displayed in correct orientation in Acrobat Reader.
>>>>
>>>> When converting the affected overlay pdf with PDFToImage the jpg is also in correct orientation.
>>>>
>>>> When using PDFDebugger on the overlay pdf it shows rotate: 90
>>>>
>>>> So it seems that it was rotated before and the rotation is ignored by OverlayPDF.
>>>> Is there any workaround for this?
>>>>
>>>> Thanks, Tom Moeller
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Tilman Hausherr <TH...@t-online.de>.
Thank you, I've created
https://issues.apache.org/jira/browse/PDFBOX-4596
and played around a bit. I managed to find out how to work with your
file so it it appears properly in the result. Did you create this file
yourself and if yes, could you also easily create test files for 180 and
270 too with the same effect i.e. that the text appears "right" when the
overlay is displayed but that there is a secret rotation?
If you can't - no problem, just say so, I would then search such files
myself from our test set.
Tilman
Am 12.07.2019 um 18:49 schrieb Thomas Möller:
> Hi,
>
> thanks for your reply and excuse me for the late response, the files are here:
>
> The example files:
> https://moellersoft.de/downloads/overlay.pdf
> https://moellersoft.de/downloads/background.pdf
>
> The result:
> https://moellersoft.de/downloads/pdfbox_wrong_result.pdf
>
> How it should look:
> https://moellersoft.de/downloads/result_made_w_acrobat.pdf
>
>
> Greetings, Tom
>
>> Am 08.07.2019 um 21:03 schrieb Tilman Hausherr <TH...@t-online.de>:
>>
>> Hi,
>>
>> I don't see a workaround for this in the CL tool.
>>
>> Can you share your files on a sharehoster?
>>
>> Tilman
>>
>> Am 08.07.2019 um 12:07 schrieb Thomas Möller:
>>> Hi,
>>>
>>> I try to overlay one pdf with another with pdfbox-app-2.0.16.
>>>
>>> In the output pdf the overlay is rotated by 90 degrees although both input pdfs are displayed in correct orientation in Acrobat Reader.
>>>
>>> When converting the affected overlay pdf with PDFToImage the jpg is also in correct orientation.
>>>
>>> When using PDFDebugger on the overlay pdf it shows rotate: 90
>>>
>>> So it seems that it was rotated before and the rotation is ignored by OverlayPDF.
>>> Is there any workaround for this?
>>>
>>> Thanks, Tom Moeller
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Thomas Möller <th...@zuendquelle.de>.
Hi,
thanks for your reply and excuse me for the late response, the files are here:
The example files:
https://moellersoft.de/downloads/overlay.pdf
https://moellersoft.de/downloads/background.pdf
The result:
https://moellersoft.de/downloads/pdfbox_wrong_result.pdf
How it should look:
https://moellersoft.de/downloads/result_made_w_acrobat.pdf
Greetings, Tom
> Am 08.07.2019 um 21:03 schrieb Tilman Hausherr <TH...@t-online.de>:
>
> Hi,
>
> I don't see a workaround for this in the CL tool.
>
> Can you share your files on a sharehoster?
>
> Tilman
>
> Am 08.07.2019 um 12:07 schrieb Thomas Möller:
>> Hi,
>>
>> I try to overlay one pdf with another with pdfbox-app-2.0.16.
>>
>> In the output pdf the overlay is rotated by 90 degrees although both input pdfs are displayed in correct orientation in Acrobat Reader.
>>
>> When converting the affected overlay pdf with PDFToImage the jpg is also in correct orientation.
>>
>> When using PDFDebugger on the overlay pdf it shows rotate: 90
>>
>> So it seems that it was rotated before and the rotation is ignored by OverlayPDF.
>> Is there any workaround for this?
>>
>> Thanks, Tom Moeller
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org
Re: Rotated overlay problem in commandline tool
Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,
I don't see a workaround for this in the CL tool.
Can you share your files on a sharehoster?
Tilman
Am 08.07.2019 um 12:07 schrieb Thomas Möller:
> Hi,
>
> I try to overlay one pdf with another with pdfbox-app-2.0.16.
>
> In the output pdf the overlay is rotated by 90 degrees although both input pdfs are displayed in correct orientation in Acrobat Reader.
>
> When converting the affected overlay pdf with PDFToImage the jpg is also in correct orientation.
>
> When using PDFDebugger on the overlay pdf it shows rotate: 90
>
> So it seems that it was rotated before and the rotation is ignored by OverlayPDF.
> Is there any workaround for this?
>
> Thanks, Tom Moeller
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org