PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"External object detected!" error

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
SQLServerGeek



Joined: 19 Oct 2006
Posts: 2
Location: USA

PostPosted: Thu Oct 19, 2006 11:01 pm    Post subject: "External object detected!" error Reply with quote

I was testing this library out and was trying to bookmark and concatenate existing pdf documents. I would append a pdf document ok but when I try to save after adding the bookmarks for the existing pdfs I would get the debugger error "External object detected!". I followed the debug and it took me to a procedure called TransitiveClosureImplementation. Supposedly I referenced an external object. Any ideas on what this might mean? Thanks a million!
Back to top
View user's profile Send private message
Stefan Lange



Joined: 12 Oct 2006
Posts: 47
Location: Cologne, Germany

PostPosted: Mon Oct 23, 2006 8:27 pm    Post subject: Reply with quote

This is assertion failure and what this really means is hard to explain. Abridged version: You found a bug in PDFsharp. As a quick workaround you should try to remove the assertion, maybe it is wrong.
However, it should not be raised. But I cannot fix it without getting it. Can you send me a short peace of code with a PDF file that triggers the assertion failure?

Regards
Stefan Lange
Back to top
View user's profile Send private message Send e-mail
SQLServerGeek



Joined: 19 Oct 2006
Posts: 2
Location: USA

PostPosted: Tue Oct 24, 2006 5:23 pm    Post subject: Figured It Out Reply with quote

I found the solution to my problem after studying the AddPage function a bit more. The function says that the returned page is not the same object as the specified one. I was adding the PdfPage "page" as a bookmark but what I really needed to do was declare another handle ("page2" in the code below) and add that as the bookmark.

// *** GOOD ***
for (int idx = 0; idx < count; idx++)
{
page = inputDocument.Pages[idx];
PdfPage page2;
page2 = outputDocument.AddPage(page);
outline.Outlines.Add("SomeValue", page2, true);
}


------------------------------------------------------------------


// *** DOES NOT WORK & RAISES ERROR ***
for (int idx = 0; idx < count; idx++)
{
page = inputDocument.Pages[idx];
outputDocument.AddPage(page);
outline.Outlines.Add("SomeValue", page, true);
}



Thanks for responding to my post! This seems like a great project!
Back to top
View user's profile Send private message
Stefan Lange



Joined: 12 Oct 2006
Posts: 47
Location: Cologne, Germany

PostPosted: Mon Oct 30, 2006 12:22 am    Post subject: Reply with quote

Hello

Yes, you are right, this was the problem.

Now I check the parameters more precisely. I throw an exception immediately if someone adds a page to an outline that does not belong to the current document.

Regards
Stefan Lange
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com