I use ultimate PDF for these input fields, and as the default ultimate pdf function, when i click the print it will automatically saved and downloaded. but is there a way where i can preview first the pdf before saving the pdf? thank you. I dont want to use the window.print(); because it just print the whole website. thank you
Hi Budang,
check this post,
https://www.outsystems.com/forums/discussion/87562/ultimate-pdf-is-it-possible-to-open-pdf-in-a-new-tab-instead-of-downloading-wit/
You can use the properties of ScreenToPDF_OnInitialize action
making any one attribute as true will do your work,
Hope it helps,
Thanks
This is what i'm actually looking for but can i have the preview function without returning to my page? like a separate tab for the preview?
Hi @budang haba ,
you can do this by setting the preview property to true in the screen to pdf oninitialize action like below.
It works! but can i have the preview function without returning to my page? like a separate tab for the preview?
Hi Budan,
Read this topic I opened in the past. It explains how to do that :-)
Best regards,
Bart
thanks for this man but can i ask where will i put the js code?
Hi @budang haba,
You have to place it in a Client Action that is being called when you click on the 'Print' button.
To give you an example. Below we have a Client Action 'GenerateProductSheet'. On the page we have a link and when you click the link the 'GenerateProdutSheet' is being called.
Hope this helps.
Best,
Okay but i have already an client action in my print button, its an add button for the inputfields
I am not aware of your logics and I am not sure on how to implement it in your current situation., but I guess you can just place the JavaScript inside of that client action to see if it works?
i put the client action in end of logic it actually works it opens new tab but the problem is the first tab or the main tab still be in pdf state.... same as the new tab
Then there is additional logic that is doing that, because in our logic the pdf is being generated in a seperate tab and the page is still as it was before the generation has started.
i actually follow the steps on the link you send and this forum's step. i dont really add some other logic on this print pdf function