Hi,
how can I load the URL of the PDF Viewer dynamic?
I tried $$(“pdfviewer”).define(“url”, newPDF);
Result: The URL was changed but still the old PDF is shown.
There is no refresh on the pdf viewer
Grab the update Webix ( version 3.0.4 ), it adds support of the next API
$$("pdfviewer").load(url);
in the 3.x version of webix we could load a PDF as follow : { “data”: lcPdfData }
where “lcPDFdata” was PDF data in string format.
We’re using WEBIX in a Android WebView and showing a local stored PDF file the Webix version 4.x won’t load the PDF the same way as the previous version.
Also we experience memory problems (with the 3.x version) … after showing about 20 PDF files the app crashes. The crashes has to do with the PDFviewer or PDFJS. when not loading any PDF (not using the function pdfviewer.load(…) ) there are no memory leaks
any sugestions how we get rid of the memory leaks?
for more memory cleanUp use the following option:
beforeShowPDF set this property:
pdfViewerObj.cleanupAfterRender = true;
afterShowPDF call destroy():
pdfViewerObj._pdfDoc.destroy();
Hello,
Yep, we’ve normalized loading logic of the viewer and now the load()
method is used for fetching remote resources and parse()
method is used to parse inline data like base64 strings and data of uploaded files.
So, the syntax is pdf.parse(data:lcPdfData)
: http://webix.com/snippet/cc33e839
As to memory problems, we will add clean up logic in the next release.