Hello
I'm trying to put an ImportedPageArea inside a TransformationGroup. The code is below
ImportedPageArea headerArea = new ImportedPageArea(pdfPage, 0, 0);
TransformationGroup gr2 = new TransformationGroup(0, 0, 10000, 10000);
gr2.Add(headerArea);
page.Elements.Add(gr2);
But I couldn't find an ImportedPageArea on my page. On the other hand the following code works fine
ImportedPageArea headerArea = new ImportedPageArea(pdfPage, 0, 0);
page.Elements.Add(headerArea);
What's wrong am I doing?
Best regards, Yuriy
ImportedPageArea in TransformationGroup
Re: ImportedPageArea in TransformationGroup
Support · May 31, 2011Hello Yuriy,
We did some testing on our end and found that the dimensions which you are using for setting width and height for the TransformationGroup is making the contents to get added to the page which cant fit into the page dimensions. Please try using the below code and this will work for you.
Document document = new Document();
Page page = new Page();
PdfDocument pdf = new PdfDocument(@"C:\Temp\fw9AcroForm_03.pdf");
ImportedPageArea headerArea = new ImportedPageArea(pdf.Pages[0], 0, 0);
TransformationGroup gr2 = new TransformationGroup(0, 0, headerArea.Width, headerArea.Height);
gr2.Add(headerArea);
page.Elements.Add(gr2);
page.Elements.Add(new LayoutGrid());
document.Pages.Add(page);
document.Draw(@"C:\MyDocument.pdf");
Thanks,
ceTe Software Support Team.
Re: ImportedPageArea in TransformationGroup
Forum member · Jun 1, 2011Thanks a lot for the reply
Best regards, Yuriy