Re: [iText-questions] Adding PageLabels directly to the PDF catalog dictionary

2008-09-28 Thread dayvidpow
> You could do catalog.put(PdfName.PAGELABELS, pagelabeldictionary); > where pagelabeldictionary is a PdfDictionary containing the stuff > as described in the PDF Reference. That is exactly what i am trying to do. I have a PdfPageLabels object containing the custom page labels i want to add to th

Re: [iText-questions] Adding PageLabels directly to the PDF catalog dictionary

2008-09-28 Thread dayvidpow
>You don't have access to the catalog when using PdfWriter; >you can only add your PageLabels dictionary in PdfReader/PdfStamper >combinations. >By the way: why would you like to avoid using setPageLabels()? Because we are not using PdfStamper. Instead the catalog is obtained via PdfReader , then

[iText-questions] Adding PageLabels directly to the PDF catalog dictionary

2008-09-26 Thread dayvidpow
Is it possible to add PageLabels references directly to the PDF catalog dictionary without using the built-in method PdfWriter.setPageLabels() ? If so , how can this be done ? a small code snippet would help here. Thanks. -- View this message in context: http://www.nabble.com/Adding-PageLab

[iText-questions] Auto Truncating Paragraphs

2008-09-13 Thread dayvidpow
I am adding several large paragraphs of text of varying length to a ColumnText object. However, I would like the paragraphs that contains more than 5 lines of text to be automatically truncated after 5 lines (i.e. only the 1st 5 lines of text in the paragraph should be rendered to the ColumnText).

Re: [iText-questions] How-to avoid "expected end of color space" error

2008-09-04 Thread dayvidpow
Leonard Rosenthol wrote: > >> Yes, that is caused by the image attributes dictionary not matching >> the actual image data. For example, you say that it's a CMYK image, >> but only give it RGB data... > Actually, I am simply getting the Image from a file and adding it to the contentBytye.

[iText-questions] How-to avoid "expected end of color space" error

2008-09-04 Thread dayvidpow
Hello, I am adding a colored image to a PDF document using itext , however when i attempt to open the resulting PDF in Adode Reader , I am getting an ERROR message in dialog which says "Expected end of color space" . The PDF still opens but the image is not displayed in the PDF document. Anyone k

[iText-questions] Help with Paragraph.setIndentationLeft() and ColumnText object

2008-09-02 Thread dayvidpow
I am trying to set the indentation of a paragraph by calling the setIndentationLeft() on a paragraph then adding the paragraph to the ColumnText object. However, when i do that I am not getting any indentation in the resulting PDF. Is this supported by the ColumnText object? See my code sample bel

Re: [iText-questions] Adding custom properties to PDF

2008-05-22 Thread dayvidpow
>The easiest way is to put your data as extra keys in the info dictionary. If >you want it more "hidden" they can go to the catalog dictionary. Are there any sample / example code as to how to accomplish this? -- View this message in context: http://www.nabble.com/Adding-custom-properties-t

[iText-questions] Adding custom properties to PDF

2008-05-22 Thread dayvidpow
Is there a way to add custom properties to a PDF using iText? Basically i am seeking a way to set some custom properties (e.g. pageLabelsUpdated = 'Y', urlsUpdated = 'N' , etc) in a new PDF document. Then later I want to be able to retrieve/check the custom properties in the PDF and perform cer

[iText-questions] Changing Page Numbers on the PDF Pages Tab

2008-05-19 Thread dayvidpow
I would like to know if it is possible to use iText to change the "Page Numbers" which are displayed below each "Page Thumbnail Image" on the PDF Pages Tab (when the PDF is viewed using Acrobat Reader) ? If so how can it be done ? Please see the attached image from a PDF showing exactly what i am

[iText-questions] Extracting Images from PDF using iText

2008-03-26 Thread dayvidpow
Hi iText gurus, I would like to know if iText provides any support for extracting images from an existing PDF document? If so, could someone please point me to an example or some sample code as to how this maybe done? If not, please feel free to suggest some other tool or API that maybe used to ac

Re: [iText-questions] Re moving PdfStructureTreeRoot from Tagged PDF

2008-01-24 Thread dayvidpow
How can i get to the /StructParents key, page dictionary, the /MarkInfo, the /StructTreeRoot keys and the catalog. In other words how can I get the markers from the the content stream? This is uncharted water for me. So could you please be a bit more specific as to how to accomplish this usi

Re: [iText-questions] Re moving PdfStructureTreeRoot from Tagged PDF

2008-01-23 Thread dayvidpow
Paulo Soares wrote: > >>You'll have to remove the /StructParents key from the page dictionary and >>the /MarkInfo and the /StructTreeRoot keys from the catalog. The markers in >>the content stream don't need to be removed. > This is uncharted water for me. So could you please be a bit more s

[iText-questions] Re moving PdfStructureTreeRoot from Tagged PDF

