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 = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
               PDFFile pdfFile = new PDFFile(bb); 
               }


Then somehow print it out using PrintDialog

PrintDialog printDialog = new PrintDialog(Display.getCurrent().getActiveShell(), SWT.NONE);
              printDialog.setText("Print");
              PrinterData printerData = printDialog.open(Method pdfFile);


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


Current Time: Sat Dec 20 10:32:28 GMT 2014

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

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