Hi All,
I am using Ultimatepdf forge component ,where i want to download a pdf file when preview is True.
any help is greatly appreciated.
Thanks
Hi Uday,
Please refer to the oml i have attached you just have to remove the error message shown in the preview (New) screen
or you can create a preview screen without using the ultimate pdf layout else it is working fine.
Thanks and regards,
Faizan.
Hi @UdayKumar Bushati
You can save the page as pdf by pressing "ctrl + p" to open the printer page and save it as Microsoft Print to PDF.
However the layout will most likely not be the exact same as the preview since it is now trying to fit everything correctly on a page.
Hope this helps!
Hi UdayKumar,
I think the only way to generate a pdf while preview is on true is to look for that functionality in the browser or windows itself.
maybe something along the line with a screenshot which you can convert afterwards to pdf? (see link)
https://pdfpro.com/blog/guides/how-to-save-screenshot-as-pdf/
Hi Mika,
can I share oml file so that u can help me easily.
Hello UdayKumar,
I'm using Ultimate PDF as well in my applications so for me the oml is not needed but feel free to upload it so maybe someone else might be able to help you.
But like I said before I think the only way to download the pdf while preview is true, is to look for that functionality in the browser or windows. If I may ask why do you want to download it while it is in preview? Like it the name/variable says it is a preview (I only use this state for debugging), not sure it is the best practice to try to download it while it is in preview mode.
I am using Ultimatepdf forge component, where I want to download a pdf file when preview is True but without using java script.
Hi @UdayKumar Bushati ,
you should use the PrintToPdf advance action in ultimate pdf like below.
I have also attached the oml for reference.
hope it helps.
Hi Faizan,
Again, I am facing same issue the file is downloading but it is not opening.
Hi Uday - the same case i was following and able to solve
That's because of two reasons.
1. your binary data is corrupted.
2. please give the file name as file.pdf in the download widget.
Just to add as a solution if you want to preview the pdf and want to download the same then in the ultimate pdf there is a preview block. you can use that and preview your pdf on your screen and then you can use a download button on that preview screen and can download the same.
have you tried using the oml which i have shared because it is working fine in my system there must be an issue with the pdf reader you are using.
Thank you, Yash.
Working fine but two pages are downloading in the first page with two download buttons and second page with proper data and how to remove first page.