PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 3:29 pm

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: Shading problems / error
PostPosted: Tue Jul 06, 2010 6:52 pm 
Offline

Joined: Tue Jul 06, 2010 6:42 pm
Posts: 2
If I use this function with the row.shading.color line, I get a row with a shaded line but the cells do not have any text in them (1, 2, 3, 4). If I comment out the row.shading.color line, the cells have the correct text. I put it in a Try/Catch block but no error is thrown, so I am not sure what to do?

Thanks for your help,
Eric

Public Function CreateRow() As Row
Dim row As Row = New Row
row.Shading.Color = MigraDoc.DocumentObjectModel.Colors.Beige
row.Cells(0).AddParagraph("1")
row.Cells(0).Style = "UL"
row.Cells(1).AddParagraph("2")
row.Cells(1).Style = "TextBox"
row.Cells(3).AddParagraph("3")
row.Cells(3).Style = "UL"
row.Cells(4).AddParagraph("4")
row.Cells(4).Style = "TextBox"
Return row
End Function


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 07, 2010 7:13 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
It should work.
We use similar code, but create rows using
Code:
row = table.AddRow();


Which version are you using?
Are you rendering to PDF or RTF?

If the problem persists, please send us a MDDDL file.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Jul 07, 2010 6:10 pm 
Offline

Joined: Tue Jul 06, 2010 6:42 pm
Posts: 2
I figured out the problem when I tried to save the MDDL document -- it appears there was a conflict between a style I had defined as "Normal" and the default style "Normal" so I renamed by style and the shading now works properly.

Thanks,
Eric


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: Bing [Bot] and 35 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:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group