>Please explain what's not clear in the documentation ( = chapter 7 of >"iText in Action") so that it can be adapted in the next revision.
I understand what it does now. The explanation in the book is good. -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Saturday, September 05, 2009 4:40 PM To: [email protected] Subject: iText-questions Digest, Vol 40, Issue 14 Send iText-questions mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/itext-questions or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of iText-questions digest..." Today's Topics: 1. How is the baseline for a columnText determined ? (Adam Mork) 2. Annotations in layers (Tony Stevens) 3. Re: IllegalArgumentException Thrown When I Call Document.close() (1T3XT info) 4. Re: Annotations in layers (Leonard Rosenthol) 5. Re: How is the baseline for a columnText determined ? (1T3XT info) 6. Re: PdfCopyFields looses Javascript (Bigdaddy_mg) 7. Re: Annotations in layers (Tony Stevens) ---------------------------------------------------------------------- Message: 1 Date: Fri, 4 Sep 2009 18:17:38 -0600 From: Adam Mork <[email protected]> Subject: [iText-questions] How is the baseline for a columnText determined ? To: "[email protected]" <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset="us-ascii" I am re-writing a pdf output component for a software program that needs to accurately match common office document formats. I decided to use ColumnText to write out lines of text. I create a new column text for each line of text that I output. For the most part my x-values are spot on, but my y-values are not. I am trying to tweak different parameters of the ColumnText object to get my y-values correct. What role does the actual dimension of the ColumnText play in outputting text? For example does the lly value represent the baseline for text? or is it the baseline plus the descent ? Also how does the height of the column affect the output. For example if I change the ury, relative to the lly,the physical positioning of the text on the page changes. Is the text centered inside of the rectangle created by 'setSimpleColumn' ? Also what does setYline do in column text ? I don't understand what it means when the documentation says 'Sets the yLine. The line will be written to yLine-leading.' -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Fri, 4 Sep 2009 22:35:15 -0700 (PDT) From: Tony Stevens <[email protected]> Subject: [iText-questions] Annotations in layers To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=us-ascii I'm doing some experiments to see what I can achieve with PDF optional content, and I'm confused with what's happening when I add an annotation in a specific layer. In the PDF below, page 1 layer 2 has a link (the red X) to show the alternate version of the page in layer 1. This works, but when layer 2 is no longer visible, the link is still active. I used the setLayer method of PdfAnnotation to set the layer before adding it. I can see there is an /OC entry in the annotation dictionary that looks correct, and according to the PDF Reference this should make the annotation disappear when the layer is not visible. Can anyone explain why this doesn't work? http://www.nabble.com/file/p25305257/Layers.pdf Layers.pdf -- View this message in context: http://www.nabble.com/Annotations-in-layers-tp25305257p25305257.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------ Message: 3 Date: Sat, 05 Sep 2009 08:53:21 +0200 From: 1T3XT info <[email protected]> Subject: Re: [iText-questions] IllegalArgumentException Thrown When I Call Document.close() To: Post all your questions about iText here <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Art Purcell wrote: > EXCEPTION : java.lang.IllegalArgumentException: Font size too small: 0.0 > java.lang.IllegalArgumentException: Font size too small: 0.0 Somewhere in your HTML, something causes to create a font with size 0. If you find out where, we may be able to help you, but we can't guess. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------ Message: 4 Date: Fri, 4 Sep 2009 23:53:46 -0700 From: Leonard Rosenthol <[email protected]> Subject: Re: [iText-questions] Annotations in layers To: Post all your questions about iText here <[email protected]> Message-ID: <c6c7d79a.9e57%[email protected]> Content-Type: text/plain; charset="us-ascii" On 9/5/09 11:05 AM, "Tony Stevens" <[email protected]> wrote: > I'm doing some experiments to see what I can achieve with PDF optional > content, and I'm confused with what's happening when I add an annotation in > a specific layer. In the PDF below, page 1 layer 2 has a link (the red X) to > show the alternate version of the page in layer 1. This works, but when > layer 2 is no longer visible, the link is still active. > That is correct. Remember that it is optional CONTENT - not optional ANNOTATIONS! So via OCGs, you can only "turn off" content. If you wish to also hide the annotation itself - then you need to use JavaScript (annot.hide(), I believe). Leonard ------------------------------ Message: 5 Date: Sat, 05 Sep 2009 08:56:31 +0200 From: 1T3XT info <[email protected]> Subject: Re: [iText-questions] How is the baseline for a columnText determined ? To: Post all your questions about iText here <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=windows-1252; format=flowed Adam Mork wrote: > For example does the lly value represent the baseline for text? No, ColumnText starts writing at the top. > Also how does the height of the column affect the output. Either the content fits the height (and everything is sent to the output), or not (in which case, some content remains in the column). > For example if I change the ury, relative to the > lly,the physical positioning of the text on the page changes. Of course! > Is the > text centered inside of the rectangle created by ?setSimpleColumn? ? No. > Also what does setYline do in column text ? It changes the starting position. > I don?t understand what it > means when the documentation says ?Sets the yLine. The line will be > written to yLine-leading.? Please explain what's not clear in the documentation ( = chapter 7 of "iText in Action") so that it can be adapted in the next revision. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------ Message: 6 Date: Fri, 4 Sep 2009 15:45:30 -0700 (PDT) From: Bigdaddy_mg <[email protected]> Subject: Re: [iText-questions] PdfCopyFields looses Javascript To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8 Hi paulo, Thanks for replying. The thing is that I had added javascript to fire when document opens but now how do I do it. I am taking output streams and adding them as doc. I read the script from a file and tried adding through addJavascript method but it giving some errors. So should I add javascript first then add doc or the sequence does not matter. Can you give me an example snippet to fire an event on doc open event. Thanks Manoj Paulo Soares-3 wrote: > > The removal of all javascript is intended. When joining several PDFs it's > impossible to make sure that the javascript will still work. You can use > PdfCopyFields.AddJavaScript() to add the javasript that you want to > include. > > Paulo > >> -----Original Message----- >> From: Goel, Manoj [mailto:[email protected]] >> Sent: Friday, September 04, 2009 12:13 AM >> To: [email protected] >> Subject: [iText-questions] PdfCopyFields looses Javascript >> >> Hi All, >> >> >> >> When merging pdf's using PdfCopyfields the javascript is >> lost. How can we get the javascript to work or fire automatically/ >> >> >> >> So I have code like this: >> >> >> >> ByteArrayOutputStream pdfBAOS = new ByteArrayOutputStream(); >> >> InputStream dataStream = >> externalContext.getResourceAsStream("/WEB-INF/PDF/mypdf"); >> >> reader = new PdfReader(dataStream); >> >> stamper = new PdfStamper(reader,pdfBAOS); >> >> AcroFields form = stamper.getAcroFields(); >> >> form.setField("registerOwner", registerOwner); >> >> >> >> >> >> ...... >> >> >> >> //now add this content to document >> >> PdfReader currentReader = new >> PdfReader(pdfBAOS.toByteArray()); >> >> pdfCopyFields.addDocument(currentReader); >> >> >> >> by this time the javascript which fires at the >> open of pdf does not fire. I have defined an init method (not >> a s function) which has all the js to set color's of my text >> fields to gray. >> >> >> >> If I don't have copyfileds call (i.e when showing single PDF) >> my js works fine but during copy the js does not fire, how >> can I get js to fire. >> >> >> >> I tried to set the js at stamper level but does not work, >> please suggest a method. >> >> >> >> Can I put a button hidden on the pdf and then fire the click >> event somehow on that button to run my script? >> >> >> >> I am using Adobe Pro 9 to create my PDF's. >> >> >> >> Please help >> >> >> >> Thanks >> >> >> >> Manoj >> >> >> >> > > 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. > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ > You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ > -- View this message in context: http://www.nabble.com/PdfCopyFields-looses-Javascript-tp25289794p25303128.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------ Message: 7 Date: Sat, 5 Sep 2009 15:39:51 -0700 (PDT) From: Tony Stevens <[email protected]> Subject: Re: [iText-questions] Annotations in layers To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=us-ascii Leonard Rosenthol-3 wrote: > > On 9/5/09 11:05 AM, "Tony Stevens" <[email protected]> wrote: >> I'm doing some experiments to see what I can achieve with PDF optional >> content, and I'm confused with what's happening when I add an annotation >> in >> a specific layer. In the PDF below, page 1 layer 2 has a link (the red X) >> to >> show the alternate version of the page in layer 1. This works, but when >> layer 2 is no longer visible, the link is still active. >> > That is correct. Remember that it is optional CONTENT - not optional > ANNOTATIONS! So via OCGs, you can only "turn off" content. If you wish > to > also hide the annotation itself - then you need to use JavaScript > (annot.hide(), I believe). > > Leonard > Hi Leonard, If that's the case, why is there an entry called /OC in the annotation dictionary? According to section 12.5.2 of the PDF specification, this is used to determine the visibility of the annotation, and "...If it is determined to be invisible, the annotation shall be skipped, as if it were not in the document." (my emphasis). It's hard to see how the Adobe software can be said to be following the specification in this instance. In any case, you've confirmed my view that the problem isn't in iText, so thanks. Tony S. -- View this message in context: http://www.nabble.com/Annotations-in-layers-tp25305257p25312953.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ------------------------------ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions End of iText-questions Digest, Vol 40, Issue 14 *********************************************** ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
