Print Page | Close Window

Create an instance of Quick PDF Library problem

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1606
Printed Date: 06 May 25 at 2:39PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Create an instance of Quick PDF Library problem
Posted By: quickpdf_learner
Subject: Create an instance of Quick PDF Library problem
Date Posted: 15 Oct 10 at 6:44PM

I was trying to create a quickpdf application with c# for my web application by using:

string libraryPath = string.Format("{0}{1}", "c:\\inetpub\\devapp\\", "QuickPDFDLL0721.dll");

QuickPDFDLL0721.PDFLibrary qp = new QuickPDFDLL0721.PDFLibrary(libraryPath);
 
And got the following error:
"value cannot be null. parameter name: ptr".
 
I guess it's because of incorrect libray path.
 
Please advise.



Replies:
Posted By: quickpdf_learner
Date Posted: 19 Oct 10 at 6:49PM
It can be loaded to local while doesn't work for web.
 
The error log is
 
[NullReferenceException: Object reference not set to an instance of an object.]
   db..ctor() +39
   elog.elogger(String errormsg) +82
   _Default.Page_Load(Object sender, EventArgs e) +1340
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +41
   System.Web.UI.Control.OnLoad(EventArgs e) +131
   System.Web.UI.Control.LoadRecursive() +65
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427
 


Posted By: Rowan
Date Posted: 20 Oct 10 at 9:24AM
If this is going on a server then you should probably be using the  http://msdn.microsoft.com/en-us/library/ms524632%28VS.90%29.aspx - Server.MapPath method instead of hard coding the path as you're probably running into permissions issues. This error isn't caused by the library, it's caused by your web application not being able to find (due to permissions I imagine) the file that you're referencing.


Posted By: quickpdf_learner
Date Posted: 20 Oct 10 at 1:45PM
I've tried
PDFLibrary qp = new PDFLibrary(Server.MapPath("~\\QuickPDFDLL0721.dll")) or
PDFLibrary qp = new PDFLibrary(Server.MapPath("QuickPDFDLL0721.dll"))
which didn't work either.
 
As to permissions issues, what else do I need to do?
 
Another thing is that, I cannot add the dll as a reference to the project. Error message shows "No typed libraries were fuond in the component". Has anyone else got the same?
 
Thanks for your reply.
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk