85
Views
11
Comments
Solved
[Ultimate PDF] Value cannot be null. Parameter name: value
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

I am getting an error generating PDF with Ultimate PDF.

In my cenario I have an mobile external app that access another external app and this one is responsible for generate and download PDF file, but when action PrintToPDF is called the following error happens:

An error occurred while generating the pdf for https://my_link_here: Value cannot be null.
Parameter name: value 

Stack:

An error occurred while generating the pdf for https://my_link_here: Value cannot be null.
Parameter name: value
   at ssUltimatePDF.Actions.ActionPrintPDF_Proxy(HeContext heContext, String inParamURL, String inParamTemporaryFolder, String inParamProduct, String inParamRevision, RCViewportRecord inParamViewport, STUserEnvironmentStructure inParamEnvironment, RCPaperRecord inParamPaper, Byte[]& outParamPDF)
   at ssUltimatePDF.Actions.ActionPrintToPDF_Advanced(HeContext heContext, String inParamURL, STUserEnvironmentStructure inParamEnvironment, String inParamPaperSize, String inParamMarginSize, Byte[]& outParamPDF) 

UserImage.jpg
Prasad Rao
Solution

Hi,

I tested opening the url from server directly and url opened just fine and case is also correct.

I upgraded the component from forge and seems to work for me now.

Regards.

2020-11-10 23-58-16
Raphael Ranieri
 
MVP

Hello Gabriel,


The string: 'https://my_link_here' was something you changed just as an example or it is exactly what is being returned by the error stack?

Looking at the error seems like the parameter named 'value' is null when you are calling some other action from PrintToPDF_Advanced > PrintPDF_Proxy action.

Have you tried to debug to see if some value is missing?


Cheers,


RR

2021-05-18 19-42-11
Gabriel Melo

Hello Raphael,

I changed link just to post here, the correct link is setup to an external application.

I didn't tried to debug, but is a good idea.

Thank you!

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

This error might generate multiple stack traces in Error Logs. Please send all of them.

UserImage.jpg
Prasad Rao

Hi,

I am having the same problem, below are the stack from module UltimatePDF_Service

 

Ours is onprem running in 11.18.1 version of Outsystems

Regards,

Prasad Rao

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Hi Prasad. Which URL are you using as the input parameter of the PrintPDF action?

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Are you by any chance using SEO to change names of modules in the URL?

UserImage.jpg
Prasad Rao

Hi,

SEO url is not being used and url is https://<host>/<module>/SampleReport.aspx?SampleFileId=254&IsSummary=False

Regards.

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP

Are you able to reproduce this issue on an isolated module, and attach the module here on Forge? I believe there might be something wrong with your URL construction.


I was able to reproduce this by using a relative URL but only when the module doesn't exist. In that case, I also get another log which includes the incorrect URL "/test/report":

Do you have this error log as well on your system? What URL is displayed in the error log? Can you see anything wrong with it, such as a misspelled module name?

UserImage.jpg
Prasad Rao

Hi,

No we are not using relative path. You can see the attached screenshot.

Regards.

Screenshot 2023-02-07 at 7.51.00 PM.png
2019-07-08 11-04-35
Leonardo Fernandes
 
MVP


Can you confirm if the spelling, including uppercase/lowercase, in the URL path matches exactly the name of the module hosting the SampleReport screen? Example, make sure your module ends with "_pdf" instead of "_PDF".

The URL might work if it's just a case-sensitive mismatch, but I'm afraid that any mismatch in the name of the module could be causing this issue. I believe this would only happen in Oracle databases, and I do not have any testing environment to test the hypothesis.

Thank you.

UserImage.jpg
Prasad Rao
Solution

Hi,

I tested opening the url from server directly and url opened just fine and case is also correct.

I upgraded the component from forge and seems to work for me now.

Regards.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.