allenai / pdf-component-library

44 stars 4 forks source link

Improve layout of pages and text without canvas rendering #141

Closed pauls-ai2 closed 2 years ago

pauls-ai2 commented 2 years ago

When we move to a single canvas building the images for pages, we will no longer have the size of the canvas element to set the page's size.

Before

This is what the PDF looks like.

Screen Shot 2022-07-11 at 5 01 58 PM

This is what it would look like if the text was visible, but the canvas was removed.

Screen Shot 2022-07-11 at 5 00 15 PM

After

This is what the page would look like with only text visible (before we render the page's image)

Screen Shot 2022-07-11 at 4 59 58 PM

This is what it looks like when the page's image is behind the visible text (as a demo, not how we will actually render it)

Screen Shot 2022-07-11 at 5 00 57 PM