• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to disable pdf toolbar buttons

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have a web service which will return pdf stream for a given document id and I will set the content type to application/pdf and write the out put to IFRAME upto this point I am done and OK!
My problem is :
My client requirement is to disable the pdf toolbar buttons except the print button in IFRAME, is there any way using JavaScript to disable all the PDF toolbar buttons?

Thanks in Advance.
Kamalakar B.
 
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the PDF plugin version supports passed in control options, you can hide all the toolbar buttons by appending #toolbar=0 to the src:


At least it works with direct links to the document. I'm assuming it will also work with a stream:



Problem is, this will hide the Print button as well. Note that the right-click menu is unaffected, so you can print and do anything else with it as well. There might be a similar control for disabling the right-click menu, or maybe you can do it with plain javascript.

Also note that there will still be a "show toolbar" button at the bottom left of the document, unless you disable the scrollbar, and the user can use it to show the toolbar again.

The only control options I'm aware of are toolbar, page, zoom, and scrollbar. You can string them together separated by ampersands: #toolbar=0&page=3&zoom=50%. I've tried searching for a comprehensive list of all available controls, but couldn't find one.

-Yuriy
[ August 02, 2005: Message edited by: Yuriy Zilbergleyt ]
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My bad, just tested it out, and for the streaming version the query parameters must go before the plugin controls:

src="getDocument?docId=456#toolbar=0" instead of src="getDocument#toolbar=0?docId=456

-Yuriy
 
Bairavarsu Kamalakar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Yuriy,

Thanks a lot It worked.

How to disable the left panel i.e. "Bookmark/Signatures/Layers/Pages"?

Thanks in Advance.

- Kamal
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I listed all the plugin commands I know of. I got the idea from http://www.schubert-it.com/pluginpdf/webdev/, which lists some commands for their custom plugin, and through testing found that some of them work with the standard Acrobat Reader plugin. Unfortunately "pagemode", which is what the site lists for bookmarks, isn't one of them. If you figure out how to disable bookmarks in the plugin, please let me know.

-Yuriy
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bairavarsu Kamalakar:
Hi Yuriy,

Thanks a lot It worked.

How to disable the left panel i.e. "Bookmark/Signatures/Layers/Pages"?

Thanks in Advance.

- Kamal



use #toolbar=0&navpanes=0

it will work.
you can get the complete list from here,
http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf


.
Hope it will help others as well!
[ September 04, 2008: Message edited by: Yesudas S Solomon ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yesudas, this post is over 3 years old. Please refrain from digging up old posts. Please read this for more information.
reply
    Bookmark Topic Watch Topic
  • New Topic