27

Situation:

  1. My RCP application uses XulRunner
  2. System has two installed PDF viewers (Acrobat, Gimp)
  3. Firefox has Gimp set as default viewer
  4. I want to make my SWT Browser composite in RCP application ignore default viewer and use Acrobat if it is installed
  5. If it is not, I want to use default viewer

Question:

  1. Can I achieve this by (temporarily) setting some XulRunner or System property in my application?
Vizllx
  • 9,135
  • 1
  • 41
  • 79
Jan Hruby
  • 1,477
  • 1
  • 13
  • 26

2 Answers2

1

You can create a Process in Java and execute the below command line to open PDFs in Adobe Acrobat Reader forever.

start "" /max "ExecutablePathAdobeAcrobat.exe" /A "pagemode=FullScreen" "PDFFilePath.pdf" 
  • thanks for answer,but this I couldn't do. I needed to display the PDF in embedded Browser composite, so starting independent process was not a possibility. This issue was found indoors, all customers use acrobat, so we did not make anything with it so far. But still, an interesting topic – Jan Hruby Oct 19 '15 at 13:43
1

Check this link : https://support.mozilla.org/en-US/kb/disable-built-pdf-viewer-and-use-another-viewer

I am pretty sure there should be a way to codefully disable the gimp or whatever built-in app the firefox uses. you might need to use some APIs that modify preferences in Firefox

SomeDude
  • 13,876
  • 5
  • 21
  • 44