This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

How can I download pdf file by clicking button ?

Comments

2 comments

  • Avatar
    Shirly Manor

    Hi,
    You can try do something like:


    <div
    onClick="window.location=pdf.php">something</div>

    pdf.php:

    <?php header('Content-disposition: attachment; filename=cl_image_tag("qpr2ddsqxyw0foujcttw.pdf"'); header('Content-type: application/pdf'); readfile('path/to/your_file.pdf');


    Or you can do something like:

    <a href="https://res.cloudinary.com/demo/image/upload/fl_attachment/multi_page_pdf_1.pdf">Test</a>

    0
    Comment actions Permalink
  • Avatar
    Michael Jonazh

    Thx Shirly, 

    Its solved, Thanks you for your help. 

    0
    Comment actions Permalink

Post is closed for comments.