You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Daniel Wilson <wi...@gmail.com> on 2010/04/02 19:55:42 UTC

Re: overlay is rotated

Alexander,

I'm copying the Dev group as someone in that group probably has some ideas.

My ideas ... would be that the transformation matrix which we consider in
pdfbox.pdfviewer.PageDrawer routines (such as processTextPosition, approx
line 179) is not being considered in the case of an Overlay.  I'm not sure
that's the right answer ... but that's where I'd start looking.

Daniel

On Fri, Apr 2, 2010 at 12:21 PM, Alexander B <al...@yahoo.com>wrote:

>
>
> so i figured out that the PDF has a rotation angle embedded in the PDPage.
>    For my base document, this is 270.  My overlay document has 0.
>
> any ideas about how to take the rotation into account when applying the
> overlay?  I tried resetting it to zero in the base doc, but the overlay was
> still not in the intended position.
>
>
>
>
> ________________________________
> From: Alexander B <al...@yahoo.com>
> To: users@pdfbox.apache.org
> Sent: Thu, April 1, 2010 9:37:08 AM
> Subject: Re: overlay is rotated
>
> If someone can give me a starting point, that would help me.   I really
> need to figure this out...so I will debug, fix, submit the fix for review if
> necessary.
>
> Also, I meant 90 degrees
>
> Thank you in advance!
>
> --- On Wed, 3/31/10, Alexander B <al...@yahoo.com> wrote:
>
> From: Alexander B <al...@yahoo.com>
> Subject: overlay is rotated
> To: users@pdfbox.apache.org
> Date: Wednesday, March 31, 2010, 8:12 PM
>
> When I run Overlay.java on these two files, the overlay is rotated 90%.
>  What am I doing wrong?
> This
> doesn't happen for all documents, only a few.
>
> -alexander
>
>
>
>

Re: overlay is rotated

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
could you file an issue on JIRA https://issues.apache.org/jira/browse/PDFBOX and attach the files there as the user mailing list seems to remove them.


Maruan Sahyoun

Am 03.04.2010 um 19:01 schrieb Alexander B:

> Here is an example file that I'd like to remove the rotation from...
> 
> I removed the rotation using pdPage.setRotate(0), but then the chart was on its side.  (ie portrait -> landscape)
> 
> -alexander
> 
> From: Maruan Sahyoun <sa...@fileaffairs.de>
> To: users@pdfbox.apache.org
> Sent: Sat, April 3, 2010 8:48:53 AM
> Subject: Re: overlay is rotated
> 
> could you share the files? Could try to get something working.
> 
> Kind regards
> 
> Maruan Sahyoun
> 
> Am 03.04.2010 um 15:43 schrieb Alexander B:
> 
> > Thanks Daniel,
> > 
> > You know. I think I can solve my problem if I could create a PDF that looked the same as the original but w/o the rotation.  Do you have any tips on the best way to accomplish that?
> > I saw I could "print" the page.  Perhaps, I could print it to another PDF...I was wondering if that would cause it to be rasterized at that point though..
> > 
> > -alexander
> > 
> > 
> > 
> > 
> > 
> > ________________________________
> > From: Daniel Wilson <wi...@gmail.com>
> > To: users@pdfbox.apache.org; dev <de...@pdfbox.apache.org>
> > Sent: Fri, April 2, 2010 12:55:42 PM
> > Subject: Re: overlay is rotated
> > 
> > Alexander,
> > 
> > I'm copying the Dev group as someone in that group probably has some ideas.
> > 
> > My ideas ... would be that the transformation matrix which we consider in
> > pdfbox.pdfviewer.PageDrawer routines (such as processTextPosition, approx
> > line 179) is not being considered in the case of an Overlay.  I'm not sure
> > that's the right answer ... but that's where I'd start looking.
> > 
> > Daniel
> > 
> > On Fri, Apr 2, 2010 at 12:21 PM, Alexander B <al...@yahoo.com>wrote:
> > 
> >> 
> >> 
> >> so i figured out that the PDF has a rotation angle embedded in the PDPage.
> >>  For my base document, this is 270.  My overlay document has 0.
> >> 
> >> any ideas about how to take the rotation into account when applying the
> >> overlay?  I tried resetting it to zero in the base doc, but the overlay was
> >> still not in the intended position.
> >> 
> >> 
> >> 
> >> 
> >> ________________________________
> >> From: Alexander B <al...@yahoo.com>
> >> To: users@pdfbox.apache.org
> >> Sent: Thu, April 1, 2010 9:37:08 AM
> >> Subject: Re: overlay is rotated
> >> 
> >> If someone can give me a starting point, that would help me.  I really
> >> need to figure this out...so I will debug, fix, submit the fix for review if
> >> necessary.
> >> 
> >> Also, I meant 90 degrees
> >> 
> >> Thank you in advance!
> >> 
> >> --- On Wed, 3/31/10, Alexander B <al...@yahoo.com> wrote:
> >> 
> >> From: Alexander B <al...@yahoo.com>
> >> Subject: overlay is rotated
> >> To: users@pdfbox.apache.org
> >> Date: Wednesday, March 31, 2010, 8:12 PM
> >> 
> >> When I run Overlay.java on these two files, the overlay is rotated 90%.
> >> What am I doing wrong?
> >> This
> >> doesn't happen for all documents, only a few.
> >> 
> >> -alexander
> >> 
> >> 
> >> 
> >> 
> > 
> > 
> > 
> 
> 
> 


