Skip to main content

Search

print form

Comments

8 comments

  • Christof Nussbaumer

    Hi Tadej,

    there is a javascript function for Print command (same as press CTRL+P): window.print()

    You can place this on a button on your form.

    In the following example I added a short delay to prevent having the Working on it... message on print preview:

    setTimeout(function (){
      window.print();
    }, 1000);
    0
  • Tadej Cajner

    Thank you Christof, it works as I wanted.

    Is it possible to automaticaly select printer (Microsoft Print to PDF) and name (from field) with script ?

     

    Best regards,

     

    Tadej

    0
  • Christof Nussbaumer

    hi Tadej

    this is not possible to configure on a web page.

    the Default Printer you defined on your device is selected automatically - and setting file name is technically afar in step after printing and not accessible

    0
  • Tadej Cajner

    Thank you Christof

     

    Tadej

    0
  • Sandy Ussia

    Hi Christof Nussbaumer

    Do you by chance have a similar script that can work with modern Forms? :-)

    When I try window.print() I just get a screenshot of a blank page with an uncustomized SharePoint form on the right. Is there any way to create a printed form that somehow works with the customized layout, which might include columns, tabs containing content, and sublists? Customers have asked for this a number of times, as they try to replace printed forms. They need something they can save as a PDF.

    Thanks!

    0
  • Christof Nussbaumer

    hi Sandy Ussia,

    window.print() works as well for webpages with modern forms. See print preview below:

    Maybe it's a browser related issue. I used Edge Chromium in this case and it worked. Had only to adjust de Scale a bit to get a all content on one page.

    However it's still just a webpage print - for better customized reports we suggest to use Document Generator (feature in Solution Studio)

    0
  • Sandy Ussia

    Thanks, Christof Nussbaumer

    Yes, I was able to get that far, but found as you said, that's it's only a webpage print.

    I think it would be necessary to use the Generate Document action, yes, to capture data within form tabs etc into a Word template. Could it be possible from a development standpoint to add that action to the Modern Forms standalone solution? (i.e. for use also outside of the full Solution Studio)

    Thanks!

    1
  • Christof Nussbaumer

    Hi Sandy Ussia

    It's not possible to integrate Document Generation action into the Modern Forms standalone Add-In since Document Generation is another independent feature - as well separately licensed in Solution Studio.

    0

Please sign in to leave a comment.