Adobe Acrobat Viewer

  • Follow


Hi everyone. I'm in the edge of suicide... please I need help withthis:I don't know if you have ever met this Java Bean that let's youdisplay PDF files it's the Adobe Acrobat Viewer for java that can bedownloaded here: http://www.adobe.com/products/acrviewer/acrvdnld.htmlOk? So:I'm currently developing a project witch uses the Adobe Acrobat ViewerJava Bean to display PDF Files, everything was going right but then Ireached a major obstacle that I can't overcome. To display a PDF filethe program uses this code:	public void renderFile(String FileName, int Page)	{		FileInputStream iStream;		Viewer ViewerWindow;		Viewer BaseViewer;		File PDFFile;		if(FileName == null) return;		PDFFile = new File(FileName);		if(!(PDFFile.exists())) return;		try		{			BaseViewer = new Viewer();			ViewerWindow = BaseViewer.openNewWindow();			iStream = new FileInputStream(PDFFile);			ViewerWindow.setDocumentInputStream(iStream);		}		catch(Exception ex)		{			return;		}		try		{			Page = Page - 1;			if(Page < 0 || Page > ViewerWindow.getPageCount()) Page = 0;			ViewerWindow.renderPage(Page);		}		catch(Exception ex)		{			return;		}	}Off course the procedure has messages that alert the users abouterrors but you are not interested in that right? Ok here's the problemeverything works ok until I call RenderPage, no matter what number Ipass to the function the Acorbat windows always freezes and I don'tknow why this is more or less the same procedure used in the sampleprogram that comes inside the zip.Any Ideas?Thanks in advance.
0
Reply sergio.bobillier (2) 5/22/2007 9:57:52 PM


0 Replies
255 Views

(page loaded in 0.028 seconds)

Similiar Articles:













7/25/2012 3:04:12 AM


Reply: