Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] - Print cutting off horizontal content when content is too wide #374

Open
lukepint-wk opened this issue Feb 3, 2023 · 2 comments
Labels
request New feature or request

Comments

@lukepint-wk
Copy link

lukepint-wk commented Feb 3, 2023

What should we change and why?

When using the new print button, the generated print view/PDF can cut content off if it is too wide.

For example, if a table has many columns, the content can overflow the printable area of a standard letter size paper. Some users accommodate this by adjusting the scale to ~70% and using Landscape layout. In some cases (shown in screenshot) even those adjustments don't allow the content to fit entirely.

Desired Outcome:

  • Any content that "overflows" while printing should be moved onto another page to prevent content loss while printing.

Complications:

  • We need to calculate all of the page widths before printing and determine if any would overflow standard settings. This means the user may need an option to edit scale and layout BEFORE the system print dialog is displayed to accurately determine what content overflows and should be copied to the next page.

Version

1.1.44

With which browsers are you experiencing the bug?

Firefox, Chrome, Safari, Microsoft Edge

Documents

Overflow - Inline Viewer - FERC Form.pdf
ferc_overflow_tables.html.zip

Screenshots

Screen Shot 2023-02-03 at 4 41 08 PM

Screen Shot 2023-02-03 at 4 48 42 PM

@lukepint-wk lukepint-wk added the bug Something isn't working label Feb 3, 2023
@paulwarren-wk
Copy link
Contributor

I don't think this is a viewer issue, as I get the same problem if I try to print the document directly from the browser without the viewer.

This could be improved by adding some additional custom CSS to the document, but it would need to be specific to the document, and I don't think it's possible to overflow columns onto a new page. The best that could be done would be to switch some pages to landscape and scale them down.

@lukepint-wk lukepint-wk added request New feature or request and removed bug Something isn't working labels Feb 27, 2023
@lukepint-wk lukepint-wk changed the title [BUG] - Print cutting off horizontal content when content is too wide [REQUEST] - Print cutting off horizontal content when content is too wide Feb 27, 2023
@lukepint-wk
Copy link
Author

I don't think this is a viewer issue, as I get the same problem if I try to print the document directly from the browser without the viewer.

That's a good point. I updated this to be a request instead.

One idea was to use javascript to copy the table into a new fixed-size div multiple times. Then use offsets to show different portions of the table while hiding the overflow.

Essentially this in its basic form:

  • Calculate table width as y
  • Divide y by the printable width to get x
  • Replicate x times with offsets (and overflow hidden)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants