WebViewer viewer too small out of the box

Using v3.2…

Out of the box install and setup of WebViewer… Loaded the default demo doc (https://pdftron.s3.amazonaws.com/downloads/pl/webviewer-demo.pdf) into a plain unstyled div.

Problem:
The viewer is too small out of the box (158px) - as it if is compressed down to the smallest possible size. There is plenty of room in the layout (flex container). I also tried sticking it in the plain page on its own - still got the same result. Am I missing some required styling? Is there WV CSS that’s not loading correctly?

If I set a fixed height (in pixels) to the viewer div, then the viewer is indeed bigger - but my preference would be for the viewer to occupy all available height that it needs rather than rely on a fixed setting of course.

Hi Zman,

You will have to set a height for the viewer element. If you would like it to take all available space you can set the height to 100% which will fill the container it’s in.

Best Regards,
Ahmad Moaaz
Software Developer
PDFtron Systems Inc.

I did set it to 100% in my original example. That does not work.

Hi Zman,

height: 100% will fill the parent container. Please ensure that the parent container also has height: 100% or a defined height because the child container will not exceed the height of the parent in this case.

Best Regards,
Ahmad Moaaz
Software Developer
PDFtron Systems Inc.