Display picture or PDF file on Web-client

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 8
Joined: May 21, 2023
Company:

How to display a picture or PDF file stored in ValueStorage object on Web-client?
For thin client I extract file, save it to temp file and then use RunApp( "file:///" + StrReplace( Filename, " ", "%20" ) ). On Web-client this method does not work. Gives me an error message "The operation attempted is not supported".

 
#2
People who like this:0Yes/0No
Active user
Rating: 8
Joined: May 21, 2023
Company:

Is it possible in Web client to open a picture or PDF file stored on web server using web browser through HTTP connection?

 
#3
People who like this:0Yes/0No
Active user
Rating: 8
Joined: May 21, 2023
Company:

Here's how to display an image file: https://yellow-erp.com/2013/11/catalog-with-picture-manageable-forms/.

To display PDF file I created PDFDocument object, then from BinaryData extracted from ValueStorage object I created Stream, after that read PDF file content from created Stream to PDFDocument object and displayed it on screen with Show() method.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.