Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hide/disable pdf toolbar in html control

Former Member
0 Likes
1,574

Hi all, i have to make a report to view a pdf  using CL_GUI_PDFVIEWER or CL_GUI_HTML_VIEWER.

i have success using both of them, but there is the problem that i want to hide toolbars for preventing  the user to print and save the document viewed.

There is some way to disable / hide  this pdf toolbars?

thanks in advance.

Hi all, i have to make a report to view a pdf  using CL_GUI_PDFVIEWER or CL_GUI_HTML_VIEWER.

i have success using both of them, but there is the problem that i want to hide toolbars for preventing  the user to print and save the document viewed.

There is some way to disable / hide  this pdf toolbars?

thanks in advance.

2 REPLIES 2
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,092

In cl_gui_pdfviewer, did you check the method create_toolbar  which has  a parameter view_buttons ?

 

CALL METHOD my_pdf_viewer->create_toolbar

EXPORTING

tool_buttons = 'X'

view_buttons = view_buttons_active

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

OTHERS = 3.

The code snippet was taken from this document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d8bb0975-0e01-0010-2192-bd1fffd80...

Read only

Former Member
0 Likes
1,092

Yes, i had seen this code, but this part of code does nothing ?¿.

if i change tool_buttons to '' or 'X' and view_buttons_active to 'X' or '' is the same view.

nothing change .i have try to disable this part of code and nothing change.

this code begings with

*create SAP toolbar for PDF Viewer

then i think is a sap toolbar not pdf toolbar. then doesn't affect to save and print buttons.

thanks for your answer. still searching.

pd.:

I have debugged  call method my_pdf_viewer->create_toolbar

and the first thing this method does is  :

check me->html_viewer is initial.

and then exit method.