Project

General

Profile

Display PDF in browser

Added by Ron Tidwell about 7 years ago

Hi,

I have created a PDF file and save it. Now I would like to show it in different tab on the client browser.

I am not sure, should I be using WT::Http or WT::Resource, or something else. From what I read so far it talks file upload. Is that not sending a file to the server?

I am looking to retrieve the .pdf file I created and display in a new tab on the browser. Maybe it is an upload, I have not seen anything about creating a new tab in the client Browser

I just need an area to start looking at and playing with.

Thanks,

Ron


Replies (2)

RE: Display PDF in browser - Added by Ron Tidwell about 7 years ago

Hi,

I think I might have found using WT::Link.

Thanks,

Ron

RE: Display PDF in browser - Added by Wim Dumon about 7 years ago

Hello,

Combine Wt::WFileResource (makes a local file accessible over a private URL) and Wt::Anchor (makes a hyperlink to the URL in an application). In WFileResource, you can use the disposition type to indicate if the file is intended to be shown in the browser, or to be saved on disk. You can also suggest a client-side filename there. In WAnchor, you can set the target in order to make the link open in a new tab.

Best regards,

Wim.

    (1-2/2)