Button for document download

Certified Senior Developer

Hi,

I want to download a QR Code (PDF document) by a button click instead of a download link.  Also, I want to print the QR code by selecting the printer. How can I achieve these two functionalities? 

Thanks

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    There currently isn't a direct way to have a button trigger a document download event.  Some people have had some success using the "use card as button" design pattern, wherein you use a CardLayout (which actually has an underlying link), though if you're trying to nest it right next to another button, I'm not sure how well this would work either. 

    One alternative possibility to consider (though this is a slight change to your design), is that the button could trigger the opening of a Document Viewer Field which shows the PDF - then the user could do what they want with it from there.  But that's about the only thing I can think of off the top of my head.

    I'm not really clear what you mean when you say "I want to print the QR code by selecting the printer".  Do you mean like having a dropdown with printer options, and choosing one of them triggers a document download?  If so, then there's also no way to do this directly, and I'd defer to my alternate suggestion above.

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Hi Mike, 

    I have a dropdown with printer options and choosing one of them should print the document. 

    How can the button trigger the opening of a preview field? Can you help me with that? 

    Thanks

  • 0
    Certified Lead Developer
    in reply to Sandhya

    Gotcha - then as I said, I defer to my alternative design suggestion.  Either a button click or a dropdown selection could trigger the appearance of a Document Viewer Field, from which the end user would presumably be able to download and/or perhaps direct-print the PDF.  AFAIK appian has no capability to directly interface with your system's printer in any way, and the only direct/supported method to download a document is either via a Download Link, or the "download" button that appears inside the Document Viewer Field pane.

Reply
  • 0
    Certified Lead Developer
    in reply to Sandhya

    Gotcha - then as I said, I defer to my alternative design suggestion.  Either a button click or a dropdown selection could trigger the appearance of a Document Viewer Field, from which the end user would presumably be able to download and/or perhaps direct-print the PDF.  AFAIK appian has no capability to directly interface with your system's printer in any way, and the only direct/supported method to download a document is either via a Download Link, or the "download" button that appears inside the Document Viewer Field pane.

Children