web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / PDF preview enbedded b...
Finance forum

PDF preview enbedded based on URL

(0) ShareShare
ReportReport
Posted on by 642

Hello,

I would like to use a file preview enbedded in my form based on an URL (External document management).
For my custom form, I have a grid and when I select a record I would like to preview the PDF file linked.

Is-it possible ?

Thank you

Dona83

Categories:
I have the same question (0)
  • DONA Profile Picture
    642 on at

    In D365fo

  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    How exactly do you image the "preview"?

    If you want a static image of the first page, for instance, displaying it is trivial - it's just an image. What you would have to figure out is how to get create such an image.

    Note that it's also possible to embed PDF in HTML.

  • DONA Profile Picture
    642 on at

    Hi Martin,

    Thanks for your feedback.

    I would like a real preview of my PDF loaded from an URL.

    I'll have a grid, each record contains a field URL. When a record is selected, a preview in the form (embedded) should display the linked PDF (several pages).

    Thanks

  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    I'm sorry, but it's still not clear to me how you define a preview. Can you explain how it should look like?

  • DONA Profile Picture
    642 on at

    Hi Martin,

    A preview like in the form "DocuView" for document management when you attach a file.

    But in my case, I have only an external URL to link my PDF.

    Thanks

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    You might want to look how the DocuView form is implemented. From there you can find how to open a file and show the "preview" on the form.

  • DONA Profile Picture
    642 on at

    In my case the file is not downloaded, just an URL

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Yes I understand. So the only difference to the DocuView implementation would be that instead of showing the file from the D365FO blob storage, you want to show it from external URL.

    So by understanding how the DocuView form is implemented, and using a bit of imagination, you should be able to create your own implementation. There's also a possibility that D365FO form doesn't allow you to embed external content directly. In that case you would have to download the file to D365FO (in x++) and then show it.

    Do you think you could be able to start investigating this based on these ideas?

  • DONA Profile Picture
    642 on at

    Yes of course thank you it's a good start and it was also my initial idea.

    My goal is to get experience sharing about my topic and especially about displaying an external content.

  • DONA Profile Picture
    642 on at

    Hi Marin,


    I tried to embed in HTML but it does not work with the html viewer control.

    Is there a trick ?

    Look at my sample :
    <iframe src="http://<URL>/test.pdf" style="width:300px; height:750px;"></iframe>

    And it works if a open it from Notepad

    Thanks in advance

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans