PDF Preview Sharepoint Online

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
nI3o
Posts: 1
Joined: Thu Dec 05, 2019

05 Dec 2019

Hey,

first a big thanks to the developers of this Programm, makes my work alot more enjoyable.

So i tried to insert a PDF preview of the curent file from the libary that im editing in my form. Enterring the code in HTML works fine.

Code: Select all

<object id="pdf_obj" data="staticurl/pdftitle.pdf"></object>'
But i need to title of the curent dokument, so i create the object via JS.

Code: Select all

var pdftitle = fd.field('FileLeafRef').value();
var pdfhtml = '<object id="pdf_obj" data="libaryurl' + pdftitle + '.pdf"></object>';

document.getElementById('pdfpreview').innerHTML = pdfhtml;
This inserts the right Code, but it seems to does so after the Page is renderd. I tried several things, but i can't seem to trigger any kind of reload of the object.

Thanks in advance.

Best wishes from Germany.

Nico

User avatar
mnikitina
Posts: 264
Joined: Wed Jun 05, 2019

06 Dec 2019

Hello Nico,

Could you please clarify what is the field type of 'FileLeafRef' field?

Thank you!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests