|
Re: Viewing/rendering PDF file [message #1806005 is a reply to message #1805999] |
Tue, 30 April 2019 10:42 |
|
Hi Mark. Which version of Scout do you use now? Since v5.1 Scout is a web-framework. It does not have any built-in facility to create PDF files, but you may use whatever tool or library best fits your requirements to do that.
The important part is: you must create the PDF document on the UI server and download that document from there. I'd recommend to store the PDF document in a org.eclipse.scout.rt.platform.resource.BinaryResource and call the method AbstractDesktop#openUri(BinaryResource res, IOpenUriAction openUriAction). This causes the Scout client which runs in the browser, to download the given PDF document (BinaryResource).
Open source Scout has no PDF viewer widget, so you must provide a custom widget or -field for that. I'd recommend to use PDF.JS, or (if you don't need to support older browsers) you could try to use an AbstractHtmlField, set the BinaryResource as an attachment and use the EMBED tag.
Eclipse Scout Homepage | Documentation | GitHub
|
|
|
|
|
|
|
Re: Viewing/rendering PDF file [message #1842954 is a reply to message #1827669] |
Wed, 07 July 2021 16:52 |
Heita Woorb Messages: 1 Registered: July 2021 |
Junior Member |
|
|
Oh, I was trying to do the same thing as Oueslati AnisFriend and i had no idea what was the sample code for the EMBED tag. And it is actually working if I am using that code, that is great, thank you very much guys! By the way guys, if I really need to render a pdf file for a report, how should I do it?! I tried to use the 8th version of scout however it does not work out. Since it did not work, I choose to open it and edit online on https://pdfliner.com/ as it is the best online pdf editor. It works in there, but when I am trying to upload it, the receiver cannot open it. What should I do?!
[Updated on: Fri, 09 July 2021 14:32] Report message to a moderator
|
|
|
Re: Viewing/rendering PDF file [message #1843203 is a reply to message #1842954] |
Tue, 20 July 2021 06:41 |
|
Hi Heita
As I said in my post above: Eclipse Scout does not have any built-in facility to create PDF files, but you may use whatever tool or Java library best fits your requirements to do that.
Since this forum is about Eclipse Scout, we cannot give you advice on external libraries, but maybe this is a good starting point for you.
For the same reason, we cannot answer questions about tools like pdfliner, please check the support section/forum for that specific tool.
Cheers,
André
Eclipse Scout Homepage | Documentation | GitHub
[Updated on: Tue, 20 July 2021 07:28] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04370 seconds