We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

PdfLoadedDocument.graphics Object Reference not set ....

Thread ID:

Created:

Updated:

Platform:

Replies:

130646 May 23,2017 07:01 AM May 25,2017 10:04 AM ASP.NET Web Forms 3
loading
Tags: PDF
Jordi Burgas
Asked On May 23, 2017 07:01 AM

Hi To all from Spain!

When my code-behind function written in C# in ASP.NET Web Form access to a pdfDocument.Graphics , only for some documents, trhow a "object reference not set an instance ..." when try to acces the Page.Graphics property. Property returns null value.

When code offers this behavior, after exception , in debug mode, i set run step to the initial exception line and it seems to load the variable correctly.

any ideas?

Thanks in advance



Surya Kumar [Syncfusion]
Replied On May 24, 2017 08:12 AM

Hi Jordi, 
 
We have tried to reproduce the issue which you have mentioned in your last update by drawing text in a loaded document, but we are unable to reproduce the issue.  
 
Please find the sample in which we tried to reproduce the issue: 
 
Since the issue which you have mentioned is suspected to be document specific, can you please provide us the document in which the issue is reproduced along with the code snippet which you used to reproduce the issue, so that we can help you in resolving this. 
 
In case if you face any problems in uploading required file, you can create a Support incident for the same using the below link: 
 
Regards, 
Surya Kumar 


Jordi Burgas
Replied On May 24, 2017 09:04 AM

HI Surya,

First of all , thanks for your Quick answer.

Actually as I said in the first post, the problem occurs in some documents. I attached one of them so you can check it. Note that the problem does not occur in a Winforms or console module. I just happened on an IIS server with a Webforms and code behind. Please, contact me if you need more information about,
Best regards,

Jordi

Attachment: 2017_3469_ARXIU_No_3_d99e044a.zip

Surya Kumar [Syncfusion]
Replied On May 25, 2017 10:04 AM

Hi Jordi, 
 
We have tried to reproduce the issue which you have mentioned in IIS server in Webforms environment with the document which you have given, by drawing string in all the pages of the document, but we are unable to reproduce the issue, 
 
Please find the sample which we tried to reproduce the issue: 
 
Can you please provide us the code snippet in which you have reproduced the issue along with following details about the environment which you use, so that we can help you resolve the issue: 
  1. Essential Studio version   
  2. Operating System   
  3. Culture settings   
  4. System bit type (32-bit/64-bit)   
  5. .NET framework version   
 
 
Regards, 
Surya Kumar 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;