PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 23, 2018 7:41 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Mar 07, 2018 2:49 pm 
Offline

Joined: Thu Feb 22, 2018 6:15 am
Posts: 5
Location: Baden, Austria
Hello,

docRenderer.PrepareDocument() throws an exception when I try to render the following table:

Code:
        'toMerge format={col0,col1,...}
        'col format = row,mergedown-rows

        toMerge = {"0,1", "0,1", "0,1", "1,1", "1,1"} 'no way
        '        0     1     2     3     4
        '      ----- ----- ----- ----- -----
        '  0  |     |     |     |     |     |
        '                        ----- -----
        '  1  |     |     |     |     |     |
        '      ----- ----- -----       
        '  2  |     |     |     |     |     |
        '      ----- ----- ----- ----- -----

I am able to mergedown either col(3)cell(1) or col(4)cell(1) by 1 but not both of them without getting the exception.


Top
 Profile  
Reply with quote  
PostPosted: Wed Mar 07, 2018 5:05 pm 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2829
Location: Cologne, Germany
Hi!

Please also see:
viewtopic.php?f=2&t=832
http://www.pdfsharp.net/wiki/IssueSubmissions.ashx

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 08, 2018 7:32 am 
Offline

Joined: Thu Feb 22, 2018 6:15 am
Posts: 5
Location: Baden, Austria
ok Thomas, sorry and thank you.
I am back with an attached project for you to reproduce the issue.
regards from AT
Ernst

p.s.: root cause seems to be that you cannot mergedown in all columns of a table if a complete row is affected.
Workaround for me for this issue is to add a dummy column with width 0 whithout any mergedowns.


Attachments:
MigraDoc-IssueSubmission.zip [19.61 KiB]
Downloaded 40 times
Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 10, 2018 6:08 pm 
Offline
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 381
Location: CCAA
Hi!
ErnstF wrote:
Workaround for me for this issue is to add a dummy column with width 0 without any mergedowns.
I guessed this would be a suitable workaround.

After some debugging I think I fixed the issue. Should be included with the next publication.
I thought one or two "if" statements would do the trick, but it was more complicated.
I hope my "correction" does not bring new bugs.

Thanks for your feedback, your code and your research.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 5 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