You are viewing limited content. For full access, please sign in.

Question

Question

Document from Laserfiche is not displayed in iFrame

asked on November 6, 2018

In our Document Verification page, users normally enter the document number and the corresponding document gets displayed in the iFrame window. But currently, users are not able to view the document but instead, they are prompted to download the file.

 

We need documents (PDF and MS Word) to be displayed within iFrame only instead of a file download.

 

0 0

Replies

replied on November 6, 2018 Show version history

In Addition of what Shireesh Agrawal  post:

 

if you put in the website "https://www.dmcc.ae/free-zone/support/verify-a-document "  the document number:XXX, the pdf file will be embedded in the iframe but if you put the document number:XXXX, the PDF file will be downloaded and not embedded.

In the console we trace that the URL for :

the first document number is:

https://docs.dmcc.ae/SFLFPORTAL/DocView.aspx?dbid=0&id=2729X

 

and the second document number is:

https://docs.dmcc.ae/SFLFPORTAL/DocView.aspx?dbid=0&id=1431X

 

NB: This link are related to weblink

 

Administrator edit: actual document IDs were removed as they were exposing personal identifying information.

0 0
replied on November 6, 2018

I think your problem is that the mime type is not set on the second document, so WebLink is not able to pass that information on to the browser.  You want the mime types of your pdfs to be "application/pdf".

0 0
replied on November 8, 2018

Thanks for your respond.

We have the above issue last week onwards. we did not face such an issue before.

We are using IFRAME to display such a dynamic documents (PDF / MS Word)  received from Laserfiche document.

& don't have mime type setting in IFRAME Properties. please suggest.

 

  var elmIfr = document.createElement("IFRAME");
                elmIfr.src =DocUrl;//DocUrl;
                console.log('iFrame DocUrl=>'+DocUrl);
                console.log('iFrame elmIfr.src=>'+elmIfr.src);
                elmIfr.style.width= "100%";
                elmIfr.style.height= "750px";
                removeChild();
                document.getElementById('PreviewDiv').appendChild(elmIfr);

 

0 0
replied on November 8, 2018

The mime type is a property of the document within Laserfiche, and it seems to be missing for the document.  This is normally set on import, so I can't guess what went wrong without knowing how these documents are created.

0 0
replied on November 9, 2018

Dear,

Those documents are imported to laserfiche through workflow using SDK Script.

Please let us know how we can add this mime type to the document while importing.

0 0
replied on November 9, 2018

DocumentInfo has a MimeType property.

0 0
replied on November 12, 2018

What about the old documents? How we can assign this mime type to all documents in order to be able to open them in the ifram

0 0
replied on November 12, 2018

Do you know which ones are wrong?  You could write a new workflow and run it on them.  If not, you could write a new workflow and run it on all pdf documents.

0 0
replied on November 12, 2018

what about the word documents,, images and the text file. what should be the mime type in order to be embedded in the iframe? 

0 0
replied on November 12, 2018

https://blogs.msdn.microsoft.com/vsofficedeveloper/2008/05/08/office-2007-file-format-mime-types-for-http-content-streaming-2/

Mime types only apply to electronic files, if Web Access returns an image document it will handle the mime type itself.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.