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

Can we generate a horizontally scrollable pdf using this library.What would be the steps? #126

Closed
varshluck opened this issue Sep 8, 2017 · 4 comments

Comments

@varshluck
Copy link

No description provided.

@danfickle
Copy link
Owner

If you mean a multi-page PDF document that scrolls horizontally, I don't believe the PDF specification allows that:
https://forums.adobe.com/thread/2084640

However, if you mean layout the pages as normal but render them horizontally to a single page which could be scrolled left to right, that should be doable.

It would be done by replicating the writePDF method in PdfBoxRenderer with appropriate changes. I could have a crack at this if you like.

Out of interest, what is your use case for this functionality?

@varshluck
Copy link
Author

We are using this for our reporting framework .
When number of columns of our report exceed beyond a certain number the generated html has that table going out of bounds which generates a pdf with columns getting excluded.

@danfickle
Copy link
Owner

I think this is a generic problem, all content outside the page margin will be silently discarded. I think better behavior would be to insert a page with the clipped content. This would be behind a CSS flag to avoid backwards compatibility problems.

danfickle added a commit that referenced this issue Aug 9, 2018
+ Very early work on getting cut-off page overflow to optionally render on inserted (shadow) pages. Fast renderer only.
+ Also fixed some page number issues in the fast renderer.
+ Also fixed an issue in the fast renderer where line boxes were rendered on multiple pages.
danfickle added a commit that referenced this issue Aug 12, 2018
Controls whether cut-off content to the right (ltr) of the page is inserted or to the left (rtl).
danfickle added a commit that referenced this issue Aug 19, 2018
Also moved to make block boxes only print on pages where their border-box intersects with the page rect rather than all pages where their overflow intersects.
danfickle added a commit that referenced this issue Aug 29, 2018
So I don't break what's working as I continue to work on shadow pages.

Included:
+ Static
+ Absolute/relative
+ floats
+ table
+ paginated table
@danfickle
Copy link
Owner

I have added a page on cut-off page support on the wiki.

Here is a sample PDF:

overflow.pdf

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

No branches or pull requests

2 participants