Yes,
developers like to say "it's a feature, not a bug!"
I fixed
that this way and I'm quite happy with the result!
 
var rect
= PageSize.A4.Rotate();
var pageRect = new Rectangle(rect.Left,
rect.Bottom, rect.Width, rect.Height);
using
(var pdfDoc = new Document(pageRect)) 
//...


________________________________
 From: Leonard Rosenthol <lrose...@adobe.com>
To: Vahid Nasiri <vahid_nas...@yahoo.com>; Post all your questions about iText 
here <itext-questions@lists.sourceforge.net> 
Sent: Friday, February 10, 2012 4:13 PM
Subject: Re: [iText-questions] PdfShading.SimpleAxial in a landscape page
 

This is as defined in the PDF spec.
 
You need to “unrotate” the shading using a standard transformation.
 
Leonard
 
From:Vahid Nasiri [mailto:vahid_nas...@yahoo.com] 
Sent: Thursday, February 09, 2012 1:45 PM
To: Post all your questions about iText here
Subject: [iText-questions] PdfShading.SimpleAxial in a landscape page
 
Hello,
If I use PageSize.A4.Rotate() as the page size, It rotates 
PdfShading.SimpleAxial too.
For example
 
public void CellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] 
canvases)
{
   //...
            var shading = PdfShading.SimpleAxial(
                                    cb.PdfWriter,
                                    position.Left, position.Top, position.Left, 
position.Bottom,                                   
                                    BaseColor.YELLOW, BaseColor.ORANGE);
   //...
}
 
It should be from top to bottom and works fine with PageSize.A4. 
If I use  PageSize.A4.Rotate(), It will be from left to right, instead of top 
to bottom.
 
How can I fix that?
 
Thanks for your time.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to