Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF: Object reference not set to an instance of an object Options
TroyB
Posted: Friday, January 25, 2013 4:06:51 AM
Rank: Newbie
Groups: Member

Joined: 1/24/2013
Posts: 2
When using these settings:

HtmlToPdfOptions options = new HtmlToPdfOptions();
var pageMargin = 0.5;

var defaultSize = EO.Pdf.PdfPageSizes.A4;
options.PageSize = defaultSize;
options.OutputArea = EO.Pdf.HtmlToPdf.Options.OutputArea = new System.Drawing.RectangleF(
pageMargin,
pageMargin,
(float)(defaultSize.Width - (pageMargin * 2)),
(float)(defaultSize.Height - (pageMargin * 2))
);

options.TriggerMode = EO.Pdf.HtmlToPdfTriggerMode.Dual;
options.MaxLoadWaitTime = 6000;
options.UserName = "theusername";
options.Password = "thepassword";

EO.Pdf.HtmlToPdf.ConvertUrl("url", doc, options);
I am receiving the following exception


Message: Object reference not set to an instance of an object.
Source: EO.Pdf
StackTrace: at EO.Pdf.Internal.lp.a(Object A_0, ThreadExceptionEventArgs A_1)
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


TargetSite: {Void a(System.Object, System.Threading.ThreadExceptionEventArgs)} System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}




TroyB
Posted: Friday, January 25, 2013 4:12:17 AM
Rank: Newbie
Groups: Member

Joined: 1/24/2013
Posts: 2
I wasn't sure where to find the overall version of EO.pdf (listed on the website as 2012.0.50) but the EO.pdf.dll version is listed as 4.0.50.2
eo_support
Posted: Friday, January 25, 2013 9:39:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

4.0.50.2 is the same as 2012.0.50. Please try to isolate the problem into a test project and then send the test project to us. Once we have that we will debug into it and see what we can find.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.