|
Rank: Newbie Groups: Member
Joined: 4/6/2015 Posts: 3
|
Hi, can i generate page to pdf with scaled height, BUT for full width (i know, that result image will be resized and has disproportion). Now, it scaled both - x and y, but i need only y.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, During the HTML to PDF stage, there will be only one scale factor and it is always applied to both X and Y, so it is impossible to change the output disproportion in this stage. After the HTML to PDF, you can apply a transformation matrix to the whole page with this method: http://www.essentialobjects.com/doc/4/eo.pdf.pdfpage.transform.aspxHere you can change it whatever way you want. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/6/2015 Posts: 3
|
Thanks for answer, but seems that scale transfrom not working porperly. I see only blank pdf as a result.
Using "<b>test</b>" html as test and next code for transform :
PdfMatrix matrix = new PdfMatrix(); matrix.Scale(0,2.0F); doc.Pages.ForEach(x => x.Transform(matrix)); doc.Save(stream);
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Why do you use 0 as the X scale factor? Scale is multiplying. When you multiply anything with 0 you get 0.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/6/2015 Posts: 3
|
Yeap, thanks!
|
|