7 Replies · Latest reply on Dec 5, 2017 11:31 PM by shanjith joy

    How to preview PDF export?

      I would like to be able to preview the PDF Export in order to see what the export will look like prior to export. This could exist in a view that accurately displays what the PDF Export of the Form will look like. Thanks in advance for the help.

        • Re: How to preview PDF export?
          Himanshu Kela

          Hi Jaison,

           

          I think, currently we can not preview the PDF before exporting. In OOB instances, when we click on Export -> PDF, it starts downloading directly.

          Since the PDF version is customized, preview might not have been enabled OOB.

           

          Anyways, you can log enhancement request and product team can have a look at it.

           

          Hope this helps.

           

          Thanks,

          Himanshu

            • Re: How to preview PDF export?
              Jaison Joy

              Thanks. However, I'm not fully sure on this and hence waiting for more people to pitch in. I was thinking if we could create a UI page so that it pops up on click of a UI action. But still it doesn't make much sense to me.

                • Re: How to preview PDF export?
                  Sushant Malsure

                  I guess, OOB solution not available to this but can be done as customized solution.

                  Let see if someone already done it else we will start sharing ideas for building similar using UI page. 

                  Regards,
                  Sushant Ram Malsure

                  • Re: How to preview PDF export?
                    Divya Mishra

                    Hi Jaison,

                     

                    This can be achievable with the help of a UI PAGE. Use the print commands there and it always pops- up with the prompt of print and review the page.

                     

                     

                    post me your feedback

                    Please Hit ✅Correct, ⭐️Helpful, or ❣️Like depending on the impact of the response

                    Have a lovely day ahead

                     

                     

                    Regards,

                    Divya Mishra

                      • Re: How to preview PDF export?
                        Jaison Joy

                        I simply tried a Ctrl+P on the form, however that doesn't render all the fields properly in the PDF file. Could you elaborate a bit technically on how to achieve it?

                          • Re: How to preview PDF export?
                            Divya Mishra

                            Sure

                            Create a UI action:

                            function printDirect() {

                            selSysIds = g_form.getUniqueValue();

                            var features = "resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=yes,location=no";

                            var href ="/ui_page.do?sys_id="ui page sysid"&sysparm_INC_sys_id="+selSysIds+"&sysparm_INC_query="+'';

                            if(selSysIds.length<=0){

                            var answer = confirm("No records selected, Printing all?");

                            if (answer == false){

                            return;

                            }

                            href = "/ui_page.do?sys_id="xyz"&sysparm_INC_sys_id="+selSysIds+"&sysparm_INC_query="+g_list.getQuery(); // pass ui page sysid

                            }

                            win = window.open(href, "Printer_friendly_format", features);

                            win.focus();

                            win.print(); // omit for preview only

                            }

                             

                            2. create a ui page and fetch the sysid and populate the fields with the help of a table

                             

                            This is a sample code.

                             

                             

                            post me your feedback

                            Please Hit ✅Correct, ⭐️Helpful, or ❣️Like depending on the impact of the response

                            Have a lovely day ahead

                             

                             

                            Regards,

                            Divya Mishra

                    • Re: How to preview PDF export?
                      shanjith joy

                      Hi Jaison,

                            Use the friendly print option to preview the format which is exported to pdf.

                       

                      After clicking the printer icon you can view the preview of the format

                      Kind Regards,
                      shanjith joy

                      PS: Hit like, Helpful or Correct depending on the impact of the response