214
Views
13
Comments
Solved
[Ultimate PDF] [ULTIMATE PDF] Display or preview the PDF before saving
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive
Service Studio Version
11.54.38 (Build 63033)
Platform Version
11.25.0 (Build 41743)

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


2023-11-22 10-51-50
Jozy Sohail

Hi Budang,

You can use the properties of ScreenToPDF_OnInitialize action

making any one attribute as true will do your work,

Hope it helps,

Thanks

UserImage.jpg
budang haba

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?

2023-07-05 10-39-50
faizan ali

Hi @budang haba ,

you can do this by setting the preview property to true in the screen to pdf oninitialize action like below.

UserImage.jpg
budang haba

It works!  but can i have the preview function without returning to my page? like a separate tab for the preview?

2021-04-12 11-47-04
Bart Nooijens

Hi Budan,

Read this topic I opened in the past.  It explains how to do that :-)

Best regards,

Bart

UserImage.jpg
budang haba

thanks for this man but can i ask where will i put the js code?

2021-04-12 11-47-04
Bart Nooijens


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,

Bart

UserImage.jpg
budang haba

Okay but i have already an client action in my print button, its an add button for the inputfields

2021-04-12 11-47-04
Bart Nooijens


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?

Best,

Bart


UserImage.jpg
budang haba

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


2021-04-12 11-47-04
Bart Nooijens


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.

UserImage.jpg
budang haba

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 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.