2008-01-22 Thread dayvidpow
Is there a method to remove the PdfStructureTreeRoot and PdfStructureElements from an existing Tagged PDF? Basically, i am trying to import pages from an existing image-based PDF and discard any PdfStructureTreeRoot and PdfStructureElements in the page, then add the imported pages to a new PDF do

Re: [iText-questions] Phrase containing Chunks/Phrase with multiple Run Directions

2007-12-11 Thread dayvidpow
t-to-right even in the middle of a right-to-left paragraph in Arabic). THE SOLUTION: Split the mix language string into substring containing text with LTR and RTL run directions and then add the Unicode Left-to-Right mark character '\u200E' to each RTL substring. David dayvidpow wr

Re: [iText-questions] Phrase containing Chunks/Phrase with multiple Run Directions

2007-12-07 Thread dayvidpow
David Paulo Soares wrote: > > You must call columnText.setRunDirection(PdfWriter.RUN_DIRECTION_RTL) or > columnText.setRunDirection(PdfWriter.RUN_DIRECTION_LTR). > > Paulo > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PRO

Re: [iText-questions] Phrase containing Chunks/Phrase with multiple Run Directions

2007-12-05 Thread dayvidpow
Soares wrote: > > You can mix English and Arabic text in the same line and both will work > correctly. You may use the alignment LTR. Both texts must be in the same > Paragraph. > > Paulo > >> -Original Message----- >> From: [EMAIL PROTECTED] >> [mailt

Re: [iText-questions] Phrase containing Chunks/Phrase with multiple Run Directions

2007-12-04 Thread dayvidpow
ligned, both with no wrap > set. > > Paulo > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On >> Behalf Of dayvidpow >> Sent: Monday, December 03, 2007 6:31 PM >> To: itext-questions@lists.sourceforge.

[iText-questions] Phrase containing Chunks/Phrase with multiple Run Directions

2007-12-03 Thread dayvidpow
Currently, in iText I can create a new Phrase object with a main font and then within the Phrase I can have additional Chunks or Phrases with different fonts. Therefore, likewise would it be possible to create a Phrase with a main run direction and then add additional Chunks or Phrases to it with

[iText-questions] Re ndering Left-to-Right and Right-to-Left langauge text on the same line

2007-11-29 Thread dayvidpow
Can anyone say if it is possible to render some text in a left-to-right language such as english on a line in a ColumnText, then on the same line render some text in a right-to-left language such as Arabic? e.g. "This is the English text run direction left-to-right" / "This is arabic text run

Re: [iText-questions] Problems Using ColumnText with PdfStamper

2007-09-12 Thread dayvidpow
>If your ColumnText object says there's still more text, >then that's what you should do. Thanks Bruno, I got it to work. The problem was - I was creating a new ColumnText object for each new page inserted using PdfStamper. However, I changed it to continue using the old ColumnText Object but set

[iText-questions] Problems Using ColumnText with PdfStamper

2007-09-11 Thread dayvidpow
I am attempting to use PdfStamper to insert new cover pages at the begin of an Existing PDF with bookmarks, annotations, etc. There may be one or more cover pages inserted depending on the amount of text that must be added to the cover page(s). I am using the following code to get a ColumnText to

[iText-questions] How to add Arabic text to a PDF

2007-07-19 Thread dayvidpow
How can i add Arabic text to a PDF and have it displayed in the PDF ?. Currently i am using the following code however, this does not display the Arabic characters: BaseFont bf = BaseFont.createFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252, BaseFont.EMBEDDED); column.addText(new Phrase(LINE_LEADI

[iText-questions] Word breaks and Tagged PDF content

2007-07-12 Thread dayvidpow
I am creating a tagged PDF document using the iText 2.0 tagging features. First I begin a marked-content-sequence then loop thru a list of words and add each word to the PdfContentByte at a fixed coordinate position. I am adding all the words within a paragraph tag container . The problem is all t

Re: [iText-questions] How to use bookmark xml and new PDF documents

2007-07-10 Thread dayvidpow
opRef); > > Paulo > > - Original Message - > From: "dayvidpow" <[EMAIL PROTECTED]> > To: > Sent: Friday, July 06, 2007 4:54 PM > Subject: [iText-questions] How to use bookmark xml and new PDF documents > > >> >> Currently I am using the

[iText-questions] How to use bookmark xml and new PDF documents

2007-07-06 Thread dayvidpow
Currently I am using the following to add some bookmarks to an existing PDF: PdfStamper.setOutlines(SimpleBookmark.importFromXML(new ByteArrayInputStream(bookmarks.buildXml().getBytes(; The above is working just fine, however I need to add the same bookmarks to a new PDF I am creating from s

Re: [iText-questions] How-to Perform Incremental Update of existing PDF

2007-07-02 Thread dayvidpow
> You have to use a special constructor for PdfStamper: > public PdfStamper(PdfReader reader, > OutputStream os, > char pdfVersion, > boolean append) > with append = true, see: > http://itext.ugent.be/library/api/com/lowagie/text/pdf/PdfStamper

[iText-questions] How-to Perform Incremental Update of existing PDF

2007-07-01 Thread dayvidpow
Anyone knows how to perform Incremental Update of an existing PDF using iText? Are there any resources or samples available that shows how to perform incremental update of an existing PDF? -- View this message in context: http://www.nabble.com/How-to-Perform-Incremental-Update-of-existing-PDF-

Re: [iText-questions] Generating Tagged PDF file using PdfStamper

2007-05-14 Thread dayvidpow
> Tagging content in newly created PDFs is explained in section F.3.2 > of the book. You have to use beginMarkedContentSequence and > endMarkedContentSequence, and so on... > But to make this work for specific pieces of text added > to an existing PDF, you'll have to adapt iText. > br, > Bruno I

Re: [iText-questions] Generating Tagged PDF file using PdfStamper

2007-05-14 Thread dayvidpow
> Was my email not clear enough about the description of what tagging > is? Did it not give you a clear indication of what is required? If > there was something in my description that wasn't clear to you, > please let me know what it is and I will be happy to go into more > detail. Yo

Re: [iText-questions] Generating Tagged PDF file using PdfStamper

2007-05-11 Thread dayvidpow
"Tagged" PDF file. If tagged pdf files cannot be generated using the PdfStamper class, then what other options exist to accomplish ? There must be some work-around ? Leonard Rosenthol wrote: > > On May 11, 2007, at 1:43 PM, dayvidpow wrote: >> How much work are we

Re: [iText-questions] Generating Tagged PDF file using PdfStamper

2007-05-11 Thread dayvidpow
k to implement > it. > > Paulo > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On >> Behalf Of dayvidpow >> Sent: Friday, May 11, 2007 3:39 PM >> To: itext-questions@lists.sourceforge.net >> Su

[iText-questions] Generating Tagges PDF file using PdfStamper

2007-05-11 Thread dayvidpow
I am trying to read an existing PDF document and modify the document using PdfStamper. Modification involves inserting hidden text into PDF document and generate a Tagged PDF file as output. Below is the code used to read in the PDF and then create the PdfStamper object, then and call setTagged(

[iText-questions] How to add a Paragraph to existing PDF using PdfStamper ?

2007-04-20 Thread dayvidpow
How can I add an iText Paragraph to an existing PDF document? I am using PdfStamper to add the bookmarks, but I am not seeing how I can use this same PdfStamper class to add a Paragraph to a page. All the examples I have seen on the site add Paragraphs to a Document object using document.add(parag

[iText-questions] Inserting Text in PDF documents at Download time

2007-04-20 Thread dayvidpow
I am working on a web application that allow users to download PDF documents. I would like to insert the Downloaded Date/timestamp on the cover page of every PDF document at download time. What is the recommended/best approach to achieve this using iText API ? My initial thought is to use PdfSta

[iText-questions] HELP Adding bookmarks to Existing PDF using PdfStamper ?

2007-04-12 Thread dayvidpow
I have an existing PDF document which does not contain any bookmarks. I am currently using PdfStamper to manipulate the PDF and insert text, image etc. The text insertion portion is working correclty. But Now I wish to also add bookmarks (outlines) to the PDF using the same PdfStamper object, howe

[iText-questions] Out-of-the-Box iText Tool to extract Pages from an existing PDF

2007-04-12 Thread dayvidpow
Are there any tools provided by iText that will allow me to quickly extract a specified number range of pages from a large existing PDF document and output to a new PDF document containing only the specified pages.?? I was thinking about using the PdfCopy class for this David -- View t

Re: [iText-questions] HELP Using PdfSignatureAppearance.fitText(...)

2007-04-10 Thread dayvidpow
a value 50 is 50% shrinken > text. > You'll also need BaseFont.getWidthPoint() to know the width without > scaling. > > Paulo > > - Original Message - > From: "dayvidpow" <[EMAIL PROTECTED]> > To: > Sent: Monday, April 09, 2007 7:10 PM

Re: [iText-questions] HELP Using PdfSignatureAppearance.fitText(...)

2007-04-09 Thread dayvidpow
What is the purpose of 'scale' parameter in setHorizontalScaling(float scale). ? what value should this paramter be set to? David Paulo Soares wrote: > > It would help if you followed up the answers instead of starting new > questions. If you look at fitsText() documentation you'll see that

Re: [iText-questions] Using PdfSignatureAppearance.fitText(...) with converted values

2007-04-09 Thread dayvidpow
Yes i am doing floating point maths. All my variables are indeed primitive float type. David Brian McKeever wrote: > > On 4/8/07, David Powell <[EMAIL PROTECTED]> wrote: >> I have a list of words and the coordinates (i.e. llx,lly, urx, ury) of >> the >> position of each word in the PDF. The co