Alternate CSS for Printing

  • 24 April 2019
  • 6 replies
  • 8 views

Badge +3

A customer wants to have a different layout for printing. In the regular desktop layout everything is in one column. i.e. the Name label and the Name textbox are on one row. The address label and address textbox are on the next row, etc.

What the customer wants is to have the print layout have multiple columns. For example, the Name label and textbox would be in one column. On the same row the address label and address textbox would be in the next column.

Of course, the canvas width would also need to increase.

I would use the Custom CSS inlcudes to import the print.css sheet.

How would I create a class that widens the canvas?

How do I rearrange the controls on the form with CSS?

How do I have the JavaScript fired from the Print button change the CSS that the Nintex form uses from it's current CSS to the imported CSS?

thanks


6 replies

Badge +17

@MrBabakS  after reading this, the easiest way to achieve this without trying to force the forms product to do different CSS styles is to use the generate document workflow action an set up a word document or pdf that is set for printing. 

 

This would save you a ton of time and can be set up to generate automatically once approved. Also, a link to the generated document could be stored into a field on the form or sent via email.

Badge +3
I don't believe the customer wants the extra steps of getting approval, going to their email, clicking a link, and then printing from the other document.
Also, I'm unfamiliar with Nintex workflows. I'm actually a programmer. I was assigned this project under the assumption that it would require programming.
I forgot to mention that this is Nintex on SharePoint On Premise 2013 with a Classic layout.
Thanks.
Badge +17

Nintex forms allows the "print to pdf" function. You placed this question in the forum for responsive forms which is different from the classic form view.

 

You can control the CSS in the classic form to your hearts content, but note that its not supported by the product when you do that. Doesn't mean it will break, but makes it risky if you upgrade.

 

My recommendation would be that if the customer fills in the form and wants to print it, set it up so that it can be printed from pdf quickly instead of having two different layouts. If this is not ideal, then I would still recommend the fillable route of the form, then having the printable version (more customized) that will be stored either as an attachment on the item or ina document library for printing.

 

The question to ask is, how often is printing required? If it is for every form, then maybe there is a bigger question around why are you printing out every form? More information and requirements are need to have a better solution in place. 

Badge +17

Nintex forms allows the "print to pdf" function. You placed this question in the forum for responsive forms which is different from the classic form view.

 

You can control the CSS in the classic form to your hearts content, but note that its not supported by the product when you do that. Doesn't mean it will break, but makes it risky if you upgrade.

 

My recommendation would be that if the customer fills in the form and wants to print it, set it up so that it can be printed from pdf quickly instead of having two different layouts. If this is not ideal, then I would still recommend the fillable route of the form, then having the printable version (more customized) that will be stored either as an attachment on the item or ina document library for printing.

 

The question to ask is, how often is printing required? If it is for every form, then maybe there is a bigger question around why are you printing out every form? More information and requirements are need to have a better solution in place. 

Badge +3

re: "You placed this question in the forum for responsive forms which is different from the classic form view."

My apologies. This is my first time to post here. How do I get to the forum for classic form view?

 

re: "The question to ask is, how often is printing required? If it is for every form, then maybe there is a bigger question around why are you printing out every form? More information and requirements are need to have a better solution in place. "

They are trying to get the printing to match the Departments of Labor and Education for performance reporting to fulfill the requirements under section 116 of the Workforce Innovation and Opportunity Act.

Badge +17

Because the output is so specific, you can either design the input form to match as close to possible and then they leverage "print to pdf" or what I would recommend is use doc gen within the workflow to handle things that need to be printed.

 

The reason why I suggest that is that its the best method of getting the data to look like the correct forms without dealing with input controls etx. You can take a form, apply data to it easily and the output is a lot cleaner and faster than trying to get the form to do what you think it should for printing. 

Reply