[PHP] Using the pdf tags.

2002-05-22 Thread Jeff Hatcher

Does anyone know of a way to rotate text in a pdf?
I can rotate an image and rotate a page but can not seen to rotate text.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Using the pdf tags.

2002-05-22 Thread Miguel Cruz

On Wed, 22 May 2002, Jeff Hatcher wrote:
 Does anyone know of a way to rotate text in a pdf?
 I can rotate an image and rotate a page but can not seen to rotate text.

You're using PDFlib?

It works just fine, but you have to understand how PostScript works. 
Calling PDF_rotate rotates the entire page beneath you by that amount. 
Call it first, THEN draw your text.

It may be sensible to wrap the whole thing in a PDF_save and PDF_restore
so you don't have to keep track and manually unrotate.

So:

1. pdf_save
2. pdf_rotate
3. pdf_show
4. pdf_restore

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Using the pdf tags.

2002-05-22 Thread Jeff Hatcher

Yes I'm using the PDFlib.

I understand the rotating of the page.  So this is what I am doing: I am
building a page $pdf. If I rotate the page then everything on the page
rotates also. I need to put titles in a 45 degree angle. These titles
can change and there can be between 3-6 depending on the users input. Is
there a way to build this text on a separate page then merge it into the
$pdf page. Or any ideas of how you might do it. If it was just one title
or on a page by itself then I understand how to do it. The problem is
that it isn't.

Thanks

-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 22, 2002 1:39 PM
To: Jeff Hatcher
Cc: PHP-General
Subject: Re: [PHP] Using the pdf tags.


On Wed, 22 May 2002, Jeff Hatcher wrote:
 Does anyone know of a way to rotate text in a pdf?
 I can rotate an image and rotate a page but can not seen to rotate
 text.

You're using PDFlib?

It works just fine, but you have to understand how PostScript works. 
Calling PDF_rotate rotates the entire page beneath you by that amount. 
Call it first, THEN draw your text.

It may be sensible to wrap the whole thing in a PDF_save and PDF_restore
so you don't have to keep track and manually unrotate.

So:

1. pdf_save
2. pdf_rotate
3. pdf_show
4. pdf_restore

miguel


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Using the pdf tags.

2002-05-22 Thread Miguel Cruz

That's why I suggested using PDF_save and PDF_restore.

PDF_save saves all sorts of attributes like the current color, scale, 
skew, rotation, etc. So you can call that, then make any changes, draw 
anything that needs to be affected by those changes, then call 
PDF_restore, and you're back to normal. You can nest those as much as 
necessary, too.

miguel

On Wed, 22 May 2002, Jeff Hatcher wrote:
 I understand the rotating of the page.  So this is what I am doing: I am
 building a page $pdf. If I rotate the page then everything on the page
 rotates also. I need to put titles in a 45 degree angle. These titles
 can change and there can be between 3-6 depending on the users input. Is
 there a way to build this text on a separate page then merge it into the
 $pdf page. Or any ideas of how you might do it. If it was just one title
 or on a page by itself then I understand how to do it. The problem is
 that it isn't.
 
 Thanks
 
 -Original Message-
 From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, May 22, 2002 1:39 PM
 To: Jeff Hatcher
 Cc: PHP-General
 Subject: Re: [PHP] Using the pdf tags.
 
 
 On Wed, 22 May 2002, Jeff Hatcher wrote:
  Does anyone know of a way to rotate text in a pdf?
  I can rotate an image and rotate a page but can not seen to rotate
  text.
 
 You're using PDFlib?
 
 It works just fine, but you have to understand how PostScript works. 
 Calling PDF_rotate rotates the entire page beneath you by that amount. 
 Call it first, THEN draw your text.
 
 It may be sensible to wrap the whole thing in a PDF_save and PDF_restore
 so you don't have to keep track and manually unrotate.
 
 So:
 
 1. pdf_save
 2. pdf_rotate
 3. pdf_show
 4. pdf_restore
 
 miguel
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Using the pdf tags.

2002-05-22 Thread Jeff Hatcher

Thanks,
That seems to work.


-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 22, 2002 2:33 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Using the pdf tags.


That's why I suggested using PDF_save and PDF_restore.

PDF_save saves all sorts of attributes like the current color, scale, 
skew, rotation, etc. So you can call that, then make any changes, draw 
anything that needs to be affected by those changes, then call 
PDF_restore, and you're back to normal. You can nest those as much as 
necessary, too.

miguel

On Wed, 22 May 2002, Jeff Hatcher wrote:
 I understand the rotating of the page.  So this is what I am doing: I 
 am building a page $pdf. If I rotate the page then everything on the 
 page rotates also. I need to put titles in a 45 degree angle. These 
 titles can change and there can be between 3-6 depending on the users 
 input. Is there a way to build this text on a separate page then merge

 it into the $pdf page. Or any ideas of how you might do it. If it was 
 just one title or on a page by itself then I understand how to do it. 
 The problem is that it isn't.
 
 Thanks
 
 -Original Message-
 From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, May 22, 2002 1:39 PM
 To: Jeff Hatcher
 Cc: PHP-General
 Subject: Re: [PHP] Using the pdf tags.
 
 
 On Wed, 22 May 2002, Jeff Hatcher wrote:
  Does anyone know of a way to rotate text in a pdf?
  I can rotate an image and rotate a page but can not seen to rotate 
  text.
 
 You're using PDFlib?
 
 It works just fine, but you have to understand how PostScript works.
 Calling PDF_rotate rotates the entire page beneath you by that amount.

 Call it first, THEN draw your text.
 
 It may be sensible to wrap the whole thing in a PDF_save and 
 PDF_restore so you don't have to keep track and manually unrotate.
 
 So:
 
 1. pdf_save
 2. pdf_rotate
 3. pdf_show
 4. pdf_restore
 
 miguel
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php