0
我正在使用TuesPechkin將HTML轉換爲PDF,並且指定應在每個頁面上顯示爲頁腳的HTML文件的URL,但是它不呈現頁腳。作爲一個測試,我甚至嘗試設置LeftText的東西,並沒有呈現。當將HTML轉換爲PDF時頁腳無法呈現
我的代碼如下:
Dim FooterURL As String = "http://localhost:60699/testfooter.html"
Dim globalSettings As New TuesPechkin.GlobalSettings With {.PaperSize = PaperKind.A4,
.DocumentTitle = DocTitle,
.Margins = New TuesPechkin.MarginSettings With {.Unit = TuesPechkin.Unit.Millimeters, .Bottom = 20, .Left = 20, .Right = 20, .Top = 20},
.Copies = 1,
.ImageQuality = 100,
.ImageDPI = 300,
.ProduceOutline = True,
.PageOffset = 0,
.DPI = 1200,
.Orientation = TuesPechkin.GlobalSettings.PaperOrientation.Portrait}
Dim pdfdoc As New TuesPechkin.HtmlToPdfDocument
pdfdoc.Objects.Add(New TuesPechkin.ObjectSettings With {.HtmlText = strHTML,
.FooterSettings = New TuesPechkin.FooterSettings With {.HtmlUrl = FooterURL, .LeftText = "blah blah blah"},
.WebSettings = New TuesPechkin.WebSettings With {.LoadImages = True,
.PrintBackground = True,
.EnableJavascript = False}
})
Dim convertor As TuesPechkin.IPechkin = TuesPechkin.Factory.Create
Dim buf As Byte() = convertor.Convert(strHTML)
Return buf