Salut, Je me demande si nous avons la possibilité de transformer directement un document PDF réalisé avec iText en document Word sans passer par un format RTF ??
JSB -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de [EMAIL PROTECTED] Envoyé : vendredi 4 janvier 2008 17:32 À : [email protected] Objet : iText-questions Digest, Vol 20, Issue 21 Send iText-questions mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/itext-questions or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of iText-questions digest..." Today's Topics: 1. rtf table cell border width (Georg Nebehay) 2. Re: Design reports in Word or Excel (Bruno Lowagie) 3. Re: Problem with Font creation. (Schal?ck) 4. Printing Flash in a PDF (Aaron Watkins) 5. Re: Printing Flash in a PDF (Leonard Rosenthol) ---------------------------------------------------------------------- Message: 1 Date: Fri, 04 Jan 2008 12:39:22 +0100 From: "Georg Nebehay" <[EMAIL PROTECTED]> Subject: [iText-questions] rtf table cell border width To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" Hi there! I was trying to create a table cell with a quite thick bottom border with the code at the end of the mail but to me it seemed every border-width value greater than 2 was reset to 2. So I took a look into the itext source where I found this snippet in RtfBorder.java:413 if(borderWidth > 2) { borderWidth = 2; } Is there a sound reason for this being here? If I edit the resulting file manually I can achieve thicker borders at will. I am using Windows 2003 for displaying rtf. Best Regards, Georg Nebehay import java.awt.Color; import java.io.FileOutputStream; import com.lowagie.text.Document; import com.lowagie.text.PageSize; import com.lowagie.text.Rectangle; import com.lowagie.text.Table; import com.lowagie.text.rtf.RtfWriter2; import com.lowagie.text.rtf.table.RtfBorder; import com.lowagie.text.rtf.table.RtfBorderGroup; import com.lowagie.text.rtf.table.RtfCell; public class RtfTest { public static void main(String[] args) { try { Document document = new Document(PageSize.A4.rotate()); RtfWriter2 w = RtfWriter2.getInstance(document, new FileOutputStream("testDocument.rtf")); document.open(); Table t = new Table(2,1); RtfCell cell1 = new RtfCell(); RtfCell cell2 = new RtfCell(); cell1.setBorders(new RtfBorderGroup(Rectangle.BOTTOM, RtfBorder.BORDER_SINGLE, 10, new Color(255, 0, 0))); t.addCell(cell1); t.addCell(cell2); document.add(t); document.close(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } } -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail ------------------------------ Message: 2 Date: Fri, 04 Jan 2008 13:18:41 +0100 From: Bruno Lowagie <[EMAIL PROTECTED]> Subject: Re: [iText-questions] Design reports in Word or Excel To: Post all your questions about iText here <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" David Thielen wrote: > We just added support for designing in Excel - details below: http://lowagie.com/maand.php?year=2008 <http://lowagie.com/maand.php?year=2008&month=1#693> &month=1#693 [...] Once in a while I find an announcement in my INBOX that is worth mentioning on my blog. [...] br, Bruno -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3697 bytes Desc: S/MIME Cryptographic Signature ------------------------------ Message: 3 Date: Fri, 4 Jan 2008 14:13:52 +0100 From: Schal?ck, Elmar <[EMAIL PROTECTED]> Subject: Re: [iText-questions] Problem with Font creation. To: <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Hi, sorry to answer so late. Had some Christmas days off :-) I had the same problem and resolved the font loading as follows: InputStream ris = this.getClass().getResourceAsStream("/DejaVuSansMono.ttf"); byte[] ttfAfm = IOUtils.toByteArray(ris); ris.close(); BaseFont dejaVuSans = BaseFont.createFont("DejaVuSansMono.ttf", BaseFont.IDENTITY_H, true, true, ttfAfm, null); Try-Catch and this things are required. Good luck Elmar -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 4372 bytes Desc: not available ------------------------------ Message: 4 Date: Fri, 4 Jan 2008 16:00:02 +0000 From: "Aaron Watkins" <[EMAIL PROTECTED]> Subject: [iText-questions] Printing Flash in a PDF To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Hello, This is my first time using iText and I must say that I'm very pleased with how easily it's made the process of creating a PDF that mostly suits my requirements. I've created a Flex application (which compiles down to a Flash "swf" file) that I need to embed into a PDF. I've managed to embed the file in and have it play automatically quite simply with: PdfFileSpecification spec = PdfFileSpecification.fileEmbedded(writer, path, "Post Event Report", null, false); PdfAnnotation annot = PdfAnnotation.createScreen(writer, r, path, spec, "application/x-shockwave-flash", true); writer.addAnnotation(annot); This all works fine. My problem though, is that the screen annotation will not print. In the source for createScreen, I note that it says: ann.put (PdfName.F , new PdfNumber(FLAGS_PRINT)); Which indicates that the annotation should be printed. However, on looking through the PDF 1.6 manual, it appears that the screen annotation will not be printed unless I also set the normal appearence stream to something appropriate. I've tried doing this with: PdfTemplate printing = PdfTemplate.createTemplate(writer, document.getPageSize().getWidth(), document.getPageSize().getHeight()); annot.setAppearance(PdfName.N, printing); However, printing still returns a blank page. Does anyone have any suggestions on the options that I should be setting for the PdfTemplate object (corresponds to a PDF Form XObject)? Or is there another way of getting this to work? I look forward to your response... Aaron Watkins -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 5 Date: Fri, 4 Jan 2008 11:30:40 -0500 From: Leonard Rosenthol <[EMAIL PROTECTED]> Subject: Re: [iText-questions] Printing Flash in a PDF To: Post all your questions about iText here <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed You need to put some actual content into that template - perhaps load a static image or something from the Flash... Leonard On Jan 4, 2008, at 11:00 AM, Aaron Watkins wrote: > Hello, > > This is my first time using iText and I must say that I'm very > pleased with how easily it's made the process of creating a PDF > that mostly suits my requirements. > > I've created a Flex application (which compiles down to a Flash > "swf" file) that I need to embed into a PDF. I've managed to embed > the file in and have it play automatically quite simply with: > > PdfFileSpecification spec = PdfFileSpecification.fileEmbedded > (writer, path, "Post Event Report", null, false); > PdfAnnotation annot = PdfAnnotation.createScreen(writer, r, > path, spec, "application/x-shockwave-flash", true); > writer.addAnnotation(annot); > > This all works fine. My problem though, is that the screen > annotation will not print. > > In the source for createScreen, I note that it says: > > ann.put (PdfName.F , new PdfNumber(FLAGS_PRINT)); > > Which indicates that the annotation should be printed. However, on > looking through the PDF 1.6 manual, it appears that the screen > annotation will not be printed unless I also set the normal > appearence stream to something appropriate. I've tried doing this > with: > > PdfTemplate printing = PdfTemplate.createTemplate(writer, > document.getPageSize().getWidth(), document.getPageSize().getHeight > ()); > annot.setAppearance(PdfName.N, printing); > > However, printing still returns a blank page. Does anyone have any > suggestions on the options that I should be setting for the > PdfTemplate object (corresponds to a PDF Form XObject)? Or is there > another way of getting this to work? > > I look forward to your response... > > > > > Aaron Watkins > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ ------------------------------ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ ------------------------------ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions End of iText-questions Digest, Vol 20, Issue 21 *********************************************** _____ avast! Antivirus <http://www.avast.com> : Outbound message clean. Virus Database (VPS): 080103-0, 03/01/2008 Tested on: 04/01/2008 19:53:41 avast! - copyright (c) 1988-2008 ALWIL Software. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
