Back to Four Js Website
Four Js Customer Forum
Subscribe for automatic updates:
RSS
Sign in for full access
|
Help
Four Js Development Tools Forum
>
Discussions by product
>
Genero BDL
>
Display PDF-Files in GDC
Most recent posts
Pages:
1
[
2
]
« previous
next »
Reply
|
Print
Author
Topic: Display PDF-Files in GDC (Read 28961 times)
Leo S.
Posts: 129
Re: Display PDF-Files in GDC
«
Reply #15 on:
November 14, 2016, 12:56:57 am »
Hi Snorri, I got it to work , but...
I would not actually recommend to use it.
Why?
We did prepare webcomponents in 3.00 to use build in transmission for the web components html/javascript/css assets to the client.
Unfortunately this transmission does not work for this particular component (its a bug, but a bug being deeply in QtWebKit, so we are unable to fix this easily),
the visual effect is that the html page is shown as source code instead of being rendered... I hope that we can fix that for vNext .
What does work is uploading all needed pieces via fgl_putfile() to the clients data dir and using the setwebcomponentpath frontcall...this implies however that all webcomponents using this particular program need to be uploaded.
You need to check also the assets needed for uploading: the sample works for US locale but for other locales you might need to upload additional assets.
I attach the solution here, as said, its not really nice and understandable due to the uploading hassles.
Note that the makefile is pretty OSX centric : it uses curl to download the pdfjs stuff, but it should be easily adaptable to Linux.
The core of the trick: a small patch implants a gICAPI.js in the main page and enables you to call the displayPDF JS function via a webco frontcall.
% make main.run
press the "show" button and it should show a little demo with a pdf file.
wc_pdf.zip
(11.11 KB - downloaded 1100 times.)
Leo S.
Posts: 129
Re: Display PDF-Files in GDC
«
Reply #16 on:
November 14, 2016, 01:33:45 am »
Small addition: the problem appears only if GDC is connected directly or via SSH with the server.
Going via GAS and loading the webcomponent via http does work flawlessly (btw it does work also for GWC-JS)
I updated the main.4gl and attach here (you see the different ways are distinguished with the viaGAS variable)
Leo
main.4gl
(4.26 KB - downloaded 1074 times.)
Snorri B.
Posts: 104
Re: Display PDF-Files in GDC
«
Reply #17 on:
November 14, 2016, 12:21:44 pm »
Thanks Leo.
I will look into this. Probably it's just easier to have it all server side. Too many things could go wrong on > 300 clients.
Regards,
-Snorri
Leo S.
Posts: 129
Re: Display PDF-Files in GDC
«
Reply #18 on:
November 14, 2016, 12:58:31 pm »
Hi Snorri , I'd like to add that it would work anyway only for GDC3.00 , not 2.50 .
Regards, Leo
Snorri B.
Posts: 104
Re: Display PDF-Files in GDC
«
Reply #19 on:
November 14, 2016, 03:50:39 pm »
Quote from: Leo S. on November 14, 2016, 12:58:31 pm
Hi Snorri , I'd like to add that it would work anyway only for GDC3.00 , not 2.50 .
Regards, Leo
Yes, I'm aware of that.
Thanks,
-Snorri
Pages:
1
[
2
]
Reply
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Discussion
=> Ask Reuben
=> WWDC21
-----------------------------
Discussions by product
-----------------------------
=> Products announcements
=> Genero BDL
=> GWS
=> GAS and GBC
=> GDC
=> Genero Mobile for Android or iOS
=> Genero Studio
=> Reporting tools (GRW, GRE)
-----------------------------
Jobs
-----------------------------
=> Jobs
Powered by SMF 1.1.21
|
SMF © 2015, Simple Machines
Loading...