Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » PDF printing
PDF printing [message #667642] Sat, 30 April 2011 11:44 Go to next message
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 428
Registered: September 2009
Senior Member
Hi,
I'm unsure if this is the right place.
Please redirect me if I'm wrong.

I have an RCP application where I produce (among other things) a big PDF
file (via pdfLaTeX).
I want to add a print wizard to my app which should essentially
duplicate programmatically the print driver dialog.
I need to be able to chose (programmatically!) page range and even/odd
printing and then bypass the print driver dialog.

I had a look to PaperClips and other similar libs, but I'm unsure if
this really is the way to go.
They seem more apt to produce the pages to be passed over to the print
driver (eventually producing PDF). I have that part already done.

Ideally I would need a function saying:

boolean MyPrint(String printerName, String fileNameDotPDF, int
startPage, int endPage, int printAllEvenOdd, boolean reverseOrder);

I also googled for command-line programs that can fit the bill, but I
only found the pricey pdfprint
(http://www.verypdf.com/pdfprint/pdf-print-cmd.html); no OpenSource
alternative.

Can someone help me, please
TiA
Mauro
Re: PDF printing [message #667663 is a reply to message #667642] Sat, 30 April 2011 18:59 Go to previous messageGo to next message
Marco Maccaferri is currently offline Marco MaccaferriFriend
Messages: 147
Registered: July 2009
Senior Member
On 30/04/2011 13:44 Mauro Condarelli ha scritto:

> I also googled for command-line programs that can fit the bill, but I
> only found the pricey pdfprint
> (http://www.verypdf.com/pdfprint/pdf-print-cmd.html); no OpenSource
> alternative.

To print pdf documents I'm using Pdf-renderer
http://java.net/projects/pdf-renderer/

With Windows the results are almost perfect, at least with a text-only
document.


Regards,
Marco.
Re: PDF printing [message #668004 is a reply to message #667663] Tue, 03 May 2011 10:54 Go to previous message
Lakshmi P ShanmugamFriend
Messages: 279
Registered: July 2009
Location: India
Senior Member
Hi,

You can print to a printer using the methods in the org.eclipse.swt.printing.Printer class. You can set the file name and the page range in the PrinterData.
See example snippets here --> http://eclipse.org/swt/snippets/#printing


Lakshmi P Shanmugam
Previous Topic:workaround: display SWT popupmenu over Swing components on GTK
Next Topic:Catastrophic crash using new Print()
Goto Forum:
  


Current Time: Fri Mar 29 04:44:05 GMT 2024

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

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

Back to the top