Using Embedded with PDF - does not display initially

Hello,

I am trying to use the Embedded widget to display a PDF file. I have found that when the window is displayed, it is completely blank. If I resize it, I see a little of the PDF file. I have to resize it several times in order for the PDF file to be displayed completely. What do I need to do so that the PDF file is displayed correctly as soon as this window opens?

Here’s my code:

    	URL url = null;
		try {
			url = new URL("http://www.irs.gov/pub/irs-pdf/fw4.pdf");
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
    	Embedded browser = new Embedded("", new ExternalResource(url));
    	browser.setType(Embedded.TYPE_BROWSER);
    	browser.setWidth(100, Sizeable.UNITS_PERCENTAGE);
		Window window = new Window();
		window.setWidth("90%");
		window.setHeight("90%");
		window.setModal(true);
		window.addComponent(browser);

    	TPTApplication.getCurrentApplication().getMainWindow().addWindow(window);

Thanks in advance,
David

Any help with this? It shouldn’t require the user to resize it several times, right? Is there some technique you need to force the file to be completely loaded before opening the view?

thanks,
David