NG Desktop & Pdf_Viewer Inconsistency

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

NG Desktop & Pdf_Viewer Inconsistency

Postby pitc » Mon Dec 06, 2021 2:10 pm

I am using the pdf_viewer component by specifying a dataprovider as a form variable to provide the pdf bytes.
When testing in developer in the Ng Client ( browser) the pdf bytes display correctly.
However when testing and launching the NGDesktop the pdf bytes are displayed correctly but there is a string of characters in the tool bar that look like a UUID.

The layout and the icons are different.
Note that the NgClient displays is identical to the native browser display when using File://<filepath> Browser is Firefox.
Note that the NgDesktop dispaly is identical to the Chromium browser.
Note that if I have NgClient run in the Chome browser then it is identical to the NgDesktop display.

To make it more interesting I tried to set the documentUrl instead of the dataprovider (still set in the properties but the value is null) bytes but got a blank pdf displayed.
Does the pdf_viewer component (NOT the pdf_js_viwer component) only work with the dataprovider?

Using Servoy 2021.09.3703 Servoy PDF Viewer 1.4.1 Servoy Extra components 4.2.0, Bootstrap Extra components 1.4.1
Attachments
pdf_viewer_ngclient.jpg
NGClient
pdf_viewer_ngclient.jpg (21.99 KiB) Viewed 1047 times
pdf_viewer_ngdesktop.jpg
NGDesktop
pdf_viewer_ngdesktop.jpg (48.76 KiB) Viewed 1047 times
Tom
prospect-saas.com
pitc
 
Posts: 115
Joined: Thu Nov 14, 2019 2:22 pm
Location: Ottawa, Ontario, Canada

Re: NG Desktop & Pdf_Viewer Inconsistency

Postby robert.edelmann » Wed Dec 08, 2021 1:10 pm

There's a ticket requesting an option to provide the name of the file: https://support.servoy.com/browse/SVYX-55. At the moment it seems the name is random.

I think the icons in the pdf-viewer are the browser-defaults, ngDesktop is based on electon / chromium.

If you want to display a file you have to save it on the server and provide the corresponding URL from
Code: Select all
plugins.file.getUrlForRemoteFile()
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 91
Joined: Wed Aug 14, 2013 6:12 pm


Return to Programming with Servoy

Who is online

Users browsing this forum: Bing [Bot] and 9 guests