What I am trying to figure out is how to create a new document with a new coverpage, add 1 or more existing pdf files and at the same time add a pagenumber through the whole document.
Below is part of the sample code which was supplied with the product. What I would expect is that the pagenumbering also works for the appended documents because the template is applied. However only the coverpage has a pagenumber.
Do I really have to add a pagenumber to every single imported page?
EK
--------------------------------------------
Dim document As MergeDocument = New MergeDocument
' add page number template
Dim pageNumberLabel As PageNumberingLabel = New PageNumberingLabel("- %%SP%% -", 0, 750, 500, 11, TimesRoman, 11, TextAlign.Center)
pageNumberLabel.PageOffset = -1
Dim docTemplate As New Template
docTemplate.Elements.Add(pageNumberLabel)
document.Template = docTemplate
'-----------------------------------------------
' Create a cover page
Dim coverpage As Page = New Page(PageSize.A4, PageOrientation.Portrait)
coverpage.ApplyDocumentTemplate = False
' Add some text
Dim MyLabel As Label = New Label("Cover Page", 0, 0, 512, 14, Helvetica, 14, TextAlign.Center, Color.DarkBlue)
' Change the angle property
coverpage.Elements.Add(MyLabel)
document.Pages.Insert(0, coverpage)
' add the documents
document.Append(pdfDocumentA, Int32.Parse(comboBox1.SelectedItem.ToString()), Int32.Parse(comboBox2.SelectedItem.ToString()))
document.Append(pdfDocumentA, Int32.Parse(comboBox3.SelectedItem.ToString()), Int32.Parse(comboBox4.SelectedItem.ToString()))
--------------------------------------------