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

Re: PDF VIEWER

0 Likes
1,299

Hi,

i am viewing the pdf document using below method.

 

my_pdf_viewer->create_toolbar

my requirement is i want disable the save the print and save button appear in PDF file .

Kindly help to solve .

Regards,

Dhandayuthabani.P

Hi,

i am viewing the pdf document using below method.

 

my_pdf_viewer->create_toolbar

my requirement is i want disable the save the print and save button appear in PDF file .

Kindly help to solve .

Regards,

Dhandayuthabani.P

7 REPLIES 7
Read only

Former Member
0 Likes
1,156

Hi Dhandayuthabani,

Have a look in this link http://scn.sap.com/thread/2096604.

Hope it will be helpful for you

Regards,

Prasanna

Read only

0 Likes
1,156

still i getting same ..

kindly help..

Read only

0 Likes
1,156

still i getting same ..

kindly help..

Read only

0 Likes
1,156

Hi,

Can you explain your requirement ??

Regards,

Prasanna

Read only

0 Likes
1,156

create object my_pdf_viewer

       exporting

         parent              = my_main_container

       exceptions

         cntl_error          = 1

         cntl_system_error   = 2

         others              = 3.

       if sy-subrc <> 0.

         "could not create PDF Viewer

       endif.

     endif.

     data: view_buttons_active type char01.

     if my_pdf_viewer->acrobat_vs_reader = ''.

       view_buttons_active = 'X'.

     endif.

    " ---------

     "--------------------------

     " create SAP toolbar for PDF Viewer

     call method my_pdf_viewer->create_toolbar

       exporting

         tool_buttons      = 'X'

         view_buttons      = view_buttons_active

         document_save     = 'X'

         document_print    = 'X'

       exceptions

         cntl_error        = 1

         cntl_system_error = 2

         others            = 3.

     if sy-subrc <> 0.

       "could not create toolbar

     endif.

     create object l_event_receiver.

*    set handler l_event_receiver->on_document_saved for my_pdf_viewer.

     set handler l_event_receiver->on_viewing_finished for my_pdf_viewer.

DATA:URL TYPE CHAR255.

URL = 'ftp://10.100.2.165/ZMANUAL/ZMANUAL PDF/Zmanual_index.pdf'.

CONDENSE URL.

     if not my_pdf_viewer->html_viewer is initial.

       call method my_pdf_viewer->open_document

         exporting

           "url = 'http://p34198/iissamples/default/ReadMe.pdf'.

           "url = 'C:\Documents and Settings\Sakthi\Desktop\sapnote_0001080997.pdf'.       "'C:\tmp\Reader.pdf'.

           "url = '/sapmnt/SFD/PDF/SMSY.pdf'.%20

*                url = 'ftp://10.100.3.165/SAP-MANUALS/SAPMANUALINDEX.pdf'.

*                url = 'ftp://10.100.2.165/ZMANUAL/ZMANUAL PDF/ZManual Index.pdf'."above code commented and inserted by deva req by mr.suresh on 04.12.2010

                 url = URL."'ftp://10.100.2.165/ZMANUAL/ZMANUAL PDF/Zmanual_index.pdf'."above code commented and inserted by deva req by mr.suresh on 04.12.2010

     endif.

Read only

0 Likes
1,156

create object my_pdf_viewer

       exporting

         parent              = my_main_container

       exceptions

         cntl_error          = 1

         cntl_system_error   = 2

         others              = 3.

       if sy-subrc <> 0.

         "could not create PDF Viewer

       endif.

     endif.

     data: view_buttons_active type char01.

     if my_pdf_viewer->acrobat_vs_reader = ''.

       view_buttons_active = 'X'.

     endif.

    " ---------

     "--------------------------

     " create SAP toolbar for PDF Viewer

     call method my_pdf_viewer->create_toolbar

       exporting

         tool_buttons      = 'X'

         view_buttons      = view_buttons_active

         document_save     = 'X'

         document_print    = 'X'

       exceptions

         cntl_error        = 1

         cntl_system_error = 2

         others            = 3.

     if sy-subrc <> 0.

       "could not create toolbar

     endif.

     create object l_event_receiver.

*    set handler l_event_receiver->on_document_saved for my_pdf_viewer.

     set handler l_event_receiver->on_viewing_finished for my_pdf_viewer.

DATA:URL TYPE CHAR255.

URL = 'ftp://10.100.2.165/ZMANUAL/ZMANUAL PDF/Zmanual_index.pdf'.

CONDENSE URL.

     if not my_pdf_viewer->html_viewer is initial.

       call method my_pdf_viewer->open_document

         exporting

           "url = 'http://p34198/iissamples/default/ReadMe.pdf'.

           "url = 'C:\Documents and Settings\Sakthi\Desktop\sapnote_0001080997.pdf'.       "'C:\tmp\Reader.pdf'.

           "url = '/sapmnt/SFD/PDF/SMSY.pdf'.%20

*                url = 'ftp://10.100.3.165/SAP-MANUALS/SAPMANUALINDEX.pdf'.

*                url = 'ftp://10.100.2.165/ZMANUAL/ZMANUAL PDF/ZManual Index.pdf'."above code commented and inserted by deva req by mr.suresh on 04.12.2010

                 url = URL."'ftp://10.100.2.165/ZMANUAL/ZMANUAL PDF/Zmanual_index.pdf'."above code commented and inserted by deva req by mr.suresh on 04.12.2010

     endif.

Read only

0 Likes
1,156

Hi,

Through the below coding i am viewing the PDF document from FTP .But in PDF i want  disable the save and print option.Kindly help.

create object my_pdf_viewer

       exporting

         parent              = my_main_container

       exceptions

         cntl_error          = 1

         cntl_system_error   = 2

         others              = 3.

       if sy-subrc <> 0.

         "could not create PDF Viewer

       endif.

if my_pdf_viewer->acrobat_vs_reader = ''.

       view_buttons_active = 'X'.

     endif.

call method my_pdf_viewer->create_toolbar

       exporting

         tool_buttons      = 'X'

         view_buttons      = view_buttons_active

         document_save     = 'X'

         document_print    = 'X'

       exceptions

         cntl_error        = 1

         cntl_system_error = 2

        others            = 3.

create object l_event_receiver.

*    set handler l_event_receiver->on_document_saved for my_pdf_viewer.

     set handler l_event_receiver->on_viewing_finished for my_pdf_viewer.

URL = 'ftp://10.100.2.165/ZMANUAL/ZMANUAL PDF/Zmanual_index.pdf'.

CONDENSE URL.

     if not my_pdf_viewer->html_viewer is initial.

       call method my_pdf_viewer->open_document

         exporting

url = URL

endif