HTML snippet for page break - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

HTML snippet for page break

Last post 12-30-2019 10:22 AM by granDelimiter. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 12-27-2019 09:54 AM

    HTML snippet for page break

    I'll be happy if I can get page breaks for printing working for infopath forms in just one browser (IE). I've got limited success by adding to a forms webpart a script editor with the snippet table{page-break-before:always;}. Then the separate tables in my form are on separate pages. The main problem is that after each page is an (almost) blank page. I can see an outline on the page, like a ghost or a remnant or some element of the table is spilling over and causing the extra page. I have tried page-break-after:none and a few other snippetParts to suppress the extra pages but no luck so far.
  • 12-30-2019 07:42 AM In reply to

    Re: HTML snippet for page break

    Have you tried just inserting a page break in the InfoPath form itself?
    Hilary Stoupa

  • 12-30-2019 09:05 AM In reply to

    Re: HTML snippet for page break

    Yes. PB has no effect (without added snippets, in IE 11). table {page-break-after} added snippet is the only way I have forced any breaks. I suspect that the extra pages after each table is caused by a remnant of the border or outline elements. So far I have not used SPdesigner.
  • 12-30-2019 09:15 AM In reply to

    Re: HTML snippet for page break

    correction: the snippet that worked was page-break-before:always;
  • 12-30-2019 09:32 AM In reply to

    Re: HTML snippet for page break

    I'm wondering if there is some way to use the dev tools in the browser to see what's going on - do you only see this in the actual printed output? Or is it also visible in the browser?
    Hilary Stoupa

  • 12-30-2019 09:51 AM In reply to

    Re: HTML snippet for page break

    I am diagnosing the printing using IE's "print preview" which accurately shows the finished print layout. Using the F12 I found a class to represent the tables, which I thought might give a higher priority command. .d_wCx9LKQT3jgGSZFe_6 {page-break-before:always;} improves printing slightly (one less extra blank page).
  • 12-30-2019 10:04 AM In reply to

    Re: HTML snippet for page break

    Yuck - I mean, that's some progress at least. I'm sorry I don't have an answer for this - InfoPath printing has always been a weak spot for the product. My only guess is that there still may be a CSS way around this.... did you try marking your table CSS as important?
    Hilary Stoupa

  • 12-30-2019 10:22 AM In reply to

    Re: HTML snippet for page break

    Marking the table css as !important made no difference. I found another class name to use, .ab_wCx9LKQT3jgGSZFe_6 (the third in a string of 3 words that come after "class" in the dev tools display. Using this as the target gets rid of all the extra pages except the first and the last (still no page breaks in Chrome printing).
    I guess this'll work for now. If I can get a closer look at the html using Designer maybe I can refine later.
    Thanks
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.