Print to PDF shows grey Ajax Overlay


Badge +7

I have Form which is having 10 views and pdf is generated when the form is loaded.

1. In Form Initializing method i initialize all view.

2. In Form Initialized method i call button clicked availble on one of view to generate pdf.

 

It is working in One environement but somehow it is not working in other env. In 2nd env. pdf generate with grey background with cursor in pdf i.e. before finishing all views initialization the form initialized method run and generate pdf.

 

Please let me know how to resolve this issue?

 


16265iE36D0DC4D4359E0E.png


5 replies

Hi,

Yes, PDF is getting created before the form gets actually loaded completely.

 

So in a nutshell, we need to provide some time before the PDF gets captured. that we can achieve using "Conversion Delay" parameter.

But unfortunately, Save as PDF function on the form doen't have this parameter but we do have some smartobject which take conversion delay as an input.

You can find those SMO named "PDF Convertor" under System-> Controls->Save as PDF, which has methods like Create PDF from URL which can help us in this scenario.

 

reference https://help.k2.com/kb001398

 

Thanks,

Divya Raj

Badge +7

If i add timer on the form and wait for specific time then also it is working.

 

But issue is why it is wokring in one environemnt and not in other envirorment. I checked all scripts and rules, Web.config on both enviornment and they are exact same.

The load time of any form depend on many factors, apart from the code like network so we cannot really point to one specific reason.

@BB33 I had a similar requirement and adding timer helped me get over the grey overlay. Thanks for the idea.

Badge +7

Hello  @DRaj,


 


You a my also may aso like to have a look at these threads:


 


PDFs are greyed out with green Spinner in middle:


https://community.k2.com/t5/K2-Five/PDFs-are-greyed-out-with-green-Spinner-in-middle/td-p/112376


 


Print to PDF shows grey Ajax Overlay


https://community.k2.com/t5/K2-Five/Print-to-PDF-shows-grey-Ajax-Overlay/td-p/110325


 


Markup and editing PDF file in K2 smartform


https://community.k2.com/t5/K2-Blackpearl-Forum-Posts/Markup-and-editing-PDF-file-in-K2-smartform/td-p/98721


 


Enjoy.


 


 


 


 

Reply