Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Forums] HTML TO PDF - Generate PDF

$
0
0

Pawan Kumar Sharma wrote:

Nitesh Ahirwar wrote:

Pawan Kumar Sharma wrote:

In this case, The Map is generated Dynamically based on User Id and location. That's where I am not sure, how to achieve it. I can not skip passing User Id and Location to this Web Block.Based on the passed values, we make some api calls & get the ordinates to show on map in preparation of Web Block.

Hi Pawan ,

Could you show me how u r creating and passing the url to the generate pdf function. may be that could be the case.

Try creating URL like below .

 

Thanks,

Nitesh


Hi Nitesh,

I am also making absolute URL same way. I have user ID as the input parameter to this screen. Thing is that, I have lot of permission checks on the page. Page contains multiple web blocks which internally, have other Web Blocks, where again some permission check is present. Similarly there is a map web block which also gets rendered based on permission. The problem is when component would be calling this page, this will fail on multiple web blocks hence, login page is downloaded.

To overcome this issue, I am using login action in preparation with the user Id that i sent as part of input parameter in URL & that is input parameter to screen as well. By doing so I was at least able to download the PDF with some content, though map still didn't render. 

Hi Pawan ,

Issue is that only that you are using permissions on webblock . To make pdf generation to work, page can contain dynamic content but should not have any state management blocks or variable like sessions , user checks , site properties etc. You may render this page correctly on you browser but PDF generation method only generates content which do not have these checks or variables .

Try any alternate to have checks on users on ur weblock , avoid any session variables , site properties or state management technique. It can render only content which is anonymous.


Thanks.

Nitesh



Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>