How is your experience with the OutSystems Community?
18
Views
6
Comments
Solved
Open PDF document in new screen when clicked on button
Question

I would appreciate any guidance on how to open or display a PDF document in a new screen when a button is clicked. Are there recommended approaches or best practices for implementing this?

2023-09-06 07-26-35
Sudip Pal
Solution

You can use the below OML as well. Thanks

PDfOpen.oml
2025-06-19 10-02-53
Ayushi Kumari

This solution worked well for me. 

Thank you for sharing it.


Thanks
Ayushi

2018-12-10 12-16-21
Goncalo Duarte Almeida
Solution

Hello @Ayushi Kumari 

On the Button properties, under Attributes, add a new attribute with: 

  • Name: target 
  • Value: "_blank"

This will cause the link to open in a new tab and should resolve the issue.



2025-06-19 10-02-53
Ayushi Kumari

Hi @Goncalo Duarte Almeida

Thank you for your reply. 
I truly appreciate your guidance—it was very helpful

Thanks
Ayushi

2023-09-06 07-26-35
Sudip Pal

Hi @Ayushi Kumari 

You can have a look on the below approach that was provided by our MVPs.
Open document in new tab instead of downloading | OutSystems


If you need sample OML then let me know.

Thanks,

Sudip 

2025-06-19 10-02-53
Ayushi Kumari

Hi @Sudip Pal

Thank you for your response.
I found it to be very helpful

Thanks
Ayushi

2023-09-06 07-26-35
Sudip Pal
Solution

You can use the below OML as well. Thanks

PDfOpen.oml
2025-06-19 10-02-53
Ayushi Kumari

This solution worked well for me. 

Thank you for sharing it.


Thanks
Ayushi

2018-12-10 12-16-21
Goncalo Duarte Almeida
Solution

Hello @Ayushi Kumari 

On the Button properties, under Attributes, add a new attribute with: 

  • Name: target 
  • Value: "_blank"

This will cause the link to open in a new tab and should resolve the issue.



2025-06-19 10-02-53
Ayushi Kumari

Hi @Goncalo Duarte Almeida

Thank you for your reply. 
I truly appreciate your guidance—it was very helpful

Thanks
Ayushi

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