Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
Hi, I have some code to put a header and footer on my pages. Currently it is creating acmText("Page Header") ..... What I would like to do is create the header from a url where I have the header file already created. This is my code to define the header.
Code: Visual Basic.NET
Dim header As New Acm.AcmBlock(New Acm.AcmText(String.Format("Page Header - Page {0}", doc.Pages(I).Index)))
header.Style.Border.Bottom = New Acm.AcmLineInfo(Acm.AcmLineStyle.Solid, Color.Black, 0.01F)
header.Style.Top = 0.6F
Thanks, Becky
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
If you use HTML to PDF converter, the easiest way to create header and footer is through HtmlToPdf.Options.HeaderHtmlFormat/FooterHtmlFormat. Those two properties take HTML. AcmText on the other hand, does not understand HTML.
If you have the header HTML in a file, you will need to write code to read them into a string first because both HeaderHtmlFormat/FooterHtmlFormat and AcmText takes strings. They do not take Urls. Only the main HTML to PDF interface ConvertUrl takes Url. The code to fetch a Url is rather simple, you can search online if you are not familiar with it. There should be plenty of articles describing how to do it.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 5/24/2012 Posts: 45
|
OK, I can work with that. Thanks!
|