The template and MergeDocument are 90 degrees apart. The template is satisfactorily applied for all other parts of the main report but is 90 degrees off for the part where I appended the MergeDocument.
Dim MyDocument2 As MergeDocument = New MergeDocument("C:\externaldoc.pdf")
doc.Append(MyDocument2)
"doc" is the main report that I'm appending to. The main report PDF ("doc") and "externaldoc.pdf" are both in landscape.
Thanks,
Nick
MergeDocument & Template 90 degrees apart
Re: MergeDocument & Template 90 degrees apart
Forum member · Oct 19, 2006The correct version is 3.0.3.0. Sorry for any confusion.
Re: MergeDocument & Template 90 degrees apart
Support · Oct 19, 2006Hello Nick,
It seems the PDF hat you are merging has rotate property in them. Basically what is happening is the PDF is getting written out from bottom to top and then it is all getting rotated 90 degrees (to appear in portrait). This is a very uncommon way to create PDFs and our product will always draw out the page elements in this way. Our product draws out the page elements left to right and then when the entire PDF gets rotated 90 degrees it rotates the page elements as well.
So in your case, you may want to use ImportedPageData object and then rotate the PDF you are merging by setting the Angle property to 90 degrees.
Thanks,
ceTe Software Support Team
Re: MergeDocument & Template 90 degrees apart
Forum member · Oct 19, 2006Thanks for the quick response. I am importing/merging a multiple page PDF into the main report PDF. How would I do that? I need to rotate the template for this PDF document that I'm appending (i.e. not the main report PDF). The template is inherited from the main report PDF (not explicitly set).
Thanks,
Nick
Re: MergeDocument & Template 90 degrees apart
Support · Oct 19, 2006Hello Nick,
Are you using an existing PDF document as a template? If yes, you will have to rotate the template before it gets applied to the final document. I am not exactly sure what you mean by template is inherited from the main report PDF? Can you please explain it in bit more detail?
Thanks,
ceTe Software Support Team
Re: MergeDocument & Template 90 degrees apart
Forum member · Oct 19, 2006Hello,
Our application builds a template object and applies it to the main report PDF (i.e. "doc"). I think these are the only template settings used:
New PageDimensions(PageSize.Letter, PageOrientation.Portrait)
New PageDimensions(792.0F, 612.0F, 36.0F)
By inheriting I mean that the main report PDF's template is applied on to "external.pdf" as it's appended to the main report PDF. How do I rotate a template before applying it?
Dim MyDocument2 As MergeDocument = New MergeDocument("C:\external.pdf")
doc.Append(MyDocument2)
Thanks,
Nick
Re: MergeDocument & Template 90 degrees apart
Support · Oct 20, 2006Hello Nick,
In order to rotate the template PDF, before adding the document use the ImportedPageData object and pass the PDF to it and then using the Angle property rotate the PDF by 90 degrees. Following is the sammple code block:
' Create a Document
Dim MyDocument As Document = New Document
' Create a Page and add it to the document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
' Create an ImportedPage (template) and add it to the document
Dim MyData As ImportedPageData = New ImportedPageData( "C:\ImportPDF.pdf", 1 )
MyData.Angle = 90;
MyPage.Elements.Add(MyData)
This way the template will get applied over the document.
Thanks,
ceTe Software Support Team
Re: MergeDocument & Template 90 degrees apart
Forum member · Oct 23, 2006The ImportedPageData object code snippet did the desired task.
Thanks,
Nick