Re: [iText-questions] PdfStructureElement with ColumnText
On 2/11/2010 8:03, wowarjuna wrote: How to add a structure element to a ColumnText (A paragraph etc)...If you could give me a simple code snippest, I would really appreciate. If this work we'll be defineatly buying this product. You don't add the structure element to the ColumnText. You add the structure element to the PdfContentByte, then perform ColumnText.go() to draw the paragraph text. See listing 15.18 in the book. This listing is part of: http://1t3xt.be/?0ef with helper classes: http://1t3xt.be/?03a and http://1t3xt.be/?171 -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] Fwd: Book Promo: iText in Action
Original Message Subject:Book Promo: iText in Action Date: Mon, 1 Nov 2010 19:21:53 -0600 (MDT) From: Java Ranch Moose mmo...@javaranch.com To: Java Ranch Moose mmo...@javaranch.com We are thrilled to have Bruno Lowagie on the ranch to promote the book iText in Action. The promotion will be held in the Other Open Source Projects forum which can be found here: http://www.coderanch.com/forums/f-64/open-source or on our mobile site: http://www.coderanch.com/forums/mobile/f-64/open-source Participate in this week's giveaway by asking Bruno Lowagie a question or two and you may win a copy of the book! The giveaway starts on Tuesday, November 2nd 2010. The drawing will be held on Friday, November 5th 2010. For more info or if you're plumb tired of getting this info, visit: http://faq.javaranch.com/view?BookPromotions -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] Help - Adding Header and Footer to an existing PDF
Hi All, I am stuck with adding a Header and Footer to an existing PDF. Any clues are appreciated. I have already checked the iText Documentation and did not find anything matching. My code goes like below - Document document = new Document(); try { // step 2: FileInputStream is = new FileInputStream(D://2.pdf); int nRead; byte[] data = new byte[16384]; ByteArrayOutputStream buffer = new ByteArrayOutputStream(); while ((nRead = is.read(data, 0, data.length)) != -1) { buffer.write(data, 0, nRead); } buffer.flush(); PdfWriter writer = PdfWriter.getInstance(document,buffer); writer.setPageEvent(new HeaderFooter()); // step 3: document.open(); document.add( new Chunk(testing)); } catch (Exception de) { de.printStackTrace(); } finally{ document.close(); } If I comment the line document.add( new Chunk(testing)); I get an exception Exception in thread main ExceptionConverter: java.io.IOException: The document has no pages. Without commenting there are no exceptions but it doesnt add the Header and Footer. Any clues are highly appreciated. Or if you could suggest how can I add events to an existing PDF. I also tried using PDFCopy and adding events to it but seems like you can attach events only to a writer. Is there anyways we can add header and footer to an existing PDF? Regards, Tina Agrawal -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Help - Adding Header and Footer to an existing PDF
On 1/11/2010 19:41, Tina Tibrewal wrote: Hi All, I am stuck with adding a Header and Footer to an existing PDF. Any clues are appreciated. I have already checked the iText Documentation and did not find anything matching. When you refer to the iText Documentation, it is assumed that you mean the book, and the book contains plenty of examples showing you how to achieve what you need. You've posted the same question here: http://www.coderanch.com/t/515845/open-source/Adding-Header-Footer-existing-PDF Please read the answer there. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
The following is the code am trying out. The text i want to put in to the paragraph is pretty big. And it will be dynamically created. Do i need to split the text? Document document = new Document(PageSize.A4, 36, 36, 54, 36); try { ColumnText _column; PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(IText6.pdf, FileMode.OpenOrCreate)); writer.SetTagged(); document.Open(); PdfContentByte cb = writer.DirectContent; BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); PdfStructureTreeRoot root = writer.StructureTreeRoot; _column = new ColumnText(cb); _column.SetSimpleColumn(50, 50, 400, 400); PdfStructureElement p = new PdfStructureElement(root, PdfName.P); cb.BeginMarkedContentSequence(p); cb.SetFontAndSize(bf, 10); cb.BeginText(); cb.SetTextMatrix(50, 800); cb.ShowText(@Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products); cb.EndText(); cb.EndMarkedContentSequence(); _column.Go(); document.Close(); } catch (Exception de) { } -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStructureElement-with-ColumnText-tp3023234p3023285.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PDF version question
How do I unsubsribe to all other questions? I just like to see the reply to my specific question. From: 1T3XT info i...@1t3xt.info To: Eveline Koekkoek/Netherlands/Contr/i...@ibmnl Date: 01-11-2010 17:09 Subject: Re: [iText-questions] PDF version question Hallo, u hebt dit bericht off-list gestuurd, het is te zeggen: naar het privé adres i...@1t3xt.info en niet naar het gratis itext-questions@lists.sourceforge.net Dit gaat in tegen de regels van de gratis mailing-list. Merk bovendien op dat op de gratis mailing list enkel support gegeven wordt voor versies 5.0.0 en hoger. Heeft IBM een support contract voor de applicatie waarvan sprake? Heeft de supplier in Israel een support contract voor de applicatie waarvan sprake? Heeft TCS een support contract voor de applicatie waarvan sprake? Zo ja, gelieve dan het adres te gebruiken dat bij aankoop van de licentie werd aangeboden door ons sales team. Indien er geen business relationship is, dan wil ik wel nog commentaar geven op uw laatste mail, maar daar houdt het op. On 1/11/2010 16:12, Eveline Koekkoek wrote: You are saying there is a better way of adding such a watermark. How can you say the way they are doing it now is wrong? What they are doing isn't wrong, but there is a better way to do it. I can see that they didn't use PdfStamper by looking at the PDF syntax inside the file you've sent me. Are you referring to PdfStamper instead of using PdfWriter for inserting tis duplicated watermark? Is PdfStamper part of Itext? Go to http://affiliate.manning.com/idevaffiliate.php?id=223_212 Download the free sample chapter 6. Go to the summary and look at Table 6.1. That table contains an overview of iText's manipulation classes. PdfStamper is one of those classes. I have already stated that they should upgrade the Itext version. But I am surprised to read that all your versions still produce 1.4 as the default. That sounds like you think iText is outdated. That's not true. iText follows the most recent specs. It was a deliberate choice to take 1.4 as the default, as different ISO standards that are still in use (such as ISO-19005 and ISO-15930) are a subset of PDF 1.4. They predate ISO-32000 (based on PDF 1.7). Moreover PDF is backward compatible, so any application that supports PDF 1.6 but NOT PDF 1.4 is in violation with the ISO standard. But I think the problem is that WebAccess is expectiong 1.6 and cannot handle the inserted watermark. That would surprise me, but as described in the book: if they want to produce a PDF 1.6 instead of 1.4, it's sufficient to tell iText not to use the default. Also: I've opened the file in Adobe Acrobat and Acrobat didn't report any problems, so I think that the assumption that the PDF version number is the culprit is wrong. I will ask in more detail the TCS developer how they insert the logo by supplying the coding and what the difference is between the watermark and the logo. You've lost me. You are assuming that I know the architecture of your application, but I don't. I have no idea why you are talking about a logo. As far as I can see neither of the PDFs you've sent me have a logo. U zegt dat u code van TCS zal opvragen, maar stuur die IN GEEN GEVAL naar mij. Ik kijk niet naar code van derden zolang er geen contract bestaat tussen 1T3XT of iText Software Corporation en die derde partij. Verdere mails naar i...@1t3xt.info zullen genegeerd woren. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info Tenzij hierboven anders aangegeven: / Unless stated otherwise above: IBM Nederland B.V. Gevestigd te Amsterdam Inschrijving Handelsregister Amsterdam Nr. 33054214 image/gif-- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
On 2/11/2010 8:37, wowarjuna wrote: The following is the code am trying out. The text i want to put in to the paragraph is pretty big. And it will be dynamically created. Do i need to split the text? The code sample can't work. Are you sure you've read the book? You're creating a ColumnText object, but you aren't adding any content! I thought you wanted to use a Paragraph object? I don't find any Paragraph object in your code. Document document = new Document(PageSize.A4, 36, 36, 54, 36); try { ColumnText _column; PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(IText6.pdf, FileMode.OpenOrCreate)); writer.SetTagged(); document.Open(); PdfContentByte cb = writer.DirectContent; BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); PdfStructureTreeRoot root = writer.StructureTreeRoot; _column = new ColumnText(cb); _column.SetSimpleColumn(50, 50, 400, 400); PdfStructureElement p = new PdfStructureElement(root, PdfName.P); cb.BeginMarkedContentSequence(p); cb.SetFontAndSize(bf, 10); cb.BeginText(); cb.SetTextMatrix(50, 800); cb.ShowText(@Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products); cb.EndText(); cb.EndMarkedContentSequence(); _column.Go(); document.Close(); } catch (Exception de) { } -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PDF version question
You can't. A mailing list sends you all mail. But you could setup a filter in your email client. Tom On 2-11-2010 9:04, Eveline Koekkoek wrote: How do I unsubsribe to all other questions? I just like to see the reply to my specific question. From: 1T3XT info i...@1t3xt.info To: Eveline Koekkoek/Netherlands/Contr/i...@ibmnl Date: 01-11-2010 17:09 Subject: Re: [iText-questions] PDF version question -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Signature is invalid for pdf
Alexander, Raitskin Alexander wrote: In this document I tried another siganture (call it SigB) on peles.pdf and it seems to be OK (it was signed with another code) http://www.darina.us/code/peles_ok.pdf FYI: The certificate used in that file looks healthier than the certificate you used in all your other samples. Otherwise, without substantial effort, I unfortunately can not spot the reason why Acrobat is unhappy with your original document (http://www.darina.us/code/peles.pdf). It is not merely a broken xref table (which iText would have spotted, BTW). But this unhappyness is the cause why Acrobat and Reader will fail to verify any signature applied to that document in append mode. Regards, Michael. PS: Leonard, this Acrobat 9 behavior IMO is quite unfortunate --- Acrobat and Reader should show a message to the effect that the signature itself is correct but that Acrobat/Reader found PDF errors which might make it display the file differently from how the signer intended it to be displayed. -- View this message in context: http://itext-general.2136553.n4.nabble.com/Signature-is-invalid-for-pdf-tp3017509p3023351.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
The following code generate the paragraph and you i know we can use same structure to add any other element to the document. But the the PDF getting generated from this does not compliant to the 508. The application is in .net and we dont have any samples for .net. I wonder whether we could use XML to create.But then again the book does not mentioned any parsers for XML. Document document = new Document(PageSize.A4, 36, 36, 54, 36); try { ColumnText _column; PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(IText6.pdf, FileMode.OpenOrCreate)); writer.SetTagged(); document.Open(); PdfContentByte cb = writer.DirectContent; BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); PdfStructureTreeRoot root = writer.StructureTreeRoot; _column = new ColumnText(cb); _column.SetSimpleColumn(50, 50, 400, 400); Paragraph _para = new Paragraph(@Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products); _column.AddElement(_para); _column.Go(); document.Close(); } catch (Exception de) { } -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStructureElement-with-ColumnText-tp3023234p3023368.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
The following code generate the paragraph and i know we can use same structure to add any other element to the document. But the the PDF getting generated from this does not compliant to the 508. The application is in .net and we dont have any samples for .net. I wonder whether we could use XML to create the PDF.But then again the book does not mentioned any parsers for .NET. Document document = new Document(PageSize.A4, 36, 36, 54, 36); try { ColumnText _column; PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(IText6.pdf, FileMode.OpenOrCreate)); writer.SetTagged(); document.Open(); PdfContentByte cb = writer.DirectContent; BaseFont bf = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.NOT_EMBEDDED); PdfStructureTreeRoot root = writer.StructureTreeRoot; _column = new ColumnText(cb); _column.SetSimpleColumn(50, 50, 400, 400); Paragraph _para = new Paragraph(@Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products); _column.AddElement(_para); _column.Go(); document.Close(); } catch (Exception de) { } -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStructureElement-with-ColumnText-tp3023234p3023370.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] MultiColumnText and TOC
This probably means I have to do multicolumn manually... That is the better option. Ok, so I've switched to ColumnText, but Chapters still aren't allowed. I'm going to attempt Chunk with anchors, but kind of amazes me that I cannot use chapters in columns. I'd assume that layout would have no influence on the sematics of the content. java.lang.IllegalArgumentException: Element not allowed. at com.itextpdf.text.pdf.ColumnText.addElement(ColumnText.java:452) Curious if I'll be able to find out on what page a anchor is at for the TOC. Tom -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] MultiColumnText and TOC
On 2/11/2010 10:29, Tom wrote: This probably means I have to do multicolumn manually... That is the better option. Ok, so I've switched to ColumnText, but Chapters still aren't allowed. No, if you need the bookmarks, you need to use PdfOutline. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
Does the following sequence is correct..? If not can u just re-arrange them. :) thanks PdfStructureElement p = new PdfStructureElement(root, PdfName.P); cb.BeginMarkedContentSequence(p); cb.SetFontAndSize(bf, 10); cb.ShowText(Para); cb.EndMarkedContentSequence(); Paragraph _para = new Paragraph(@Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products, including Adobe Acrobat, Reader®, Photoshop®, Illustrator®, InDesign®, and FrameMaker® software; Adobe LiveCycle™ server products family; the Adobe PostScript® language; and others. However, the Adobe PDF Library SDK was specifically created to support OEMs, systems integrators, independent software vendors, and enterprise IT developers who want to incorporate Adobe PDF functionality into new or existing applications and workflows. Some of the most recognizable customers of the Adobe PDF Library are prominent Adobe products); _column.AddElement(_para); _column.Go(); -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStructureElement-with-ColumnText-tp3023234p3023417.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PDF/A Invalid ICC profile
Thanks for the reply Mark. Someone send me a valid SRGB profile, so currently I'm good. But I still have some conformance tests to run. On 1-11-2010 17:52, Mark Storer wrote: Well here's the code that's throwing the exception: *if* (data.length 128 || data[36] != 0x61 || data[37] != 0x63 || data[38] != 0x73 || data[39] != 0x70) * throw* *new* IllegalArgumentException(MessageLocalization./getComposedMessage/(invalid.icc.profile)); So either iText's definition of a valid ICC profile needs work, or your profile bytes aren't Up To Spec. OTOH, there's an alternative approach that I use to generate PDFA/1-b files. Rather than setting all the attributes long-hand and stuffing the profile into the catalog myself, I do this: myPdfWriter.setOutputIntents( custom, PDFA/1, www.23.org/pub/WWW/Graphics/Color/sRGB.html, linearized sRGB, ICC_Profile.getInstance( ColorSPace.CS_LINEAR_RGB ) ); And my files pass Acrobat 9.x PDFA/1-b conformance tests (or did in earlier 9.x's, I know we haven't tested 9.4, and I'm none too sure about 9.3 either). --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
On 2/11/2010 10:42, wowarjuna wrote: Does the following sequence is correct? No, your attempt wasn't correct. You want to use ColumnText, so you don't need: cb.SetFontAndSize(bf, 10); cb.ShowText(Para); That just doesn't make sense... PdfStructureElement p = new PdfStructureElement(root, PdfName.P); Paragraph _para = new Paragraph(@...); _column.AddElement(_para); cb.BeginMarkedContentSequence(p); _column.Go(); cb.EndMarkedContentSequence(p); -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
Thanks a lot..u just saved my life..just another simple one.. PdfPTable table = new PdfPTable(1); for (int _i = 0; _i 100; _i++) table.AddCell(Creates the PdfTemplate that will hold the total number of pages.); PdfStructureElement mytable = new PdfStructureElement(root, PdfName.TABLE); PdfStructureElement tr = new PdfStructureElement(mytable, PdfName.TABLEROW); PdfStructureElement td = new PdfStructureElement(tr, PdfName.TD); _column.AddElement(table); cb.BeginMarkedContentSequence(td); _column.Go(); cb.EndMarkedContentSequence(); Here is something which i want to show table with some contents..The rows can span to mutiple pages...can u arrange this sequnce to generate a table..With this i can suggest iText for the application.. -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStructureElement-with-ColumnText-tp3023234p3023466.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
On 2/11/2010 11:14, wowarjuna wrote: Thanks a lot..u just saved my life..just another simple one.. Creating structure elements for tables are not simple. For tables with multiple cells, you need to create the table yourself using ColumnText (if borders are needed, you need to draw them manually). If you want to keep working with PdfPTable, you could use writeSelectedRows to draw each cell at its absolute position. This will demand some math, but it's probably feasible. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] Maintenance release iText
Hello, I've just made a maintenance release for iText: iText 5.0.5. For an overview of the changes, see: http://itextpdf.com/history/?branch=50node=505 A new iTextSharp release is in the making. Starting tomorrow, I'll go through the suggestions and bugs reported on SourceForge. best regards, Bruno -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] Fwd: [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
-- Forwarded message -- From: Anca Zapuc anca.za...@gmail.com Date: Tue, Nov 2, 2010 at 1:49 PM Subject: [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug To: text-questi...@lists.sourceforge.net Hi all, I have the following problem : *Problem* *Input : landscape pdf ( size :11.70 * 8.27 in ) Process : the pdf needs to be rescaled Version of iText : 2.1.4 Expected result : pdf rescaled Actual result : empty pdf* *Code *: PdfReader currentReader = new PdfReader(sourceFileName); Document document = new Document(); PdfWriter.getInstance(document, new FileOutputStream(resultFileName)); Rectangle currentSize = currentReader.getPageSizeWithRotation(1); document.setPageSize(currentSize); PdfContentByte cb = writer.getDirectContent(); PdfImportedPage page; for (int i = 1; i = currentReader.getNumberOfPages(); i++) { page = writer.getImportedPage(currentReader, i); document.newPage(); * cb.addTemplate(page, 1.0f,0.0f,0f,0.9f,0.0f,0.0f ); - gives an empty pdf* * // cb.addTemplate(page,0,0) - also gives an empty pdf*** } document.close() If I use iText till *2.1.2u *everything goes OK. The thing appears only starting with *2.1.3 - 5.0.4 *, I even looked in your log changes , but I couldn't figure out. I have a workaround for it : *replacing Document document = new Document() with document = new Document(PageSize.A4.rotate())- valid pdf* If I change *cb.addTemplate(page,0,0) with cb.addTemplate(page,0,-590f) - valid pdf *Could u please investigate the problem, cuz maybe there is a better solution to this than my workarounds.* *I have attached u the pdf which gives problems. Regards, Anca *P.S In case this is the wrong place to post the problem, pls let me know and I will move the question to a different place.* LandScapeProblem.pdf Description: Adobe PDF document -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
Hi all, I have the following problem : *Problem* *Input : landscape pdf ( size :11.70 * 8.27 in ) Process : the pdf needs to be rescaled Version of iText : 2.1.4 Expected result : pdf rescaled Actual result : empty pdf* *Code *: PdfReader currentReader = new PdfReader(sourceFileName); Document document = new Document(); PdfWriter.getInstance( document, new FileOutputStream(resultFileName)); Rectangle currentSize = currentReader.getPageSizeWithRotation(1); document.setPageSize(currentSize); PdfContentByte cb = writer.getDirectContent(); PdfImportedPage page; for (int i = 1; i = currentReader.getNumberOfPages(); i++) { page = writer.getImportedPage(currentReader, i); document.newPage(); * cb.addTemplate(page, 1.0f,0.0f,0f,0.9f,0.0f,0.0f ); - gives an empty pdf* * // cb.addTemplate(page,0,0) - also gives an empty pdf*** } document.close() If I use iText till *2.1.2u *everything goes OK. The thing appears only starting with *2.1.3 - 5.0.4 *, I even looked in your log changes , but I couldn't figure out. I have a workaround for it : *replacing Document document = new Document() with document = new Document(PageSize.A4.rotate())- valid pdf* If I change *cb.addTemplate(page,0,0) with cb.addTemplate(page,0,-590f) - valid pdf *Could u please investigate the problem, cuz maybe there is a better solution to this than my workarounds.* *I have attached u the pdf which gives problems. Regards, Anca *P.S In case this is the wrong place to post the problem, pls let me know and I will move the question to a different place.* LandScapeProblem.pdf Description: Adobe PDF document -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
You are assuming that the PDF's origin is 0,0 when it actually is -17.0424,-578.43402 and that must be compensated. You are also assuming that the PDF is not rotated, and in this case is not, but landscape PDFs are often rotated and it would also fail. Paulo From: Anca Zapuc [mailto:anca.za...@gmail.com] Sent: Tuesday, November 02, 2010 11:54 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug Hi all, I have the following problem : Problem Input : landscape pdf ( size :11.70 * 8.27 in ) Process : the pdf needs to be rescaled Version of iText : 2.1.4 Expected result : pdf rescaled Actual result : empty pdf Code : PdfReader currentReader = new PdfReader(sourceFileName); Document document = new Document(); PdfWriter.getInstance( document, new FileOutputStream(resultFileName)); Rectangle currentSize = currentReader.getPageSizeWithRotation(1); document.setPageSize(currentSize); PdfContentByte cb = writer.getDirectContent(); PdfImportedPage page; for (int i = 1; i = currentReader.getNumberOfPages(); i++) { page = writer.getImportedPage(currentReader, i); document.newPage(); cb.addTemplate(page, 1.0f,0.0f,0f,0.9f,0.0f,0.0f ); - gives an empty pdf // cb.addTemplate(page,0,0) - also gives an empty pdf } document.close() If I use iText till 2.1.2u everything goes OK. The thing appears only starting with 2.1.3 - 5.0.4 , I even looked in your log changes , but I couldn't figure out. I have a workaround for it : replacing Document document = new Document() with document = new Document(PageSize.A4.rotate())- valid pdf If I change cb.addTemplate(page,0,0) with cb.addTemplate(page,0,-590f) - valid pdf Could u please investigate the problem, cuz maybe there is a better solution to this than my workarounds. I have attached u the pdf which gives problems. Regards, Anca P.S In case this is the wrong place to post the problem, pls let me know and I will move the question to a different place. Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
Could u please tell me how can I check that ? Or where in the documentation I should look? Anca On Tue, Nov 2, 2010 at 2:04 PM, Paulo Soares psoa...@glintt.com wrote: You are assuming that the PDF's origin is 0,0 when it actually is -17.0424,-578.43402 and that must be compensated. You are also assuming that the PDF is not rotated, and in this case is not, but landscape PDFs are often rotated and it would also fail. Paulo -- *From:* Anca Zapuc [mailto:anca.za...@gmail.com] *Sent:* Tuesday, November 02, 2010 11:54 AM *To:* itext-questions@lists.sourceforge.net *Subject:* [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug Hi all, I have the following problem : *Problem* *Input : landscape pdf ( size :11.70 * 8.27 in ) Process : the pdf needs to be rescaled Version of iText : 2.1.4 Expected result : pdf rescaled Actual result : empty pdf* *Code *: PdfReader currentReader = new PdfReader(sourceFileName); Document document = new Document(); PdfWriter.getInstance( document, new FileOutputStream(resultFileName)); Rectangle currentSize = currentReader.getPageSizeWithRotation(1); document.setPageSize(currentSize); PdfContentByte cb = writer.getDirectContent(); PdfImportedPage page; for (int i = 1; i = currentReader.getNumberOfPages(); i++) { page = writer.getImportedPage(currentReader, i); document.newPage(); * cb.addTemplate(page, 1.0f,0.0f,0f,0.9f,0.0f,0.0f ); - gives an empty pdf* * // cb.addTemplate(page,0,0) - also gives an empty pdf*** } document.close() If I use iText till *2.1.2u *everything goes OK. The thing appears only starting with *2.1.3 - 5.0.4 *, I even looked in your log changes , but I couldn't figure out. I have a workaround for it : *replacing Document document = new Document() with document = new Document(PageSize.A4.rotate())- valid pdf* If I change *cb.addTemplate(page,0,0) with cb.addTemplate(page,0,-590f) - valid pdf *Could u please investigate the problem, cuz maybe there is a better solution to this than my workarounds.* *I have attached u the pdf which gives problems. Regards, Anca *P.S In case this is the wrong place to post the problem, pls let me know and I will move the question to a different place.* -- Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
On 2/11/2010 13:17, Anca Zapuc wrote: Could u please tell me how can I check that ? Or where in the documentation I should look? Section 5.3 gives an overview of the different page boundaries. In that same chapter 5, the methods getCropBox() and getBoxSize() are used. These methods also exist for PdfReader: 1. getPageSizeWithRotation() (see section 6.1.1) 2. getCropBox() 3. getBoxSize() 1. will give you the value of the /MediaBox and the rotation. 2. will give you the value of the visible area of the page (if a /CropBox is defined). 3. in your case you don't need getBoxSize(). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
Hi again, I tried : Rectangle currentSize = currentReader.getPageSizeWithRotation(1); System.out.println(Current size is : + currentSize.getWidth() + * + currentSize.getHeight()); System.out.println(CropBox is: + currentReader.getCropBox(1)); System.out.println(Trim BoxSize is: + currentReader.getBoxSize(1,trim)); System.out.println(Bleed BoxSize is: + currentReader.getBoxSize(1,bleed)); System.out.println(Art BoxSize is: + currentReader.getBoxSize(1,art)); System.out.println(Crop BoxSize is: + currentReader.getBoxSize(1,crop)); System.out.println(Media BoxSize is: + currentReader.getBoxSize(1,media)); and i got Current size is :842.6734*595.47644 CropBox is:Rectangle: 842.6734x595.47644 (rot: 0 degrees) Trim BoxSize is:null Bleed BoxSize is:null Art BoxSize is:null Crop BoxSize is:null Media BoxSize is:Rectangle: 842.6734x595.47644 (rot: 0 degrees) How can I see from these that the origin is not 0,0 or how can i detect the origin? Anca On Tue, Nov 2, 2010 at 3:00 PM, 1T3XT info i...@1t3xt.info wrote: On 2/11/2010 13:17, Anca Zapuc wrote: Could u please tell me how can I check that ? Or where in the documentation I should look? Section 5.3 gives an overview of the different page boundaries. In that same chapter 5, the methods getCropBox() and getBoxSize() are used. These methods also exist for PdfReader: 1. getPageSizeWithRotation() (see section 6.1.1) 2. getCropBox() 3. getBoxSize() 1. will give you the value of the /MediaBox and the rotation. 2. will give you the value of the visible area of the page (if a /CropBox is defined). 3. in your case you don't need getBoxSize(). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
[iText-questions] NullpointerException on document.close()
Getting a NullPointer on document.close(), though debugging shows document is not null... And document is a Document (not a PdfDocument)... Is there a known issue on this...? Rebuild helps sometimes, but now it seems I'm stuck... /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/NullpointerException-on-document-close-tp3023840p3023840.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
Just put the imported page inside an Image an do all the scaling and rotation there, no origins to worry about. Paulo From: Anca Zapuc [mailto:anca.za...@gmail.com] Sent: Tuesday, November 02, 2010 3:07 PM To: Post all your questions about iText here Subject: Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug Hi again, I tried : Rectangle currentSize = currentReader.getPageSizeWithRotation(1); System.out.println(Current size is : + currentSize.getWidth() + * + currentSize.getHeight()); System.out.println(CropBox is: + currentReader.getCropBox(1)); System.out.println(Trim BoxSize is: + currentReader.getBoxSize(1,trim)); System.out.println(Bleed BoxSize is: + currentReader.getBoxSize(1,bleed)); System.out.println(Art BoxSize is: + currentReader.getBoxSize(1,art)); System.out.println(Crop BoxSize is: + currentReader.getBoxSize(1,crop)); System.out.println(Media BoxSize is: + currentReader.getBoxSize(1,media)); and i got Current size is :842.6734*595.47644 CropBox is:Rectangle: 842.6734x595.47644 (rot: 0 degrees) Trim BoxSize is:null Bleed BoxSize is:null Art BoxSize is:null Crop BoxSize is:null Media BoxSize is:Rectangle: 842.6734x595.47644 (rot: 0 degrees) How can I see from these that the origin is not 0,0 or how can i detect the origin? Anca On Tue, Nov 2, 2010 at 3:00 PM, 1T3XT info i...@1t3xt.infomailto:i...@1t3xt.info wrote: On 2/11/2010 13:17, Anca Zapuc wrote: Could u please tell me how can I check that ? Or where in the documentation I should look? Section 5.3 gives an overview of the different page boundaries. In that same chapter 5, the methods getCropBox() and getBoxSize() are used. These methods also exist for PdfReader: 1. getPageSizeWithRotation() (see section 6.1.1) 2. getCropBox() 3. getBoxSize() 1. will give you the value of the /MediaBox and the rotation. 2. will give you the value of the visible area of the page (if a /CropBox is defined). 3. in your case you don't need getBoxSize(). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.netmailto:iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
On 2/11/2010 16:06, Anca Zapuc wrote: Hi again, I tried : Rectangle currentSize = currentReader.getPageSizeWithRotation(1); System.out.println(Current size is : + currentSize.getWidth() + * + currentSize.getHeight()); System.out.println(CropBox is: + currentReader.getCropBox(1)); and i got Current size is :842.6734*595.47644 CropBox is:Rectangle: 842.6734x595.47644 (rot: 0 degrees) How can I see from these that the origin is not 0,0 or how can i detect the origin? Rectangle cropbox = currentReader.getCropBox(1)); System.out.println(cropbox.getLeft()); System.out.println(cropbox.getBottom()); -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
On 2/11/2010 16:13, riffla wrote: Getting a NullPointer on document.close(), though debugging shows document is not null... The stack trace probably points to some object used in the close() method, but without the stack trace we can't help you. Is there a known issue on this...? No. Rebuild helps sometimes, but now it seems I'm stuck... Are you saying this is a non-reproducible error? An error that occurs now and then, but not always. Those are very hard to debug, especially for people who don't have access to the code, the environment, the stack trace, etc... -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
e= NullPointerException (id=9554) serialVersionUID (RuntimeException)= -7034897190745766939 cause= NullPointerException (id=9554) detailMessage= null stackTrace= null serialVersionUID (Throwable)= -3042686055658047285 serialVersionUID (Exception)= -3387516993124229948 This is it, document.close surrounded by try/catch gives this... No internal logging (log4j) or such to extend logging? /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/NullpointerException-on-document-close-tp3023840p3023894.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
This is the document in the expression viewer: document= Document (id=9583) compress= true ITEXT= iText (id=9586) ITEXT_VERSION= iText 2.1.7 by 1T3XT (id=9587) plainRandomAccess= false RELEASE= 2.1.7 (id=9588) wmfFontCorrection= 0.86 chapternumber= 0 close= false elementData= Object[10] (id=9589) modCount= 1 size= 1 footer= null header= null htmlStyleClass= null javaScript_onLoad= null javaScript_onUnLoad= null listeners= ArrayListE (id=9584) marginBottom= 36.0 marginLeft= 36.0 marginMirroring= false backgroundColor= null border= -1 borderColor= null borderColorBottom= null borderColorLeft= null borderColorRight= null borderColorTop= null borderWidth= -1.0 borderWidthBottom= -1.0 borderWidthLeft= -1.0 borderWidthRight= -1.0 borderWidthTop= -1.0 llx= 0.0 lly= 0.0 rotation= 0 urx= 595.22 ury= 842.0 useVariableBorders= false /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/NullpointerException-on-document-close-tp3023840p3023906.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
Inside the close() method there is an iteration over the listeners collection, could it be that it iterates and tries to cast itr.next() (that could be null for some reason) to a listener... Expanded the document instance in the expression viewer which gave this: document= Document (id=9622) compress= true ITEXT= iText (id=9586) ITEXT_VERSION= iText 2.1.7 by 1T3XT (id=9587) plainRandomAccess= false RELEASE= 2.1.7 (id=9588) wmfFontCorrection= 0.86 chapternumber= 0 close= false elementData= Object[10] (id=9660) [0]= PdfDocument (id=9661) additionalActions= null alignment= 0 anchorAction= null annotationsImp= PdfAnnotationsImp (id=9662) boxSize= HashMapK,V (id=9663) chapternumber= 0 close= false collection= null currentHeight= 214.2 currentOutline= PdfOutline (id=9664) documentFileAttachment= HashMapK,V (id=9665) documentLevelJS= HashMapK,V (id=9666) duration= -1 firstPageEvent= false footer= null graphics= PdfContentByte (id=9669) header= null htmlStyleClass= null imageEnd= -1.0 imageWait= null indentation= PdfDocument$Indentation (id=9670) info= PdfDocument$PdfInfo (id=9671) isSectionTitle= false javaScript_onLoad= null javaScript_onUnLoad= null jsCounter= 0 lastElementType= 12 leading= 11.7 leadingCount= 0 line= PdfLine (id=9693) lines= ArrayListE (id=9694) listeners= ArrayListE (id=9695) localDestinations= TreeMapK,V (id=9698) marginBottom= 36.0 marginLeft= 36.0 marginMirroring= false marginMirroringTopBottom= false marginRight= 36.0 marginTop= 36.0 markPoint= 0 nextMarginBottom= 36.0 nextMarginLeft= 36.0 nextMarginRight= 36.0 nextMarginTop= 36.0 nextPageSize= Rectangle (id=9773) open= true openActionAction= null openActionName= null pageAA= null pageEmpty= false pageLabels= null pageN= 1 pageResources= PageResources (id=9776) pageSize= Rectangle (id=9778) rootOutline= PdfOutline (id=9664) strictImageSequence= false text= PdfContentByte (id=9780) textEmptySize= 3 thisBoxSize= HashMapK,V (id=9781) thumb= null transition= null viewerPreferences= PdfViewerPreferencesImp (id=9783) writer= PdfWriter (id=9621) body= PdfWriter$PdfBody (id=9675) closeStream= true colorNumber= 1 compressionLevel= -1 crypto= null currentPageNumber= 1 currentPdfReaderInstance= null
Re: [iText-questions] NullpointerException on document.close()
Another question (urgent situation, hence all questions in a row)... Is it possible to attach souce.jar to debug itext code (noticed that the source jar default package does not match the compiled jar, there's a 'core' prefixing the source jar packages)... A way to go? /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/NullpointerException-on-document-close-tp3023840p3023937.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
On 2/11/2010 17:08, riffla wrote: Inside the close() method there is an iteration over the listeners collection, could it be that it iterates and tries to cast itr.next() (that could be null for some reason) to a listener... Wouldn't it be easier to debug the problem if you printed the stackTrace? In any case: why do you have more than one listener? If you're creating only one document, you should only have one listener. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
On 2/11/2010 17:15, riffla wrote: Another question (urgent situation, hence all questions in a row)... Is it possible to attach souce.jar to debug itext code (noticed that the source jar default package does not match the compiled jar, there's a 'core' prefixing the source jar packages)... A way to go? Take the source code, compile it in debug mode, and use that jar. That way, the stack trace will give you the line numbers. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
I am debuggin at my best, but the stacktrace says nothing. And at the most basic level inside the doc has only one iterator, but digging deeper in the doc tree there seems to be more, I'm using both doc.add and contentbyte code to generate pdf (if that affects things) /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/NullpointerException-on-document-close-tp3023840p3023967.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
On 2/11/2010 17:32, riffla wrote: I am debuggin at my best, but the stacktrace says nothing. And at the most basic level inside the doc has only one iterator, but digging deeper in the doc tree there seems to be more, I'm using both doc.add and contentbyte code to generate pdf (if that affects things) What I do in these cases: - I don't use the jar, I use the source code in my IDE - I set break points and inspect the values of different variables -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
I think this'll work from within a PdfPCellEvent... Let me see... Okay. This looks a bit fragile, but I think it will work. PdfPCellEvent.cellLayout() is called AFTER each cell is drawn. The text and images within each given cell are written into canvases[PdfPTable.TEXTCANVAS], so that's where you need to begin and end all your marked content. And because cellLayout() is called afterwards, you need to close the current cell and open any/all tags for the next cell. Table row cell/ cell/ cell/ /row row cell/ cell/ cell/ /row /Table You'll need to begin the table, row, and cell marked content before cellLayout is called the first time. You'll need to know when a given cell ends a row so you can end that row and start the next one. And you'll need to know when the cell in question is the last cell in the table so you can end the cell, row, and table. Sadly, PdfPCell doesn't know it's own row/column, so you'll need to determine the current row/column some other way (just count the current row between calls, and ++row/col=0 when the cell rect's Y coord changes... Though I believe cells can change their padding/spanning individually, so that could get messy. Complex, but it looks possible. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; -Original Message- From: wowarjuna [mailto:wowarj...@hotmail.com] Sent: Tuesday, November 02, 2010 3:14 AM To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] PdfStructureElement with ColumnText Thanks a lot..u just saved my life..just another simple one.. PdfPTable table = new PdfPTable(1); for (int _i = 0; _i 100; _i++) table.AddCell(Creates the PdfTemplate that will hold the total number of pages.); PdfStructureElement mytable = new PdfStructureElement(root, PdfName.TABLE); PdfStructureElement tr = new PdfStructureElement(mytable, PdfName.TABLEROW); PdfStructureElement td = new PdfStructureElement(tr, PdfName.TD); _column.AddElement(table); cb.BeginMarkedContentSequence(td); _column.Go(); cb.EndMarkedContentSequence(); Here is something which i want to show table with some contents..The rows can span to mutiple pages...can u arrange this sequnce to generate a table..With this i can suggest iText for the application.. -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStructureElement -with-ColumnText-tp3023234p3023466.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] Add to FactoryProperties
You'll be happy to know that the 5.0.5 release already contains support for font-family. No such luck on background-color however. We've accepted quite a few user-submitted patches over the years. I was a user submitting patches myself not so long ago. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; From: Rod Hall [mailto:rh...@planbook.com] Sent: Monday, November 01, 2010 6:04 PM To: Post all your questions about iText here Subject: [iText-questions] Add to FactoryProperties Hi, What are the chances that I could get background-color and font-family added to FactoryProperties? Below is a sample html string generated by TinyMCE, the online text editor we use: span style=background-color: #00; font-family: comic sans ms, sans-serif; color: #ff; font-size: large;Sample/span FactoryProperties handles color and font-size just fine, but not background-color or font-family. I could parse my html strings to convert the non-supported items into a format that is supported, but feels like a better solution to add these directly to FontProperties. I would also be willing to add this code if that's a possibility. Let me know what you think. Thanks, -- Rod Hall Chief Idea Architect planbook.com http://www.planbook.com/ -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug
Rectangle.toString() just prints out its width and height as well. As 1T3XT info points out, calling getWidth getHeight isn't going to tell you much about the origin, just the width and height. You need absolute coordinates, not relative distances. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; -Original Message- From: 1T3XT info [mailto:i...@1t3xt.info] Sent: Tuesday, November 02, 2010 8:24 AM To: Post all your questions about iText here Subject: Re: [iText-questions] [URGENT] iText 2.1.4 - 5.0.4 PDF Lanscape Bug On 2/11/2010 16:06, Anca Zapuc wrote: Hi again, I tried : Rectangle currentSize = currentReader.getPageSizeWithRotation(1); System.out.println(Current size is : + currentSize.getWidth() + * + currentSize.getHeight()); System.out.println(CropBox is: + currentReader.getCropBox(1)); and i got Current size is :842.6734*595.47644 CropBox is:Rectangle: 842.6734x595.47644 (rot: 0 degrees) How can I see from these that the origin is not 0,0 or how can i detect the origin? Rectangle cropbox = currentReader.getCropBox(1)); System.out.println(cropbox.getLeft()); System.out.println(cropbox.getBottom()); -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
Just because the stack trace doesn't help you doesn't mean it won't help us. PLEASE post the stack trace. Help us help you. If you don't want to help us, I doubt we'll be all that inclined to continue to help you. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; DisclaimerCardiff DisCard = null; -Original Message- From: riffla [mailto:rif...@hotmail.com] Sent: Tuesday, November 02, 2010 9:32 AM To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] NullpointerException on document.close() I am debuggin at my best, but the stacktrace says nothing. And at the most basic level inside the doc has only one iterator, but digging deeper in the doc tree there seems to be more, I'm using both doc.add and contentbyte code to generate pdf (if that affects things) /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/NullpointerExceptio n-on-document-close-tp3023840p3023967.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] PdfStructureElement with ColumnText
Hi, I posted this long time ago:: http://www.mail-archive.com/itext-questions@lists.sourceforge.net/msg41651.html Hope this helps. Jose 2010/11/2 wowarjuna wowarj...@hotmail.com Thanks a lot..u just saved my life..just another simple one.. PdfPTable table = new PdfPTable(1); for (int _i = 0; _i 100; _i++) table.AddCell(Creates the PdfTemplate that will hold the total number of pages.); PdfStructureElement mytable = new PdfStructureElement(root, PdfName.TABLE); PdfStructureElement tr = new PdfStructureElement(mytable, PdfName.TABLEROW); PdfStructureElement td = new PdfStructureElement(tr, PdfName.TD); _column.AddElement(table); cb.BeginMarkedContentSequence(td); _column.Go(); cb.EndMarkedContentSequence(); Here is something which i want to show table with some contents..The rows can span to mutiple pages...can u arrange this sequnce to generate a table..With this i can suggest iText for the application.. -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfStructureElement-with-ColumnText-tp3023234p3023466.html Sent from the iText - General mailing list archive at Nabble.com. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
Re: [iText-questions] NullpointerException on document.close()
Thanks for supporting me... but for you Mark, if you look at the third message from top in this thread you can see what I mean about the stacktrace, and that I doubt it'll give you any hint 'bout the original cause. Getting back to work tomorrow I think the best way to attack this problem is to comment out every rendering piece of code, and then, one by one uncomment these blocks (and hoping that the consistancy of this problem remains). Another approach is to use the iText source code instead of compiled jar, and then step into the document class. But as always working in projects at customers there's always short of time... Get back as soon as I come up with any news - may it be more facts or the solution Cheers /R -- View this message in context: http://itext-general.2136553.n4.nabble.com/NullpointerException-on-document-close-tp3023840p3024594.html Sent from the iText - General mailing list archive at Nabble.com. -- Achieve Improved Network Security with IP and DNS Reputation. Defend against bad network traffic, including botnets, malware, phishing sites, and compromised hosts - saving your company time, money, and embarrassment. Learn More! http://p.sf.net/sfu/hpdev2dev-nov ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php