Formatting Print export - headers appear mid-page or data columns get cut

Formatting Print export - headers appear mid-page or data columns get cut

enjoypbenjoypb Posts: 29Questions: 11Answers: 0
edited March 2017 in Free community support

I'm having challenges formatting my Print output. When exporting as Landscape or Portrait the row header repeats mid-page. When I change to Portrait or Landscape respectively, (eg from #1 to #2, or #3 to #4 the data columns then get cut off. This happens (data cols get cut off) even if I try refreshing the browser, and printing to the new (2 or 4) formats.

Could you help me understand what I need to do to print all the columns and have the header show up at the appropriate top of every page?

Thanks much!

Answers

  • enjoypbenjoypb Posts: 29Questions: 11Answers: 0

    Any help please?

  • F12MagicF12Magic Posts: 109Questions: 0Answers: 28

    Please provide a link to a testpage, as per forum rules. Without it, it'll be impossible for us to do any debugging.

  • enjoypbenjoypb Posts: 29Questions: 11Answers: 0

    So, I spend several hours trying to find a solution, an hour or so asking for help, wait 10 days, get told to go spend a couple more hours setting up a dummy site so I can get help. But, not a clue on what to do, even with what appears to be clear evidence of the problem.

    I'll get right on that.

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    I tried the basic Print button example:
    https://datatables.net/extensions/buttons/examples/print/simple.html

    I was able to change between portrait and landscape without issues.

    Sometimes a screenshot is enough to help if someone has seen the issue before. If not then being able to see and interact with your code is generally the only way of finding the issue.

    Kevin

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    The print output is highly dependent upon the browser that you are using. What Buttons does is create a simple HTML page that basically contains only a plain HTML table and links to the stylesheets used by the host page. You'll be able to see that in the background of the print dialogue box.

    After that, what is actually sent to the printer is completely up to the browser. Most are fairly good at this now, but printing from the web has always been a bit of a nightmare and it is possible there are still browser bugs in this area.

    @enjoypb - What browser are you using?

    Are you able to reproduce the issue with any of these examples?

    Allan

  • enjoypbenjoypb Posts: 29Questions: 11Answers: 0

    I'm using Chrome myself but users are using the whole array. I ended up removing the PDF button because no matter what I try I can't seem to affect the formatting. When I set the font-size in the print-button config with a smaller font it all appears to be working great. Thanks!

This discussion has been closed.