Displaying highlighting in a pdf

I’m using solr to search through pdfs, and I need to highlight the matching terms directly on the pdf. The issue I’m running into is I need to either use open parameters or an XML document with the highlighting details, but I don’t see how to pass either of these to vaadin.

For reference, details on the xml doc and open parameters are here: https://svn.apache.org/repos/asf/pdfbox/site/userguide/highlighting.pdf?p=900000

This is the code I have to display the pdf:

private void displayPdf(byte[] toDisplay, String fileName) {
		StreamResource r = new StreamResource(new StreamSource() {
			@Override
			public InputStream getStream() {
				return new ByteArrayInputStream(toDisplay);
			}
		}, fileName);
		r.setCacheTime(0);
		r.setMIMEType("application/pdf");
		BrowserFrame pdfFrameContent = new BrowserFrame(null, r);
		secondSection.replaceComponent(currentComponent, pdfFrameContent);
		pdfFrameContent.setWidth("865px");
		pdfFrameContent.setHeight("525px");
		currentComponent = pdfFrameContent;
	}

Well, I managed to get it to work by recreating the bytestream with pdfBox, but it doesn’t display highlighting in chrome or firefox- only IE.

I’m guessing that might be because Chrome and Firefox have built-in PDF viewers in the browser while in IE you probably have the Adobe Acrobat plugin.