Re: overlay is rotated

Posted by Alexander B <al...@yahoo.com>.
Here is an example file that I'd like to remove the rotation from...

I removed the rotation using pdPage.setRotate(0), but then the chart was on its side.  (ie portrait -> landscape)

-alexander




________________________________
From: Maruan Sahyoun <sa...@fileaffairs.de>
To: users@pdfbox.apache.org
Sent: Sat, April 3, 2010 8:48:53 AM
Subject: Re: overlay is rotated

could you share the files? Could try to get something working.

Kind regards

Maruan Sahyoun

Am 03.04.2010 um 15:43 schrieb Alexander B:

> Thanks Daniel,
> 
> You know. I think I can solve my problem if I could create a PDF that looked the same as the original but w/o the rotation.  Do you have any tips on the best way to accomplish that?
> I saw I could "print" the page.  Perhaps, I could print it to another PDF...I was wondering if that would cause it to be rasterized at that point though..
> 
> -alexander
> 
> 
> 
> 
> 
> ________________________________
> From: Daniel Wilson <wi...@gmail.com>
> To: users@pdfbox.apache.org; dev <de...@pdfbox.apache.org>
> Sent: Fri, April 2, 2010 12:55:42 PM
> Subject: Re: overlay is rotated
> 
> Alexander,
> 
> I'm copying the Dev group as someone in that group probably has some ideas.
> 
> My ideas ... would be that the transformation matrix which we consider in
> pdfbox.pdfviewer.PageDrawer routines (such as processTextPosition, approx
> line 179) is not being considered in the case of an Overlay.  I'm not sure
> that's the right answer ... but that's where I'd start looking.
> 
> Daniel
> 
> On Fri, Apr 2, 2010 at 12:21 PM, Alexander B <al...@yahoo.com>wrote:
> 
>> 
>> 
>> so i figured out that the PDF has a rotation angle embedded in the PDPage.
>>   For my base document, this is 270.  My overlay document has 0.
>> 
>> any ideas about how to take the rotation into account when applying the
>> overlay?  I tried resetting it to zero in the base doc, but the overlay was
>> still not in the intended position.
>> 
>> 
>> 
>> 
>> ________________________________
>> From: Alexander B <al...@yahoo.com>
>> To: users@pdfbox.apache.org
>> Sent: Thu, April 1, 2010 9:37:08 AM
>> Subject: Re: overlay is rotated
>> 
>> If someone can give me a starting point, that would help me.   I really
>> need to figure this out...so I will debug, fix, submit the fix for review if
>> necessary.
>> 
>> Also, I meant 90 degrees
>> 
>> Thank you in advance!
>> 
>> --- On Wed, 3/31/10, Alexander B <al...@yahoo.com> wrote:
>> 
>> From: Alexander B <al...@yahoo.com>
>> Subject: overlay is rotated
>> To: users@pdfbox.apache.org
>> Date: Wednesday, March 31, 2010, 8:12 PM
>> 
>> When I run Overlay.java on these two files, the overlay is rotated 90%.
>> What am I doing wrong?
>> This
>> doesn't happen for all documents, only a few.
>> 
>> -alexander
>> 
>> 
>> 
>> 
> 
> 
> 


      

Re: overlay is rotated

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
could you share the files? Could try to get something working.

Kind regards

Maruan Sahyoun

Am 03.04.2010 um 15:43 schrieb Alexander B:

