[Html2PdfConverter] Popup scrolling problem

[Html2PdfConverter] Popup scrolling problem

  
Forge Component
(52)
Published on 30 Oct by Guilherme Pereira
52 votes
Published on 30 Oct by Guilherme Pereira

Hi,


I am using this component for generating PDFs and when I'm using it in a simple page that has just a table records on it the popup with the preview of the PDF is generated on top of the page and automatically the page gets scrolled to top.

The problem I encountered is when trying to use this component in a different page that has multiple sections and the popup is not scrolled to the top of the page, but somehow to a random position around the middle of the page.

Analyzing the javascript code behind this behavior we found out that the RecenterOnResize parameter in the attached image is always hardcoded to True and that's why RichWidgets_Popup_Editor_resize(divToPopup, setWidth, setHeight, recenter, event) is always called. After that we found out that there is a bug in the following calculation:

if (setHeight == -1) {

        var oldTop = parseInt(divPopupOuterWindow.css("top"));

        if (recenter)

            animateFinal.top = Math.max(20, oldTop + (oldHeight - (height + titleHeight)) / 2);

        animateFinal.height = height + titleHeight;

    }


Please let us know if we can provide any more information.


Kind regards,

Bogdan

Hi Bogdan,

Sorry but it was not clear to me exactly what the problem is. If the bug is on RichWidgets behavior then you need to contact outsystems support for further assistance.


If the problem is with the pdf generation can you post some screenshots detailing the problem with the generation or provide a sample url so I can take a look?


Cheers,

Guilherme