PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 10:46 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Dec 25, 2007 8:05 am 
Offline

Joined: Tue Dec 25, 2007 7:55 am
Posts: 3
Dear All ,

Currently i'm creating large table , and i get this error while rendering the document
"An item with the same key has already been added."

Pls any help will be appreciated

Thanks in advance


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 26, 2007 11:08 pm 
Offline

Joined: Wed Dec 26, 2007 10:38 pm
Posts: 2
emadaslan wrote:
Dear All ,

Currently i'm creating large table , and i get this error while rendering the document
"An item with the same key has already been added."

Pls any help will be appreciated

Thanks in advance


Hi, I had same problem, because I try to modify
Code:
document.DefaultPageSetup.RightMargin = SomeValue

when i comment this code everything works fine
This happens with any margin
Hope it will help


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 28, 2007 5:41 am 
Offline

Joined: Tue Dec 25, 2007 7:55 am
Posts: 3
Quote:
Hi, I had same problem, because I try to modify
Code:
document.DefaultPageSetup.RightMargin = SomeValue

when i comment this code everything works fine
This happens with any margin
Hope it will help


thanks for your reply
Yes I've already did that
but currently I'm creating wide and long tables and i need to set topLeftMargin etc

hope some one have another solution


Top
 Profile  
Reply with quote  
PostPosted: Fri Dec 28, 2007 9:52 pm 
Offline

Joined: Wed Dec 26, 2007 10:38 pm
Posts: 2
emadaslan wrote:
Quote:
Hi, I had same problem, because I try to modify
Code:
document.DefaultPageSetup.RightMargin = SomeValue

when i comment this code everything works fine
This happens with any margin
Hope it will help


thanks for your reply
Yes I've already did that
but currently I'm creating wide and long tables and i need to set topLeftMargin etc

hope some one have another solution


Hi,
I think that solution might look like this
Code:
 document.DefaultPageSetup.LeftMargin = Unit.FromInch(SomeValue)

It works on my code.
Hope it helps
:D


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 28, 2007 10:39 pm 
Offline

Joined: Tue Dec 25, 2007 7:55 am
Posts: 3
the proplem still there :(
i've completely removed from my code
document.DefaultPageSetup.BottomMargin = Unit.FromInch(someValue);
so i'm not messing with any document margins

the table i'm creating consist of 80 rows
hope someone could help


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 05, 2008 1:57 pm 
Offline

Joined: Wed Mar 05, 2008 1:24 pm
Posts: 1
hi,

i've got a similar problem and the same error message:

for testing purposes i've created a simple table (2 columns, 4 rows)
now, if a cell in one row has a long text so the row wouldn't fit on this page, there is a pagebreak and the row with the long text is on the next page.

if the text gets even longer, so it doesn't even fit on one page i get the error message mentioned in thread title.

in my case there isn't set a margin at all, so this can't be the problem.

testing a little bit, i found out, that i also get the error, if the row fits on one page but i set "keepwith" in one of the previous rows to force a row start right after the prev row and then break within instead of starting on the next page.

if you need more information just tell me

and by the way, does anybody might have a workaround for this problem because i would like to use migralite, but i really have to deal with some longer strings that will not fit on one page


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 23, 2010 9:44 am 
Offline

Joined: Fri Apr 23, 2010 9:24 am
Posts: 1
An item with the same key has already been added.

I am getting the same problem when I am creating a large table has any one got any suggestions how they resolved this issue.
cheers


Top
 Profile  
Reply with quote  
PostPosted: Thu May 29, 2014 11:32 pm 
Offline

Joined: Thu May 29, 2014 5:05 pm
Posts: 5
My posting below may help address this problem.
viewtopic.php?f=3&t=2827


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 21, 2016 2:42 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
philfordjour wrote:
My posting below may help address this problem.
I don't think so.
PDFsharp and MigraDoc use many dictionaries - and when you use them in a "wrong" way, you sometimes get the exception.
Your change does not relate to the problems with MigraDoc tables discussed here. Your change addresses corrupted PDF files where two objects have the same ID.

The original problem reported in 2007 may or may not have been fixed.
If you encounter a problem, please submit a Visual Studio solution that allows us to replicate the problem. You can use our Issue Submission Template or build a solution from scratch.
See also:
viewtopic.php?f=2&t=832

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 41 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