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. Image for the cookie policy date
close icon

PdfLoadedDocument.graphics Object Reference not set ....

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



3 Replies

SK Surya Kumar Syncfusion Team May 24, 2017 12:12 PM UTC

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 



JB Jordi Burgas May 24, 2017 01:04 PM UTC

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


SK Surya Kumar Syncfusion Team May 25, 2017 02:04 PM UTC

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 


Loader.
Live Chat Icon For mobile
Up arrow icon