PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
PDFSharp, Text truncated https://forum.pdfsharp.net/viewtopic.php?f=2&t=4044 |
Page 1 of 1 |
Author: | masterx81 [ Wed Nov 06, 2019 6:02 pm ] |
Post subject: | PDFSharp, Text truncated |
Hi! First of all, really thanks for this software, i find it really useful, and with really a lot of potential (also if i'm using only 1% of it...) I'm having problems exporting a really simple table wrote in html. The HTML is generated by code, in a loop. At the bottom of the page the text is sometimes truncated in half, and continue on the next page. I'm using landscape, but do it also in portrait. I've tried to remove the margins, and googled a lot before posting, but i am not able to find a solution. I've also tried replacing the html table tag with divs, with the same result. I'm using vb.net, in gdi+ application I'm using the nuget package, version 1.51.5185-beta The table (using table tags) is a really simple table generated with the following code: Code: dim testoreport as string testoreport = "<HTML>" & vbCrLf & "<BODY>" & vbCrLf testoreport &= "<table style = ""width:100%"">" & vbCrLf testoreport &= "<tr>" & vbCrLf testoreport &= "<th>Cod.</th>" & vbCrLf testoreport &= "<th>Rag. sociale</th>" & vbCrLf testoreport &= "<th>Importo</th>" & vbCrLf testoreport &= "<th>Telefono</th>" & vbCrLf testoReport &= "<th>Agente</th>" & vbCrLf testoReport &= "<th>Descrizione</th>" & vbCrLf testoreport &= "<th>Invio</th>" & vbCrLf testoreport &= "</tr>" & vbCrLf For Each drow In dsSolleciti.Pagamenti.Rows testoreport &= "<tr>" & vbCrLf testoreport &= "<td>" & drow("cod. soggetto") & "</td>" testoreport &= "<td>" & drow("Rag. sociale") & "</td>" testoreport &= "<td>" & Format(drow("Importo totale"), "0.00") & "</td>" testoreport &= "<td>" & drow("Tel.") & "</td>" testoreport &= "<td>" & drow("Agente") & "</td>" testoreport &= "<td>" & drow("Descrizione") & "</td>" testoreport &= "</tr>" & vbCrLf next testoReport &= "</table>" & vbCrLf testoreport &= "</BODY>" & vbCrLf testoReport &= "</HTML>" & vbCrLf Dim config As PdfGenerateConfig = New PdfGenerateConfig config.PageSize = PdfSharp.PageSize.A4 config.PageOrientation = PdfSharp.PageOrientation.Landscape 'config.SetMargins(20) Dim pdfReport As PdfSharp.Pdf.PdfDocument pdfReport = PdfGenerator.GeneratePdf(testoReport, config) pdfReport.Save(filename) pdfReport.Close() pdfReport.Dispose() pdfReport = Nothing config = Nothing So nothing really strange. The HTML is rendeerd well. What i can do to avoid the truncated text? Really thanks for the support! |
Author: | Thomas Hoevel [ Thu Nov 07, 2019 8:43 am ] |
Post subject: | Re: PDFSharp, Text truncated |
Hi! masterx81 wrote: What i can do to avoid the truncated text? PdfGenerator is not our software. Maybe try to contact the makers at their site.
|
Author: | masterx81 [ Thu Nov 07, 2019 10:19 am ] |
Post subject: | Re: PDFSharp, Text truncated |
whoops, sorry |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |