Simplifier Developer Home Forums Simplifier Forum PDF Viewer Widget not showing base64 encoded PDF file

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23075
    AvatarHien
    Participant
    • Topics: 2
    • Replies: 0
    • Padawan

    When trying to set the “source”-Property of the PDF Viewer Widget with

    “data:application/pdf;base64,<my-base64-encoded-pdf>” it does not show the PDF in my application.

    However using an URL like https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf works.

     

    I thought something similar to the ImageWidget (“data:img/png;base64,<my-base64-encoded-img>”) works.

     

    What am I doing wrong?

    • This topic was modified 1 month, 1 week ago by chrischris.
    #23243
    AvatarImmersion
    Participant
    • Topics: 0
    • Replies: 25
    • Jedi
    Up
    0
    Down

    Hello Hien,

     

    please be sure to use the “PDFViewer_PDFJS” instead of the regular PDFViewer from UI5 since it is somewhat buggy. The former is a custom widget developed by Simplifier and is part of our Standard Content. I’ve tested it and our custom widget accepts both base 64 strings with or without the mime type part in the beginning and displays the PDF properly.

     

    Regards,

    Armin

    #23269
    AvatarAlexandros
    Participant
    • Topics: 1
    • Replies: 2
    • Padawan
    Up
    0
    Down

    Hey @Immersion, how do you get it to work? Can you please provide an example of an application?

    #23270
    AvatarImmersion
    Participant
    • Topics: 0
    • Replies: 25
    • Jedi
    Up
    0
    Down

    Hello Alexandros,

     

    you can download an example application from here, the download link will be valid for 30 days: https://files.simplifier.io/f/4037c92a5bd44dfe8810/?dl=1 Password is “simplifier”.

     

    For the example to work properly, you need to configure a PDF template in the plugin’s administration UI. The example app uses a template named “SIMP_Digital_Form” and uses the configuration which you can look up from here: https://privatebin.simplifier.io/?85c1a81793b9076e#xJeUV9C1AZ1uEJltPJ73MDvOji2nvADAzpK/r04JTfw= (link valid for 30 days as well, password like above)

     

    Regards,

     

    Armin

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.