reteptools-pdf2 Mailing List for retep
Status: Beta
Brought to you by:
petermount
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(1) |
Jun
(5) |
Jul
(6) |
Aug
(5) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
From: Peter M. <pet...@gm...> - 2005-12-25 10:23:30
|
Sorry for the delay, I've been snowed under with work this month, and are only now catching up :( On 01/12/05, Harp, George <GH...@ga...> wrote: > > > > I have tried the above for DocFlavor.INPUT_STREAM.PDF and cannot get Rete= pPDF-II when i tried > > DocFlavor.INPUT_STREAM.TEXT_PLAIN_US_ASCII I got a prompt to save a file.= What docFlavor do I use? > > And IS the source available so I can generate JavaDocs? > > Ok, two things here, retep pdf can only generate PDF, so INPUT_STREAM.PDF wouldn't work. As for INPUT_STREAM.TEXT_PLAIN_US_ASCII, it's prompting for a file as it's not been told where to send the resulting PDF. You can set the destination using a javax.print.attribute.standard.Destination attribute to define a UR= I of where to send it. As for the source, it's on sourceforge, or I can send you a slightly more recent version. Peter -- Peter Mount pe...@re..., pet...@gm... http://retep.org XMPP Jabber: pe...@ca... GoogleTalk: pet...@gm... MS Messenger: ret...@ho... |
From: Harp, G. <GH...@GA...> - 2005-12-01 00:51:46
|
From a previous post I found: >Sky...@lo... wrote: >>=20 >> Does anyone have an example of how to print PDFs using retep PDF 2 >> (preferably with the newer java print services)? Any code that could get >> me going in the right direction would be appreciated. I"ve looked through >> the documentation provided on Peter"s site, but I"m new to printing in java >> so it wasn"t all that helpful. >My apologies for that, I"ve been trying to find some spare time to write=20 >more documentation for ages :-( >In theory, any example for using Print Services should work fine. >The Java Print Service user guide on Sun"s site is probably your best=20 >starting point: >http://java.sun.com/j2se/1.4.2/docs/guide/jps/index.html >As for getting Retep PDF-II installed as a print service, it should be=20 >recognised automatically as soon as you put the jar file in the class path. >The PrinterMakeAndModel for it is "RetepPDF-II" if you want to pick it=20 >up by name. >Peter >--=20 >Peter Mount >pe...@re... >http://retep.org/ >http://retep.net/ > Tel: +44 (0) 1622 749439 > Fax: +44 (0) 8701 361620 >Mobile: +44 (0) 7838 191423 >IM-MSN: ret...@ho... =20 I have tried the above for DocFlavor.INPUT_STREAM.PDF and cannot get RetepPDF-II when i tried=20 DocFlavor.INPUT_STREAM.TEXT_PLAIN_US_ASCII I got a prompt to save a file. What docFlavor do I use? And IS the source available so I can generate JavaDocs? |
From: Patrick O. T. <pth...@sf...> - 2005-03-29 20:52:24
|
Hello all, I have used the retep libs in the past. I now want to upgrade my old PDF stuff to the new version. I can not find any examples of reading text files and outputting PDF files. Where can I find some Java code using these PDF classes. Pat Thurman DBA SFASU pth...@sf... |
From: Peter M. <pet...@gm...> - 2005-03-03 08:42:21
|
On Wed, 2 Mar 2005 01:32:47 -0800, Pravir Ramtekkar <pr...@gm...> wrote: > Hi, > I am trying to use PDF class in the following manner. > > PrintJob job = PDF.getPrintJob(fileoutputStream); > > pass this job to whereever I want to use - basically another > thirdparty whihc takes a java.awt.printjob to print itself. > > But I get exception : > NullPointerException : > PDFJob.getPageDimension() (PDFJob.java:114) This would occur if getPageDimension() is called before a page have been created. To me this looks like a bug in the thirdparty app, because the page dimensions wouldn't be known until the page exists, and this is the first instance of this problem in the 7 years retepPDF has been in existence. getPageDimension() may work for normal printers where the media is fixed, but in PDF, the media is only defined once it's created. > I tried using > PrintJob job = new PDFJob(fileoutputStream); > > which I believe is the same thing as above. Yes, PDF.getPrintJob() does exactly that. > I don't want to use PrinterJob as I don't have access to the > Pageable/Printables. > > This is kind of urgent so please reply...Also anytips using are welcome. > btw, I am using Inetsoft Stylesheet where I pass the above printJob. > > thanks in adavance! -- Peter Mount pe...@re..., pet...@gm... http://retep.org |
From: Pravir R. <pr...@gm...> - 2005-03-02 09:32:52
|
Hi, I am trying to use PDF class in the following manner. PrintJob job = PDF.getPrintJob(fileoutputStream); pass this job to whereever I want to use - basically another thirdparty whihc takes a java.awt.printjob to print itself. But I get exception : NullPointerException : PDFJob.getPageDimension() (PDFJob.java:114) I tried using PrintJob job = new PDFJob(fileoutputStream); which I believe is the same thing as above. I don't want to use PrinterJob as I don't have access to the Pageable/Printables. This is kind of urgent so please reply...Also anytips using are welcome. btw, I am using Inetsoft Stylesheet where I pass the above printJob. thanks in adavance! |
From: Matt H. <ma...@ma...> - 2004-12-19 15:18:43
|
Hey, Peter and crew. I'm working on a time-crunch invoice app, and found your PDF generation tools to be just what I needed. Problem is, they're not working. This is the code I am using to generate the print job: public int GeneratePDF() { PrinterJob prJ = PDF.getPrinterJob(); if (prJ.printDialog()) { try { PageFormat fmt = prJ.defaultPage(); prJ.setPrintable(this ,fmt); prJ.print(); } catch (Exception ex) { ex.printStackTrace(); } } return 0; } I'm trying to simply print out the Swing form I am working with, as it appears on screen. When I run this, i get the following in the Netbeans output console: PF in printPage: java.awt.print.PageFormat=[height="842.0",orientation="1",width="595.0",matrix="[D@d5c0f9",imageableX="0.0",imageableY="0.0",imageableHeight="842.0",imageableWidth="595.0",paper="java.awt.print.Paper@1701bdc"] PF in printPage: java.awt.print.PageFormat=[height="842.0",orientation="1",width="595.0",matrix="[D@633d51",imageableX="0.0",imageableY="0.0",imageableHeight="842.0",imageableWidth="595.0",paper="java.awt.print.Paper@14eaec9"] PF in printPage: java.awt.print.PageFormat=[height="842.0",orientation="1",width="595.0",matrix="[D@b533b8",imageableX="0.0",imageableY="0.0",imageableHeight="842.0",imageableWidth="595.0",paper="java.awt.print.Paper@569c60"] Then, when I try to open the PDF, I get a 2 page blank document and this error box (Opening with Adobe Reader 6.01): An unrecognized token " was found. For reference, I have placed the generated PDF at www.rollplaygames.com/temp/retep.pdf. Please help! |
From: Peter M. <pe...@re...> - 2004-09-11 09:26:14
|
Howard, Jeffery wrote: >Hi, > >I've been attempting to use retep-pdf (v2.4.1) as a print service under Java 1.4.2 and I've run into a bit of a problem. >For what I'm doing with this program I need to be able to represent a hierarchy of objects (using a JTree in the GUI). I've extended the JTree to make it printable and it prints beautifully to a real printer so I'm confident that my code is correct. >Things turn sour very quickly as soon as I try to use retep-pdf to generate a PDF of the report. I get a NullPointerException from retep-pdf. I've included the stack trace below. > > [snip] >java.lang.NullPointerException > at java.io.Reader.<init>(Reader.java:61) > at java.io.InputStreamReader.<init>(InputStreamReader.java:55) > at uk.org.retep.pdf.util.afm.AFM.<init>(AFM.java:92) > at uk.org.retep.pdf.util.afm.BaseMetrics.getFont(BaseMetrics.java:100) > at uk.org.retep.pdf.core.GraphicsImpl.getFontMetrics(GraphicsImpl.java:999) > at uk.org.retep.pdf.core.GraphicsImpl.getFontMetrics(GraphicsImpl.java:983) > > Ok, this one appears once every so often, and it's caused by the font name being passed from Swing not being recognised. The BaseMetric's class is used to load in the font metrics for the base fonts that are guaranteed to exist in a PDF viewer (we can't use awt's font metrics for several reasons, mainly because the values differ on each platform java runs on). Can you tell me which font's you are using within your GUI? What I've done in the past is add the differing font names into a map and associate it with the appropriate base font. Peter |
From: Howard, J. <Jef...@wi...> - 2004-09-09 03:23:34
|
Hi, I've been attempting to use retep-pdf (v2.4.1) as a print service under = Java 1.4.2 and I've run into a bit of a problem. For what I'm doing with this program I need to be able to represent a = hierarchy of objects (using a JTree in the GUI). I've extended the = JTree to make it printable and it prints beautifully to a real printer = so I'm confident that my code is correct.=20 Things turn sour very quickly as soon as I try to use retep-pdf to = generate a PDF of the report. I get a NullPointerException from = retep-pdf. I've included the stack trace below. This may or may not be relevant, but the JTree I'm using is rather = heavily modified so that the leaves of the tree are actually JPanels = containing a number of other SWING components (JLabels, Icons, progress = bars, and a dynamic spacer) instead of the simple JLabels used by = default in the JTree. Here's the code snippet that launches the print action: PrintRequestAttributeSet pras =3D new = HashPrintRequestAttributeSet(); DocFlavor flavor =3D DocFlavor.SERVICE_FORMATTED.PRINTABLE; PrintService[] ps =3D = PrintServiceLookup.lookupPrintServices(flavor, pras); PrintService dps =3D = PrintServiceLookup.lookupDefaultPrintService(); PrintService svc =3D ServiceUI.printDialog(null, 200, 200, = ps, dps, flavor, pras); if (svc!=3D null){ DocPrintJob job =3D svc.createPrintJob(); DocAttributeSet das =3D new HashDocAttributeSet(); Doc doc =3D new SimpleDoc(this,flavor,das); =20 try{ job.print(doc,pras); }catch (PrintException pe){ System.out.println("Exception while printing: = "+pe.getMessage()); pe.printStackTrace(); } } Any help would be greatly appreciated :-) Thanks! Jeff Howard Oh yeah... Here's the stack trace mentioned above: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:55) at uk.org.retep.pdf.util.afm.AFM.<init>(AFM.java:92) at = uk.org.retep.pdf.util.afm.BaseMetrics.getFont(BaseMetrics.java:100) at = uk.org.retep.pdf.core.GraphicsImpl.getFontMetrics(GraphicsImpl.java:999) at = uk.org.retep.pdf.core.GraphicsImpl.getFontMetrics(GraphicsImpl.java:983) at = javax.swing.plaf.basic.BasicLabelUI.paint(BasicLabelUI.java:137) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142) at javax.swing.JComponent.paintComponent(JComponent.java:541) at javax.swing.JComponent.paint(JComponent.java:808) at javax.swing.JComponent.paintChildren(JComponent.java:647) at javax.swing.JComponent.paint(JComponent.java:817) at = javax.swing.CellRendererPane.paintComponent(CellRendererPane.java:134) at = javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1380) at = javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1171) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142) at javax.swing.JComponent.paintComponent(JComponent.java:541) at javax.swing.JComponent.paint(JComponent.java:808) at com.wiltel.swing.PrintableJTree.print(PrintableJTree.java:64) at = uk.org.retep.pdf.print.service.PrintUtils.printPage(PrintUtils.java:313) at = uk.org.retep.pdf.print.service.PrintUtils.print(PrintUtils.java:365) at = uk.org.retep.pdf.print.service.PDFServiceJob.printImpl(PDFServiceJob.java= :186) at = uk.org.retep.pdf.print.service.PDFServiceJob.print(PDFServiceJob.java:154= ) at = com.wiltel.swing.PrintableJTree.TreeChassisMouseClicked(PrintableJTree.ja= va:126) at = com.wiltel.swing.PrintableJTree$2.mouseClicked(PrintableJTree.java:89) at = java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212) at = java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:211) at java.awt.Component.processMouseEvent(Component.java:5103) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at = java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at = java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207) at = java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at = java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread= java:201) at = java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.j= ava:151) at = java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at = java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at = java.awt.EventDispatchThread.run(EventDispatchThread.java:100) |
From: Giovanni M. <gme...@th...> - 2004-08-31 15:36:32
|
Devo creare un file pdf tramite reteptools-pdf2. Ho problemi ad = inserire del testo nel documento. Qual =E8 la soluzione migliore per = inserire testo formattato nel documento pdf? Grazie... |
From: Peter M. <pe...@re...> - 2004-08-14 12:36:42
|
Maximiliano Perez wrote: > I have an application using RetepPDF to generate PDF files, running in a > Jakarta-Tomcat 5.0.25 on RedHat Linux 9, with JDK 1.4.2. > It works fine, both using the local X server or (as I have jdk 1.4) with > the -Djava.awt.headless=true option enabled, but I have a little > problem: some extended characters needed in spanish, such as N with > tilde and accents, are not generated correctly.Insted I consistently get > two characters, an uppercase A with a tilde and some other strange char. > Other applications running in this X server display the spanish > characters correctly, so it seems to be a Java related problem, but any > suggestion on where to look for the problem will be appreciated. > Thanks! Can you send me a pdf showing this problem. It may be that the spanish character is not being translated correctly, and by the sounds of it, you are seeing it's unicode representation being split into two characters. Peter |
From: Maximiliano P. <mp...@in...> - 2004-08-11 18:32:55
|
I have an application using RetepPDF to generate PDF files, running in a Jakarta-Tomcat 5.0.25 on RedHat Linux 9, with JDK 1.4.2. It works fine, both using the local X server or (as I have jdk 1.4) with the -Djava.awt.headless=true option enabled, but I have a little problem: some extended characters needed in spanish, such as N with tilde and accents, are not generated correctly.Insted I consistently get two characters, an uppercase A with a tilde and some other strange char. Other applications running in this X server display the spanish characters correctly, so it seems to be a Java related problem, but any suggestion on where to look for the problem will be appreciated. Thanks! |
From: Peter M. <pe...@re...> - 2004-08-09 21:58:21
|
Sorry for the late reply. I started a new day job recently, and I've hardly been home since :-( Egon Reetz wrote: > I'm searching for a way to align text right justified (e.g. digits). > Is there a way to position text and writing from right to left or do I > have to use the AFM class to calculate the length for a particular > string with a specified font and font size? There's two ways. If using Java2D, then use FontMetric as you would normally, and calculate the text length. RetepPDF will automatically use the AFM class to calculate the correct sizes (PDF font's are slightly different from Java fonts - mainly due to Java using the systems fonts). The other is to use the AFM classes directly. You can use the source for GraphicsImpl to find out how. Peter |
From: Egon R. <e....@ha...> - 2004-08-03 15:01:49
|
I'm searching for a way to align text right justified (e.g. digits). Is there a way to position text and writing from right to left or do I have to use the AFM class to calculate the length for a particular string with a specified font and font size? Thanks in advance Egon |
From: Peter M. <pe...@re...> - 2004-07-21 08:41:29
|
Paul wrote: > Trying to make use of the retep code using the Java printer services. >=20 > Anyone have any snippets that make use of=20 > DocFlavor.SERVICE_FORMATTED.PRINTABLE =96 I am particularly interested = in=20 > the print() method of a Printable that draws a large image(2k+ x 1k+) t= o=20 > the graphics context. Something like this would do it: public class TestPrt implements Printable { public int print(java.awt.Graphics graphics,=20 java.awt.print.PageFormat pageFormat, int pageIndex) throws=20 java.awt.print.PrinterException { return NO_SUCH_PAGE; } /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { PrintService services[] =3D=20 PrintServiceLookup.lookupPrintServices(null, null); PrintService sve =3D null; for(int i=3D0;i<services.length;i++) { if(services[i].getName().startsWith("Retep PDF")) { System.err.println("Whoho "+i); sve =3D services[i]; } } DocPrintJob dpj =3D sve.createPrintJob(); Printable myPrintable =3D new TestPrt(); Doc doc =3D new=20 SimpleDoc(myPrintable,DocFlavor.SERVICE_FORMATTED.PRINTABLE,null); PrintRequestAttributeSet attrs =3D new HashPrintRequestAttributeSe= t(); attrs.add( new Destination( new URI("file:/home/peter/output.pdf") ) ); attrs.add(OrientationRequested.LANDSCAPE); attrs.add(MediaSizeName.ISO_A3); dpj.print(doc,attrs); } } Just implement the print() method as you would normally for printing. Peter --=20 Peter Mount pe...@re... http://retep.org/ http://retep.net/ Tel: +44 (0) 1622 749439 Fax: +44 (0) 8701 361620 Mobile: +44 (0) 7838 191423 IM-MSN: ret...@ho... |
From: Paul <pa...@on...> - 2004-07-20 22:39:34
|
Trying to make use of the retep code using the Java printer services. =20 Anyone have any snippets that make use of DocFlavor.SERVICE_FORMATTED.PRINTABLE =96 I am particularly interested = in the print() method of a Printable that draws a large image(2k+ x 1k+) to the graphics context. =20 =20 Thanks, =20 Paul Miner Neostar Inc. =20 =20 Antimatter as fuel In antimatter-matter collisions, the entire possible mass <http://en.wikipedia.org/wiki/Mass> of the particles is converted to energy <http://en.wikipedia.org/wiki/Energy> . This is much greater than the chemical energy or even nuclear energy that can be converted today, using chemical reactions or nuclear fission/fusion. The reaction of 1 kg <http://en.wikipedia.org/wiki/Kilogram> of antimatter with 1 kg of matter would produce 1.8=D71017 J <http://en.wikipedia.org/wiki/Joule> = of energy (by the equation E=3Dmc2). In contrast, burning a kilogram of petrol <http://en.wikipedia.org/wiki/Petrol> produces 4.2=D7107 J, and nuclear <http://en.wikipedia.org/wiki/Nuclear_fusion> fusion of a kilogram of hydrogen would produce 2.6=D71015 J. =20 |
From: Peter M. <pe...@re...> - 2004-07-09 10:21:00
|
Caballero Caballero, Jose wrote: > Jdk 1.4 > I am trying to print the document to a printer. Ah that may be the problem. With Linux, the print system will detect that the file is a PDF and will (usually with ghostscript) parse the pdf and convert it into a form that the printer will understand. For Windows, you need to use a reader (like Adobe's Acrobat reader) to view the pdf, then print from there. If you try to send direct to the printer, windows will think it's a plain text file and you will see output like you describe. This goes for any PDF document, not just the output of Retep PDF-II. Peter > > Pepe Caballero > Ingeniero Informatica > > -----Mensaje original----- > De: Peter Mount [mailto:pe...@re...] > Enviado el: viernes, 09 de julio de 2004 11:19 > Para: Caballero Caballero, Jose > CC: ret...@li... > Asunto: Re: [Retep-PDF] (no subject) > > Caballero Caballero, Jose wrote: > >>I am trying to print a pdf file with this library. I am using >>INPUT_STREAM.AUTOSENSE as flavour and it works correctly in Linux. In >>windows it print like plain text... any idea? Have I install any driver or >>something special? thanks > > > No special drivers should be necessary, if it works on Linux, it should > work on Windows. It really depends on what exactly you are trying to do. > > Can you give me a more complete example of what you are doing? Is the > output PDF document the same, or are you trying to print the pdf > document to a printer? > > Also what JDK/JRE are you using on Windows & Linux (and the distro). It > may be something very simple. > > Thanks, Peter > -- Peter Mount pe...@re... http://retep.org/ http://retep.net/ Tel: +44 (0) 1622 749439 Fax: +44 (0) 8701 361620 Mobile: +44 (0) 7838 191423 IM-MSN: ret...@ho... |
From: Caballero C. J. <jos...@ju...> - 2004-07-09 09:30:02
|
Jdk 1.4 I am trying to print the document to a printer. Pepe Caballero Ingeniero Informatica -----Mensaje original----- De: Peter Mount [mailto:pe...@re...] Enviado el: viernes, 09 de julio de 2004 11:19 Para: Caballero Caballero, Jose CC: ret...@li... Asunto: Re: [Retep-PDF] (no subject) Caballero Caballero, Jose wrote: > I am trying to print a pdf file with this library. I am using > INPUT_STREAM.AUTOSENSE as flavour and it works correctly in Linux. In > windows it print like plain text... any idea? Have I install any driver or > something special? thanks No special drivers should be necessary, if it works on Linux, it should work on Windows. It really depends on what exactly you are trying to do. Can you give me a more complete example of what you are doing? Is the output PDF document the same, or are you trying to print the pdf document to a printer? Also what JDK/JRE are you using on Windows & Linux (and the distro). It may be something very simple. Thanks, Peter -- Peter Mount pe...@re... http://retep.org/ http://retep.net/ Tel: +44 (0) 1622 749439 Fax: +44 (0) 8701 361620 Mobile: +44 (0) 7838 191423 IM-MSN: ret...@ho... |
From: Peter M. <pe...@re...> - 2004-07-09 09:18:41
|
Caballero Caballero, Jose wrote: > I am trying to print a pdf file with this library. I am using > INPUT_STREAM.AUTOSENSE as flavour and it works correctly in Linux. In > windows it print like plain text... any idea? Have I install any driver or > something special? thanks No special drivers should be necessary, if it works on Linux, it should work on Windows. It really depends on what exactly you are trying to do. Can you give me a more complete example of what you are doing? Is the output PDF document the same, or are you trying to print the pdf document to a printer? Also what JDK/JRE are you using on Windows & Linux (and the distro). It may be something very simple. Thanks, Peter -- Peter Mount pe...@re... http://retep.org/ http://retep.net/ Tel: +44 (0) 1622 749439 Fax: +44 (0) 8701 361620 Mobile: +44 (0) 7838 191423 IM-MSN: ret...@ho... |
From: Caballero C. J. <jos...@ju...> - 2004-07-09 09:00:08
|
I am trying to print a pdf file with this library. I am using INPUT_STREAM.AUTOSENSE as flavour and it works correctly in Linux. In windows it print like plain text... any idea? Have I install any driver or something special? thanks Pepe Caballero Ingeniero Informatica |
From: Caballero C. J. <jos...@ju...> - 2004-06-28 13:18:36
|
J2re 1.4_03 in Java Web Start. But I use it as a module in Eclipse (1.4._03) and it works the same. Pepe Caballero Ingeniero Informatica -----Mensaje original----- De: Peter Mount [mailto:pe...@re...] Enviado el: lunes, 28 de junio de 2004 15:08 Para: Caballero Caballero, Jose CC: ret...@li... Asunto: Re: [Retep-PDF] (no subject) Caballero Caballero, Jose wrote: > I am using retep-2.4.1 to print pdf files. I ask to the user to select > the printer but sometimes you need twice or more times calling > ServiceUI.printDialog to obtain all the printers added to the computer. > First time only appear retepPDF. I call it : > > > > PrintRequestAttributeSet pras = *new* HashPrintRequestAttributeSet(); > > pras.add(MediaSizeName.ISO_A4); > > pras.add(*new* Copies(1)); > > pras.add(*new* PageRanges(*new* > String("1:"+_NumeroPaginas))); > > DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE; > > PrintService[] services = > PrintServiceLookup.lookupPrintServices(*null*, pras); > > _service = ServiceUI.printDialog(*null*, 100, 100,services, > *null*, *null*, pras); > > > > Any idea to solve it? Not off hand, but I'll try to reproduce it. What version of the JDK/JRE are you running, and which OS? May help in reproducing this problem. Peter -- Peter Mount pe...@re... http://retep.org/ http://retep.net/ Tel: +44 (0) 1622 749439 Fax: +44 (0) 8701 361620 Mobile: +44 (0) 7838 191423 IM-MSN: ret...@ho... |
From: Peter M. <pe...@re...> - 2004-06-28 13:07:42
|
Caballero Caballero, Jose wrote: > I am using retep-2.4.1 to print pdf files. I ask to the user to select > the printer but sometimes you need twice or more times calling > ServiceUI.printDialog to obtain all the printers added to the computer. > First time only appear retepPDF. I call it : > > > > PrintRequestAttributeSet pras = *new* HashPrintRequestAttributeSet(); > > pras.add(MediaSizeName.ISO_A4); > > pras.add(*new* Copies(1)); > > pras.add(*new* PageRanges(*new* > String("1:"+_NumeroPaginas))); > > DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE; > > PrintService[] services = > PrintServiceLookup.lookupPrintServices(*null*, pras); > > _service = ServiceUI.printDialog(*null*, 100, 100,services, > *null*, *null*, pras); > > > > Any idea to solve it? Not off hand, but I'll try to reproduce it. What version of the JDK/JRE are you running, and which OS? May help in reproducing this problem. Peter -- Peter Mount pe...@re... http://retep.org/ http://retep.net/ Tel: +44 (0) 1622 749439 Fax: +44 (0) 8701 361620 Mobile: +44 (0) 7838 191423 IM-MSN: ret...@ho... |
From: Caballero C. J. <jos...@ju...> - 2004-06-28 09:58:14
|
I am using retep-2.4.1 to print pdf files. I ask to the user to select the printer but sometimes you need twice or more times calling ServiceUI.printDialog to obtain all the printers added to the computer. First time only appear retepPDF. I call it : PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet(); pras.add(MediaSizeName.ISO_A4); pras.add(new Copies(1)); pras.add(new PageRanges(new String("1:"+_NumeroPaginas))); DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE; PrintService[] services = PrintServiceLookup.lookupPrintServices(null, pras); _service = ServiceUI.printDialog(null, 100, 100,services, null, null, pras); Any idea to solve it? Pepe Caballero |
From: Peter M. <pe...@re...> - 2004-06-09 15:27:54
|
Knight, Lloyd wrote: > i compiled and ran the retep pdf uri example that generates a pdf > from a gif file. works great. > > my goal is to grab a postscript file and convert to pdf using java classes, thus my interest in reteppdf. > (i don't really want to exec the ps2pdf perl script.) > > if i change the SimpleDoc parameter from DocFlavor.URL.GIF to DocFlavor.URL.POSTSCRIPT, > grab a .ps file in my URL method i get an "unsupported mime type: application" Print Exception. > > is this do-able or am i waaaaay off base.... > be kind.... No problem ;-) Currently PS to PDF is not supported. Infact there is no publically open source postscript interpretter available that is written in Java. This in itself is a bit strange to me and I've spent a good part of today looking for one. So far all I've found are references to Toastscript (which was a level 1 interpretter, but has vanished of the face of the earth), references to an example on sun.com (but I can't find it), a dormant project on sourceforge and some postings on the itext lists recently asking about the same thing. So unfortunately unless someone writes a postscript interpretter that I can use, it's not something that's going to be implemented soon (although I do want to get as many DocFlavor's supported as possible). Peter -- Peter Mount pe...@re... http://retep.org/ http://retep.net/ Tel: +44 (0) 1622 749439 Fax: +44 (0) 8701 361620 Mobile: +44 (0) 7838 191423 IM-MSN: ret...@ho... |
From: Knight, L. <Llo...@ad...> - 2004-06-08 20:36:25
|
i compiled and ran the retep pdf uri example that generates a pdf from a gif file. works great. my goal is to grab a postscript file and convert to pdf using java classes, thus my interest in reteppdf. (i don't really want to exec the ps2pdf perl script.) if i change the SimpleDoc parameter from DocFlavor.URL.GIF to DocFlavor.URL.POSTSCRIPT, grab a .ps file in my URL method i get an "unsupported mime type: application" Print Exception. is this do-able or am i waaaaay off base.... be kind.... thanks ljk |
From: <ben...@id...> - 2004-05-25 09:51:09
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |