Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Printing A existing PDF File with SWT's PrintDialog
Printing A existing PDF File with SWT's PrintDialog [message #986553] Tue, 20 November 2012 22:07
James Teater is currently offline James TeaterFriend
Messages: 17
Registered: July 2011
Junior Member
Is it possible to print a existing PDF file using PrintDialog?
Is it possible to take a existing PDF File , create a printable file using PDFRenderer
and then print that out using SWT PrintDialog?

I mean have a method setup to do the following.
 Method () {
               File file = new File(fileURL);
               FileInputStream fis = new FileInputStream(file);
               FileChannel fc = fis.getChannel();
               ByteBuffer bb =, 0, fc.size());
               PDFFile pdfFile = new PDFFile(bb); 

Then somehow print it out using PrintDialog

PrintDialog printDialog = new PrintDialog(Display.getCurrent().getActiveShell(), SWT.NONE);
              PrinterData printerData = pdfFile);

Previous Topic:SWT/Jface Data binding for search field
Next Topic:SWT Designer throwing error
Goto Forum:

Current Time: Mon Jun 25 00:53:54 GMT 2018

Powered by FUDForum. Page generated in 0.02666 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top