Re: [iText-questions] Guidance Requested - Generating multipage output with header/footer and pg 1 layout
Daniel Cane wrote: On to a new challenge -- I'd like to have lists as part of one of the columnTexts, but have learned that that's unsupported (and I even think I understand why). People who have been following this list for a long time, know that I can react very frustrated at times. Newbies often don't understand why I react that way. This is a nice opportunity to explain the origin of this frustration. You have learned that lists are unsupported in ColumnText. Where have you learned this? Who is spreading this kind of desinformation? Why are you saying this. In attachment, you can find a very simple example that proves the opposite of what you've learned. And more importantly: what is wrong with the documentation??? What is wrong with the second edition of the book that still causes misconceptions like this? There are still a couple of months left to find a remedy before the book goes to print. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info column_list.pdf Description: Adobe PDF document import java.io.FileOutputStream; import java.io.IOException; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.List; import com.itextpdf.text.pdf.ColumnText; import com.itextpdf.text.pdf.PdfWriter; public class ColumnList { public static void main(String[] args) throws IOException, DocumentException { Document document = new Document(); // step 2 PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("column_list.pdf")); // step 3 document.open(); // step 4 ColumnText ct = new ColumnText(writer.getDirectContent()); List list = new List(List.ORDERED); list.add("item 1"); list.add("item 2"); list.add("item 3"); ct.addElement(list); ct.setSimpleColumn(36, 36, 559, 806); ct.go(); // step 5 document.close(); } } -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Ploblem with superscript and subscript
Do you mean to say there is no support for Superscript and Subscript in PDFGraphics2D. I there any other option other than using textlayout, since using textlayout the pdf printing quality is poor. Thanks Dorairaj 1T3XT info wrote: > > dorairaj wrote: >> >> Hi there, >> >> Can any one suggest me? > > Apparently not. > -- > This answer is provided by 1T3XT BVBA > http://www.1t3xt.com/ - http://www.1t3xt.info > > -- > ___ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.itextpdf.com/book/ > 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://old.nabble.com/Ploblem-with-superscript-and-subscript-tp28426091p28456898.html Sent from the iText - General mailing list archive at Nabble.com. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
[iText-questions] How to Apply the TextAttribute.SuperScript to PDFGraphics Object
Hi All I am using itext5.0 to generate the PDF file while i am using the TextAttribute.SuperScript is notworking properly. Let me know any suggests overcome this problem and solution urgently. Thanks Rajesh Voruganti -- View this message in context: http://old.nabble.com/How-to-Apply-the-TextAttribute.SuperScript-to-PDFGraphics-Object-tp28445886p28445886.html Sent from the iText - General mailing list archive at Nabble.com. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
[iText-questions] margin after printing
I have a problem with pdf margin after printing the file. I set the whole document's margin to 54pt. When the pdf is generated it looks ok, but after printing, the top margin becomes wider. im using adobe reader 9.3.0 and itext 5.0.2. I am using None for page scaling on the print options because I dont think users would care changing that. I dont think it's a printer setting either because i checked and there's no such setting. I also tried printing to 3 different printers and they act the same. As a workaround, I just set the top margin to be smaller, the softcopy doesnt look ok but at least it prints ok. I know the workaround is inefficient so maybe there's some explanation to this. By the way here are my document's settings: Document(PageSize.LETTER, 54, 54, 18, 54) Pardon me if I cannot provide much details as I am just using my phone. thanks. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Guidance Requested - Generating multipage output with header/footer and pg 1 layout
1T3XT info 1t3xt.info> writes: > > I would work with ColumnText. > > For the first page, I would add the first page of the template > without the fields as the background of my new document. > I would retrieve the positions of the fixed items, and put them > on the page using ColumnText. > > Then I would create a ColumnText object for the unstructured content; > I would add the unstructured content using paragraphs, tables,... > I would also call go() on a regular basis. Whenever a new page is > needed, I would add a new page with the second page of the template > as background. Brilliant, I ended up using a PdfPageEventHelper to set the template to either first page, or follow-up page types and then put my content into 2 columnText blocks (for left and right sides of the page) - since either could be >1 page long.. Then I wrote a little block of code to continue to add pages so long as either columnText had content still to write out: do { int iLeftColHasMore = ct.go(); int iRightColHasMore = ctRight.go(); ct.setSimpleColumn(35.2716f, 105.56f, 137.131f, 704.298f, 12.0f, Element.ALIGN_LEFT); ctRight.setSimpleColumn(154.747f, 65.5776f, 577.704f, 703.88f, 12.0f, Element.ALIGN_LEFT); if (ColumnText.hasMoreText(iLeftColHasMore) || ColumnText.hasMoreText(iRightColHasMore)) { document.newPage(); Phrase pageNumTitle = new Phrase(); pageNumTitle.add(new Chunk("Page " + iPageNumber, PDFNoteUtil.NOTETYPE)); setPageHeader(writer, document, pageNumTitle, veVisit.getPatient()); iPageNumber++; } } while (ColumnText.hasMoreText(ct.go()) || ColumnText.hasMoreText(ctRight.go())); Works GREAT! Thanks for all of your help. On to a new challenge -- I'd like to have lists as part of one of the columnTexts, but have learned that that's unsupported (and I even think I understand why). But I can't seem to hack my way around it. I need the columnText magic to span pages, but I'd like to take advantage of lists (and images, etc)... I can't seem to use any indentation voodoo on the inner paragraphs as well (they all seem to be ignored when nested inside of CT?) I was thinking of trying to use a negative indent to fake it, but can't make that work. So - how does one have a multipage spanning CT (or the like) and get to use/fake numbered lists? Thanks again. Dan -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] add PdfAnnotation (form field) to a PdfTemplate
Michael Brewer-Davis wrote: > That example shows how to create a tree of form field dictionaries; is > it possible to create instead a number of widget annotations that > represent the single field? Form fields with the same fully qualified name are considered being the same field. So if you create a PdfFormField in a page event and add it to every page in the onEndPage method, your requirements are met, aren't they. Or am I missing something? Note that I didn't understand the follow-up questions. Can you look at the proposed solution and tell us if it works or if it's not an answer to what was asked. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] add PdfAnnotation (form field) to a PdfTemplate
That example shows how to create a tree of form field dictionaries; is it possible to create instead a number of widget annotations that represent the single field? It looks to me like it should be possible from the PDF spec; so the question is: (a) is that the right reading; (b) if so, is it possible from iText; (c) (more personally) would you gain anything from doing it that way? On 5/4/2010 9:58 AM, 1T3XT info wrote: > Mark Storer wrote: >> > *I'm not even sure iText will let you add the child fields properly. >> > Let's see... Ah, looks like it will, but I'm not sure about it adding to >> > multiple pages. > The problem is that you need to add parent and kids BEFORE the pages are > created. See this example: > http://itextpdf.com/examples/index.php?page=example&id=155 > > -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - > http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] embedding MOV/MP4 movies without security warning
Leonard Rosenthol wrote: > Only if you transcode the MOV/MP4 into SWF. That will also give you a LOT > more control over the playing of the media as well. That's correct. Chapter 16 of the new book isn't available yet, but as soon as it is, I suggest you compare the movie annotation example with the rich media annotation example. Rich media annotations were introduced in the Adobe developer extensions to ISO-32000-1 (Level 3), and they allow you to define much more parameters (activation, deactivation), and even rich media actions that can be triggered from events or buttons. Rich media annotation are a really cool improvement to the PDF specification (for those users who have a recent version of Adobe Reader). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] embedding MOV/MP4 movies without security warning
Only if you transcode the MOV/MP4 into SWF. That will also give you a LOT more control over the playing of the media as well. -Original Message- From: Michael Brewer-Davis [mailto:mich...@tech4learning.com] Sent: Tuesday, May 04, 2010 9:41 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] embedding MOV/MP4 movies without security warning Is there a way to embed MOV/MP4 files in my document without getting the "yellow bar" security restrictions? I'm not sure why my embedded content isn't already in the trust zone--is it the player that's untrusted? Here's my current approach: PdfFileSpecification fs = PdfFileSpecification.fileEmbedded(writer, animation.getFile().getAbsolutePath(), animation.getName(), null); writer.addAnnotation(PdfAnnotation.createScreen(writer, bounds, animation.getName(), fs, mimeType, true)); In Adobe Reader 7, this "just works"--the movie plays in its entirety when the file is opened, as requested. In Adobe Reader 9: - the yellow security bar comes up: "Some features have been disabled..." - when I select "Options/Trust this document" (one time or always), the yellow bar is dismissed but the movie does not automatically begin playing. - when I click on the movie area (which is still shown as blank), the movie begins. (On some computers, Reader crashes at this point, but I'm assuming that's a separate issue related to available codecs rather than security?) Thanks for any pointers, michael -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/ -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Ploblem with superscript and subscript
dorairaj wrote: > > Hi there, > > Can any one suggest me? Apparently not. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] PdfPTable pushing susbsequent text down when switching between landscape and portait orientation.
1T3XT info wrote: > For the moment, I haven't found a good fix for this problem. And now I (may) have a fix. This should be tested on other examples though. --- trunk/src/core/com/itextpdf/text/pdf/PdfDocument.java 2010-05-03 23:02:10 UTC (rev 4503) +++ trunk/src/core/com/itextpdf/text/pdf/PdfDocument.java 2010-05-04 17:11:28 UTC (rev 4504) @@ -1051,10 +1051,6 @@ writer.resetContent(); graphics = new PdfContentByte(writer); -text = new PdfContentByte(writer); -text.reset(); -text.beginText(); -textEmptySize = text.size(); markPoint = 0; setNewPageSizeAndMargins(); @@ -1075,8 +1071,6 @@ float oldleading = leading; int oldAlignment = alignment; -// we move to the left/top position of the page -text.moveText(left(), top()); pageEmpty = true; // if there is an image waiting to be drawn, draw it try { @@ -2173,6 +2167,12 @@ marginTop = nextMarginTop; marginBottom = nextMarginBottom; } +text = new PdfContentByte(writer); +text.reset(); +text.beginText(); +textEmptySize = text.size(); +// we move to the left/top position of the page +text.moveText(left(), top()); } -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] PdfPTable pushing susbsequent text down when switching between landscape and portait orientation.
Simon Goodfield wrote: > Below is some simple code which reproduces the problem. I identified the problem. The table causes a newPage() which internally triggers initPage(). Then you change the page size. Then you add a chapter causing another newPage(), but as no content has been added since the previous newPage(), initPage() is not (and may not be) triggered a second time. In initPage(), the "cursor" is set, causing the wrong offset (because initPage() isn't triggered using the new page size). For the moment, I haven't found a good fix for this problem. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
[iText-questions] embedding MOV/MP4 movies without security warning
Is there a way to embed MOV/MP4 files in my document without getting the "yellow bar" security restrictions? I'm not sure why my embedded content isn't already in the trust zone--is it the player that's untrusted? Here's my current approach: PdfFileSpecification fs = PdfFileSpecification.fileEmbedded(writer, animation.getFile().getAbsolutePath(), animation.getName(), null); writer.addAnnotation(PdfAnnotation.createScreen(writer, bounds, animation.getName(), fs, mimeType, true)); In Adobe Reader 7, this "just works"--the movie plays in its entirety when the file is opened, as requested. In Adobe Reader 9: - the yellow security bar comes up: "Some features have been disabled..." - when I select "Options/Trust this document" (one time or always), the yellow bar is dismissed but the movie does not automatically begin playing. - when I click on the movie area (which is still shown as blank), the movie begins. (On some computers, Reader crashes at this point, but I'm assuming that's a separate issue related to available codecs rather than security?) Thanks for any pointers, michael -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] PdfPTable pushing susbsequent text down when switching between landscape and portait orientation.
Simon Goodfield wrote: > Our site is currently running on itext 5.0.1. > > We occasionally experience a problem when the size of a table being > drawn on landscape pushes the text of the following section (which is > portait) down the page. > > Below is some simple code which reproduces the problem. Thanks for the example. I factored the Chapter out and that works, but when I use your example literally, it shows the undesired behavior you described. In other words: I was able to reproduce the problem. I'll see if I can fix it. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] add PdfAnnotation (form field) to a PdfTemplate
Mark Storer wrote: > *I'm not even sure iText will let you add the child fields properly. > Let's see... Ah, looks like it will, but I'm not sure about it adding to > multiple pages. The problem is that you need to add parent and kids BEFORE the pages are created. See this example: http://itextpdf.com/examples/index.php?page=example&id=155 -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] add PdfAnnotation (form field) to a PdfTemplate
It doesn't work that way. PdfTemplate is a wrapper for a chunk of drawing commands and resources. No annotations of any sort. Stuff To Know: *Field annotations with the same name share the same value. *They do this by sharing a common parent field that is not an annotation. *I'm not even sure iText will let you add the child fields properly. Let's see... Ah, looks like it will, but I'm not sure about it adding to multiple pages. If it doesn't work across multiple pages, come on back and I can walk you through the low level object code you'll need. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; Disclaimer DisCard = null; > -Original Message- > From: Michael Brewer-Davis [mailto:mich...@tech4learning.com] > Sent: Friday, April 30, 2010 4:11 PM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] add PdfAnnotation (form field) to a PdfTemplate > > I'm trying to add the PdfAnnotation for a PushbuttonField to a > PdfTemplate object, so that I can repeat the button on each page of a > document. > > Is this something that I can do with a PdfTemplate? Or do I need to > back up and use a PdfStamper approach? > >PdfTemplate template = writer.getDirectContent() > .createTemplate(500, 500); >PushbuttonField button = new PushbuttonField(...); >... >PdfAnnotation buttonField = button.getField(); > >// how to add? >writer.addAnnotation(buttonAnnotation); // adds to first page > >writer.releaseTemplate(template); > >writer.getDirectContent().addImage(Image.getInstance(template), ...); > > > Thanks much, > michael > > > -- > > ___ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.itextpdf.com/book/ > 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/ > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.814 / Virus Database: 271.1.1/2842 - Release Date: 04/30/10 > 04:34:00 -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Guidance on Simple way to fully embed some primary Adobe Fonts
You are incorrect. Leonard Rosenthol Adobe Systems -Original Message- From: Borgsmiller, Michael J (B4Z) [mailto:borgsmill...@y12.doe.gov] Sent: Tuesday, May 04, 2010 7:13 AM To: Post all your questions about iText here Subject: Re: [iText-questions] Guidance on Simple way to fully embed some primary Adobe Fonts All, I discovered this blurb on the Adobe website in regards to licensing their fonts. === All fonts produced by Adobe Systems can be embedded in Adobe(r) Portable Document Format (PDF) files, as well as other types of files. However, the end user license agreement for fonts from other foundries may not allow embedding, even though Adobe Acrobat(r) may be technically able to embed either the entire font or a subset of that font. To determine whether a given font can legally be embedded in a PDF document or other file, you should contact the original foundry that created the font software. http://www.adobe.com/type/embedding.html === >From the above I interpret this to contradict the need to procure PFB fonts in >order to embed them within PDF documents using iText. Apparently, if you want >to embed them in some other file format then you must pay. Please let me know if I am incorrect. Mike -Original Message- From: 1T3XT info [mailto:i...@1t3xt.info] Sent: Friday, April 30, 2010 1:35 AM To: Post all your questions about iText here Subject: Re: [iText-questions] Guidance on Simple way to fully embed some primary Adobe Fonts Borgsmiller, Michael J (B4Z) wrote: > This font set should prove sufficient for my needs: > Courier > Helvetica > Times Roman Then the AFM files aren't sufficient, you need the PFB files too if you want to embed the fonts. These PFB files aren't free (I think Adobe sells them). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/ -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/ -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] To go to a particular page in PDF
On Tue, May 4, 2010 at 5:32 AM, SRI!0! wrote: > > Hi, >I have a small problem. Iam having a PDF sitting on the file system. I > need to read the this file and I get the page number from some other > source. > Now depending on the page number I need to stream the file and go to that > particular page in PDF while its opened. > > Please let me know how to do this in itext. > >... Srikanth, what does it mean to you to "go to that particular page in PDF"? Are you saying that you want to extract a specific page programmatically, or view a particular page as a human reader? -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Guidance on Simple way to fully embed some primary Adobe Fonts
All, I discovered this blurb on the Adobe website in regards to licensing their fonts. === All fonts produced by Adobe Systems can be embedded in Adobe(r) Portable Document Format (PDF) files, as well as other types of files. However, the end user license agreement for fonts from other foundries may not allow embedding, even though Adobe Acrobat(r) may be technically able to embed either the entire font or a subset of that font. To determine whether a given font can legally be embedded in a PDF document or other file, you should contact the original foundry that created the font software. http://www.adobe.com/type/embedding.html === >From the above I interpret this to contradict the need to procure PFB fonts in >order to embed them within PDF documents using iText. Apparently, if you want >to embed them in some other file format then you must pay. Please let me know if I am incorrect. Mike -Original Message- From: 1T3XT info [mailto:i...@1t3xt.info] Sent: Friday, April 30, 2010 1:35 AM To: Post all your questions about iText here Subject: Re: [iText-questions] Guidance on Simple way to fully embed some primary Adobe Fonts Borgsmiller, Michael J (B4Z) wrote: > This font set should prove sufficient for my needs: > Courier > Helvetica > Times Roman Then the AFM files aren't sufficient, you need the PFB files too if you want to embed the fonts. These PFB files aren't free (I think Adobe sells them). -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/ -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
[iText-questions] PdfPTable pushing susbsequent text down when switching between landscape and portait orientation.
Our site is currently running on itext 5.0.1. We occasionally experience a problem when the size of a table being drawn on landscape pushes the text of the following section (which is portait) down the page. Below is some simple code which reproduces the problem. Any help would be appreciated. Thanks public static void main(String[] args) throws DocumentException { byte[] bytes = null; PdfWriter writer = null; Chapter chapter = null; Document document = new Document(PageSize.A4); ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { writer = PdfWriter.getInstance(document, baos); } catch (DocumentException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } document.open(); document.add(new Phrase("This is the first page")); document.setPageSize(PageSize.A4.rotate()); Paragraph heading = new Paragraph("First Chapter"); chapter = new Chapter(heading, 1); float[] widths = {1f}; PdfPTable table = new PdfPTable(widths); table.setSpacingBefore(10f); for (int i = 0; i < 29; i++) { table.addCell(new Phrase("This is the text !!")); } chapter.add(table); document.add(chapter); document.setPageSize(PageSize.A4); heading = new Paragraph("This has been pushed down"); chapter = new Chapter(heading, 2); document.add(chapter); document.close(); bytes = baos.toByteArray(); File file = new File("test/pushdown.pdf"); if (file.exists()) { file.delete(); } FileOutputStream fos; try { fos = new FileOutputStream(file); fos.write(bytes); fos.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } Connaught plc is a FTSE 250 company. We are the UK's leading provider of integrated services operating in the compliance, environmental, social housing and public sector markets. Please visit our website to see a full list of Connaught's Registered Companies www.connaught.plc.uk/group/aboutconnaught/registeredcompanies Disclaimer: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete this message. Connaught plc, Head Office 01392 444546 -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] To go to a particular page in PDF
What do you mean "go to that page while it is opened"? Go to it where? With iText? And then do what with it? -Original Message- From: SRI!0! [mailto:srikan...@live.in] Sent: Tuesday, May 04, 2010 3:33 AM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] To go to a particular page in PDF Hi, I have a small problem. Iam having a PDF sitting on the file system. I need to read the this file and I get the page number from some other source. Now depending on the page number I need to stream the file and go to that particular page in PDF while its opened. Please let me know how to do this in itext. Thanks, Srikanth -- View this message in context: http://old.nabble.com/To-go-to-a-particular-page-in-PDF-tp28445613p28445613.html Sent from the iText - General mailing list archive at Nabble.com. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/ -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] List Color Information in Pdf
What do you mean by "color images/objects"? ALL objects in a PDF have a colorspace and one or more color values associated with them. Are you trying to determine "color" vs. "monochrome"? If so, then you first need to determine what "monochrome" means. For example, is an RGB value of [0 0 0] color or mono? What about CMYK [0 0 0 1]? And then you need to this for all 11 different ways to specify color in a PDF. Leonard From: Selvakumar, Sivagnanam [mailto:s.selvakum...@spi-bpo.com] Sent: Monday, May 03, 2010 10:22 PM To: Post all your questions about iText here Subject: Re: [iText-questions] List Color Information in Pdf I have the requirement to list out color images/objects with page number in the pdf which may have both vector and raster objects. All the images might be in CMYK or Gray scale mode. Color values will be helpful for this? I knew this is not possible for raster images. Thanks Selvakumar From: Leonard Rosenthol [mailto:lrose...@adobe.com] Sent: Tuesday, May 04, 2010 10:30 AM To: Post all your questions about iText here Subject: Re: [iText-questions] List Color Information in Pdf Do you mean colorspaces (like RGB, CMYK, LAB) or color values ([1, 1, 1], [0,0,0,.5]) or both? For what type(s) of objects? From: Selvakumar, Sivagnanam [mailto:s.selvakum...@spi-bpo.com] Sent: Monday, May 03, 2010 8:45 PM To: itext-questions@lists.sourceforge.net Subject: [iText-questions] List Color Information in Pdf Hi All, How to list colors used in the pdf? Is it possible through iText? Thanks, Selvakumar -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
[iText-questions] To go to a particular page in PDF
Hi, I have a small problem. Iam having a PDF sitting on the file system. I need to read the this file and I get the page number from some other source. Now depending on the page number I need to stream the file and go to that particular page in PDF while its opened. Please let me know how to do this in itext. Thanks, Srikanth -- View this message in context: http://old.nabble.com/To-go-to-a-particular-page-in-PDF-tp28445613p28445613.html Sent from the iText - General mailing list archive at Nabble.com. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Ploblem with superscript and subscript
Hi there, Can any one suggest me? Thanks Dorairaj M -- View this message in context: http://old.nabble.com/Ploblem-with-superscript-and-subscript-tp28426091p28445060.html Sent from the iText - General mailing list archive at Nabble.com. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Examples in new book
John Renfrew wrote: > Found the following on geekcredential dot wordpress dot com > > Groovy thinks '/0' is a GString so need to be explicit and force it to > character > > i.e. '/0'.toCharacter().charValue() And now that I think about it, I think using '0' would also work. Can somebody test/confirm this? -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
[iText-questions] Examples in new book
Found the following on geekcredential dot wordpress dot com Groovy thinks '/0' is a GString so need to be explicit and force it to character i.e. '/0'.toCharacter().charValue() john renfrew Right Way Up Office +44 1675 475341 Fax +44 1675 475342 Mobile +44 7767 443992 -Original Message- From: John Renfrew [mailto:r...@btclick.com] Sent: 02 May 2010 09:49 To: iText-questions@lists.sourceforge.net Subject: [iText-questions] FW: Examples in new book Works a dream. Thank you. john renfrew Right Way Up Office +44 1675 475341 Fax +44 1675 475342 Mobile +44 7767 443992 -Original Message- From: Bruno Lowagie [mailto:br...@lowagie.com] Sent: 02 May 2010 07:07 To: r...@btclick.com; Post all your questions about iText here Subject: Re: [iText-questions] Examples in new book John Renfrew wrote: > I am slowly working through the examples in the new book in my context > which is Groovy from inside Filemaker and it is a much clearer piece > of writing.. Thank you. Thanks, I decided to rewrite the second edition from scratch, based on my experience teaching iText. The organization of the first book wasn't ideal to explain how iText works in a classroom. > If I use stamper = new PdfStamper(reader, new fileOutputStream(dest)); > it works but obviously loses the reader rights > > If I add the /0, true at the end it fails, which is not a happy situation /0 is the null byte. Maybe Groovy doesn't like that. > Can you give any guidance as to what the /0 should contain. It's the version number of the new PDF file that will be created by PdfStamper. For instance, if you pass '7', the PDF header will be PDF-1.7. Passing '\0' is equivalent to saying: new PdfStamper(reader, new FileOutputStream(dest), reader.getPdfVersion(), true); So if Groovy doesn't like '\0', you can replace it with reader.getPdfVersion(). -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/ -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Changes in the samples
JG Disenador Multimedia wrote: > If there is a bug on the Java code, the debugger show me a bug. > The debugger is not showing me nothing, seems to be correct. Yet, you are experiencing a problem. Hence there's a bug in your code, one that is overlooked when you use the debugger. > If I change the name of the document which is saved. I have recompiled > the file again, the compiled file is still saving with the old document > name. Surely the debugger can show you the value of the variables. I'm 99% the debugger is reflecting the reality. For instance that you're not using the "recompiled code", but the old code (maybe you have the wrong CLASSPATH, or you're using the wrong .class file). > But let me get familiar with Java, iText, and applets, that invokes java > methods from javascript Start with a standalone Java class using iText. Don't jump to using applets and Java/JavaScript communication. Applets can be cached, which would explain why the "new code" isn't used. Everything you say in this mail confirms that this is not a problem caused by iText, but that the cause of the problem is that you're trying to run before you've learned to walk. If the standalone Java application using iText works, then the problem is elsewhere, outside iText. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Changes in the samples
Hi, I think is not needed print the code, to know what is happening. If there is a bug on the Java code, the debugger show me a bug. The debugger is not showing me nothing, seems to be correct. The example is a file wich is signing a document. If I change the name of the document which is saved. I have recompiled the file again, the compiled file is still saving with the old document name. But let me get familiar with Java, iText, and applets, that invokes java methods from javascript Regards. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Javascript Disable issue
PavanBellala wrote: > Hi, > > There is no PRINT in PdfAction, only PRINTDIALOG is avialable. Can you > please let me know how to fire off print menu item using iText or anyother > way to print without adding javascript. As far as I remember, Adobe's PDF Technical Standards Evangelist explained in very clear words that "firing off" the print menu is IMPOSSIBLE if JavaScript is disabled, regardless if you're using iText or not. So either your customer ENABLES JavaScript and gains functionality, or your customer DISABLES JavaScript and LOSES functionality. It's his choice, not yours, not iText's, not anyone else's. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Merging PDF and a HTML
Thank you. I was able to merge using HTMLWorker. Now I am trying to use TextMarginFinder. 1T3XT info wrote: > > Gaba wrote: >> Hi >> >> I have a requirement where I need to merge a PDF with dynamically >> generated >> HTML content from Rich Text Area.The HTML content is stored in a String >> variable. The formatting of the content in the HTML has to be preserved >> while merging. For e.g. if text in HTML is bold, red in color and >> italics, >> it should be merged to PDF with the formatting. > > Use HTMLWorker. > >> Moreover the html content >> should be one line below the last paragraph in the PDF. I don't want to >> add >> a new page. Content should wrap at the end of line and should rollover to >> new page if it cannot fit an existing page. > > Use TextMarginFinder (will only work if you don't have a text footer, > otherwise you'll find the baseline position of the footer). > >> Creating a new PDF after merging existing pdf and the html file is fine. > > No, it's not. Use PdfStamper and ColumnText to add the new content. > -- > This answer is provided by 1T3XT BVBA > http://www.1t3xt.com/ - http://www.1t3xt.info > > -- > ___ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.itextpdf.com/book/ > 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://old.nabble.com/Merging-PDF-and-a-HTML-tp28392422p28437992.html Sent from the iText - General mailing list archive at Nabble.com. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/
Re: [iText-questions] Javascript Disable issue
Hi, There is no PRINT in PdfAction, only PRINTDIALOG is avialable. Can you please let me know how to fire off print menu item using iText or anyother way to print without adding javascript. I tried by adding PdfAction to PdfWriter object as follows PdfAction action = new PdfAction(PdfAction.PRINTDIALOG); pdfwriter.setAdditionalAction(PdfName.DOCUMENT_CLOSE, action); The above code is not working if we disable javascript preference in pdf. Is there anyway we can print pdf using iText with disabling javascript in pdf ..I got strucked here..Please help me as this is urgent requirement for my customer..Thanks Mark Storer-2 wrote: > > IIRC, you can set the action to fire off any menu item without script... > I don't recall the name of the print menu item off the top of my head... > > > > Ah! iText supports it directly. Use this instead of your JS action: > > > > new PdfAction( PdfAction.PRINT ) // or PdfAction.PRINTDIALOG > > > > That works out to "Print" and... Ugh... PRINTDIALOG is a JS action. > That settles that. > > > > --Mark Storer > > Senior Software Engineer > > Cardiff.com > > > > import legalese.Disclaimer; > > Disclaimer DisCard = null; > > > > > > From: pavan kumar [mailto:bpavan...@gmail.com] > Sent: Friday, April 30, 2010 2:43 AM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Javascript Disable issue > > > > Hi, > > > > In our application we are using iText to create PDF and print by adding > javascript. Currently due to security reasons one of my client disabling > javascript in PDF and requesting to provide print functionality for the > PDF where the javascript is disabled. Does iText provide any API to > enable javascript and disable javascript ? (I did see > PdfViewerPreferences to set and get preferences but there is no > preference related javascript), So that in our application we can > enable javascript before print and disable after print.If not is there > anyway to print PDF using iText without adding javascript. Please let me > know. > > > > Thanks > > Pavana Kumar Bellala. > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.814 / Virus Database: 271.1.1/2842 - Release Date: 04/30/10 > 04:34:00 > > > -- > > ___ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.itextpdf.com/book/ > 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://old.nabble.com/Javascript-Disable-issue-tp28410760p28441805.html Sent from the iText - General mailing list archive at Nabble.com. -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/