PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 7:26 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: PDFSharp, Text truncated
PostPosted: Wed Nov 06, 2019 6:02 pm 
Offline

Joined: Wed Nov 06, 2019 5:46 pm
Posts: 2
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!


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 8:43 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 07, 2019 10:19 am 
Offline

Joined: Wed Nov 06, 2019 5:46 pm
Posts: 2
whoops, sorry :oops:


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group