> Thanks Daniel,
> 
> You know. I think I can solve my problem if I could create a PDF that looked the same as the original but w/o the rotation.  Do you have any tips on the best way to accomplish that?
> I saw I could "print" the page.  Perhaps, I could print it to another PDF...I was wondering if that would cause it to be rasterized at that point though..
> 
> -alexander
> 
> 
> 
> 
> 
> ________________________________
> From: Daniel Wilson <wi...@gmail.com>
> To: users@pdfbox.apache.org; dev <de...@pdfbox.apache.org>
> Sent: Fri, April 2, 2010 12:55:42 PM
> Subject: Re: overlay is rotated
> 
> Alexander,
> 
> I'm copying the Dev group as someone in that group probably has some ideas.
> 
> My ideas ... would be that the transformation matrix which we consider in
> pdfbox.pdfviewer.PageDrawer routines (such as processTextPosition, approx
> line 179) is not being considered in the case of an Overlay.  I'm not sure
> that's the right answer ... but that's where I'd start looking.
> 
> Daniel
> 
> On Fri, Apr 2, 2010 at 12:21 PM, Alexander B <al...@yahoo.com>wrote:
> 
>> 
>> 
>> so i figured out that the PDF has a rotation angle embedded in the PDPage.
>>   For my base document, this is 270.  My overlay document has 0.
>> 
>> any ideas about how to take the rotation into account when applying the
>> overlay?  I tried resetting it to zero in the base doc, but the overlay was
>> still not in the intended position.
>> 
>> 
>> 
>> 
>> ________________________________
>> From: Alexander B <al...@yahoo.com>
>> To: users@pdfbox.apache.org
>> Sent: Thu, April 1, 2010 9:37:08 AM
>> Subject: Re: overlay is rotated
>> 
>> If someone can give me a starting point, that would help me.   I really
>> need to figure this out...so I will debug, fix, submit the fix for review if
>> necessary.
>> 
>> Also, I meant 90 degrees
>> 
>> Thank you in advance!
>> 
>> --- On Wed, 3/31/10, Alexander B <al...@yahoo.com> wrote:
>> 
>> From: Alexander B <al...@yahoo.com>
>> Subject: overlay is rotated
>> To: users@pdfbox.apache.org
>> Date: Wednesday, March 31, 2010, 8:12 PM
>> 
>> When I run Overlay.java on these two files, the overlay is rotated 90%.
>> What am I doing wrong?
>> This
>> doesn't happen for all documents, only a few.
>> 
>> -alexander
>> 
>> 
>> 
>> 
> 
> 
> 


Re: overlay is rotated

Posted by Alexander B <al...@yahoo.com>.
Thanks Daniel,

You know. I think I can solve my problem if I could create a PDF that looked the same as the original but w/o the rotation.  Do you have any tips on the best way to accomplish that?
I saw I could "print" the page.  Perhaps, I could print it to another PDF...I was wondering if that would cause it to be rasterized at that point though..

-alexander





________________________________
From: Daniel Wilson <wi...@gmail.com>
To: users@pdfbox.apache.org; dev <de...@pdfbox.apache.org>
Sent: Fri, April 2, 2010 12:55:42 PM
Subject: Re: overlay is rotated

Alexander,

I'm copying the Dev group as someone in that group probably has some ideas.

My ideas ... would be that the transformation matrix which we consider in
pdfbox.pdfviewer.PageDrawer routines (such as processTextPosition, approx
line 179) is not being considered in the case of an Overlay.  I'm not sure
that's the right answer ... but that's where I'd start looking.

Daniel

On Fri, Apr 2, 2010 at 12:21 PM, Alexander B <al...@yahoo.com>wrote:

>
>
> so i figured out that the PDF has a rotation angle embedded in the PDPage.
>    For my base document, this is 270.  My overlay document has 0.
>
> any ideas about how to take the rotation into account when applying the
> overlay?  I tried resetting it to zero in the base doc, but the overlay was
> still not in the intended position.
>
>
>
>
> ________________________________
> From: Alexander B <al...@yahoo.com>
> To: users@pdfbox.apache.org
> Sent: Thu, April 1, 2010 9:37:08 AM
> Subject: Re: overlay is rotated
>
> If someone can give me a starting point, that would help me.   I really
> need to figure this out...so I will debug, fix, submit the fix for review if
> necessary.
>
> Also, I meant 90 degrees
>
> Thank you in advance!
>
> --- On Wed, 3/31/10, Alexander B <al...@yahoo.com> wrote:
>
> From: Alexander B <al...@yahoo.com>
> Subject: overlay is rotated
> To: users@pdfbox.apache.org
> Date: Wednesday, March 31, 2010, 8:12 PM
>
> When I run Overlay.java on these two files, the overlay is rotated 90%.
>  What am I doing wrong?
> This
> doesn't happen for all documents, only a few.
>
> -alexander
>
>
>
>