RE: [iText-questions] Modifying Metadata

2003-03-20 Thread Paulo Soares
20, 2003 17:22 > To: Paulo Soares; '[EMAIL PROTECTED]' > Subject: RE: [iText-questions] Modifying Metadata > > At 5:02 PM + 3/20/03, Paulo Soares wrote: > > I think that the problem was the use of the same file to read and > >write. > > Ah,

RE: [iText-questions] Modifying Metadata

2003-03-20 Thread Leonard Rosenthol
At 5:02 PM + 3/20/03, Paulo Soares wrote: I think that the problem was the use of the same file to read and write. Ah, yup - I could see that as a problem... > Do you read the entire stream into memory and then write it back out, or do "block" I/O?And why modify/read ANY object

RE: [iText-questions] Modifying Metadata

2003-03-20 Thread Paulo Soares
> -Original Message- > From: Leonard Rosenthol [SMTP:[EMAIL PROTECTED] > Sent: Thursday, March 20, 2003 16:21 > To: Paulo Soares; '[EMAIL PROTECTED]' > Subject: RE: [iText-questions] Modifying Metadata > > At 4:09 PM + 3/20/03, Paulo Soares wro

RE: [iText-questions] Modifying Metadata

2003-03-20 Thread Leonard Rosenthol
At 4:09 PM + 3/20/03, Paulo Soares wrote: The filters are not modified, for streams it does a straight copy, only the strings may look different. The objects are also renumbered. Then that should work fine for what the person was attempting to accomplish. Any idea why he was seeing "

RE: [iText-questions] Modifying Metadata

2003-03-20 Thread Paulo Soares
> -Original Message- > From: Leonard Rosenthol [SMTP:[EMAIL PROTECTED] > Sent: Thursday, March 20, 2003 15:39 > To: Paulo Soares; '[EMAIL PROTECTED]' > Subject: RE: [iText-questions] Modifying Metadata > > At 11:23 AM + 3/20/03, Paulo Soa

RE: [iText-questions] Modifying Metadata

2003-03-20 Thread Leonard Rosenthol
At 11:23 AM + 3/20/03, Paulo Soares wrote: Well, as iText is becoming a pdf swiss knife, lacking support to append information is a flaw that must be taken care of. I'll see this weekend how to add the info without reading all the document. These are two VERY different issues, IMO. The first

RE: [iText-questions] Modifying Metadata

2003-03-20 Thread Paulo Soares
erent. Best Regards, Paulo Soares > -Original Message- > From: Leonard Rosenthol [SMTP:[EMAIL PROTECTED] > Sent: Thursday, March 20, 2003 1:14 > To: Kishore Subramanian; '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Subject: RE: [iText-qu

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Leonard Rosenthol
At 2:33 PM -0800 3/19/03, Kishore Subramanian wrote: Actually I noticed that the contents of the file has been modified. When I open the generated file in Notepad, I can see some ascii values (the original file has non-printable binary characters .. which is expected). Can you send me an example

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Leonard Rosenthol
At 3:18 PM -0800 3/19/03, Kishore Subramanian wrote: Is it possible to update just the metadata without having to re-write the contents of the file ? Are there any APIs that will allow me to do this ? Yes, but none in "pure Java" that I would recommed. Try something like APSetInfo (http://www.

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Kishore Subramanian
: Matt Benson [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 19, 2003 2:39 PM To: Kishore Subramanian; 'Leonard Rosenthol'; '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: RE: [iText-questions] Modifying Metadata One reason things might look different: in my rec

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Matt Benson
he > MetaData without modifying the Contents. Can you > point me to any such APIs that can do this ? > > Thanks in advance. > Kishore > > > > -Original Message- > From: Leonard Rosenthol > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 19, 2003 1:50 PM >

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Kishore Subramanian
[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Subject: RE: [iText-questions] Modifying Metadata At 1:39 PM -0800 3/19/03, Kishore Subramanian wrote: >1) Is it possible to write/change the Metadata without affecting the >contents of the original PDF file ? Yes, that is w

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Leonard Rosenthol
At 1:39 PM -0800 3/19/03, Kishore Subramanian wrote: 1) Is it possible to write/change the Metadata without affecting the contents of the original PDF file ? Yes, that is what you should be doing... I found that after writing the metadata with the sample code, the file size is now different. Is

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Kishore Subramanian
:19 AM To: 'Paulo Soares'; '[EMAIL PROTECTED]' Subject: RE: [iText-questions] Modifying Metadata I tried the following code. The metadata gets added correctly but i noticed the follg: 1) The contents of the file are now gone. The PDF still has the same # of pages but pages a

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Kishore Subramanian
- From: Paulo Soares [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 19, 2003 2:53 AM To: 'Kishore Subramanian'; '[EMAIL PROTECTED]' Subject: RE: [iText-questions] Modifying Metadata Matt's thread was about the xml metadata not the metadata that goes into the Info

RE: [iText-questions] Modifying Metadata

2003-03-19 Thread Paulo Soares
nt: Wednesday, March 19, 2003 1:55 > To: '[EMAIL PROTECTED]' > Subject: [iText-questions] Modifying Metadata > > Hi, > > Iam facing a problem where I need to modify the metadata (for instance, > the "Keywords") of an existing PDF file without making any o

[iText-questions] Modifying Metadata

2003-03-18 Thread Kishore Subramanian
Hi,   Iam facing a problem where I need to modify the metadata (for instance, the "Keywords") of an existing PDF file without making any other modifications to this PDF file. I need to do this in Java.   I found the iText API very intuitive to set the meta data on a new PDF file. But I was

RE: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
AIL PROTECTED] > > Sent: Thursday, March 13, 2003 15:54 > > To: Paulo Soares; itext-questions > > Subject:RE: [iText-questions] modifying metadata > > > > Wait! You lost me... what? > > > > -Matt > > > > --- Paulo Soares <[EMAIL P

RE: [iText-questions] modifying metadata

2003-03-13 Thread Paulo Soares
e user to have only legal, compatible objects. Best Regards, Paulo Soares > -Original Message- > From: Matt Benson [SMTP:[EMAIL PROTECTED] > Sent: Thursday, March 13, 2003 15:54 > To: Paulo Soares; itext-questions > Subject: RE: [iText-questions] modifying metadata >

RE: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
(some form) of PDF/X > compatibility for free. > > Best Regards, > Paulo Soares > > > -Original Message- > > From: Matt Benson [SMTP:[EMAIL PROTECTED] > > Sent: Thursday, March 13, 2003 15:42 > > To: Paulo Soares; itext-questions > >

RE: [iText-questions] modifying metadata

2003-03-13 Thread Paulo Soares
om: Matt Benson [SMTP:[EMAIL PROTECTED] > Sent: Thursday, March 13, 2003 15:42 > To: Paulo Soares; itext-questions > Subject: RE: [iText-questions] modifying metadata > > I'll modify as long as I know I can have them by the > time I go to production, which shou

RE: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
lt;[EMAIL PROTECTED]> wrote: > > > > And now you have a stream as a direct object, > > > which > > > > is illegal. > > > > > > > > Best Regards, > > > > Paulo Soares > > > > > > > > - Original Message -

RE: [iText-questions] modifying metadata

2003-03-13 Thread Paulo Soares
ch 13, 2003 15:36 > To: Paulo Soares; itext-questions > Subject: Re: [iText-questions] modifying metadata > > Except that when I tried your solution, I found that > PdfIndirectReference and PdfWriter.addToBody() are > both package-private so I can't get to

Re: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
> From: "Matt Benson" <[EMAIL PROTECTED]> > > To: "Paulo Soares" <[EMAIL PROTECTED]>; > > "itext-questions" > > <[EMAIL PROTECTED]> > > Sent: Wednesday, March 12, 2003 23:11 > > Subject: RE: [iText-questions] modifying metadata

Re: [iText-questions] modifying metadata

2003-03-13 Thread Matt Benson
n" <[EMAIL PROTECTED]> > To: "Paulo Soares" <[EMAIL PROTECTED]>; > "itext-questions" > <[EMAIL PROTECTED]> > Sent: Wednesday, March 12, 2003 23:11 > Subject: RE: [iText-questions] modifying metadata > > > > Okay, I think I found

Re: [iText-questions] modifying metadata

2003-03-12 Thread Paulo Soares
nesday, March 12, 2003 23:11 Subject: RE: [iText-questions] modifying metadata > Okay, I think I found it. Of course using PRStream > wouldn't be any better than PdfStream because PRStream > extends PdfStream and doesn't override toPdf(). > PdfStream.toPdf() is implement

Re: [iText-questions] modifying metadata

2003-03-12 Thread Paulo Soares
blic in the next version. Best Regards, Paulo Soares - Original Message - From: "Matt Benson" <[EMAIL PROTECTED]> To: "Leonard Rosenthol" <[EMAIL PROTECTED]>; "Paulo Soares" <[EMAIL PROTECTED]>; "itext-questions" <[EMAIL PROTECTED]>

RE: [iText-questions] modifying metadata

2003-03-12 Thread Matt Benson
Okay, I think I found it. Of course using PRStream wouldn't be any better than PdfStream because PRStream extends PdfStream and doesn't override toPdf(). PdfStream.toPdf() is implemented as always returning null. I didn't know why that should be, so I changed it. It was: public byte[] toPd

RE: [iText-questions] modifying metadata

2003-03-12 Thread Matt Benson
One obvious problem is that this example was using PdfStream, which always returns null from toPdf. However, I had already been using PRStream before that with the same results. I am going back to PRStream in the debugging to which I have been forced to turn, due to the terrible problem of time z

RE: [iText-questions] modifying metadata

2003-03-12 Thread Matt Benson
Okay, I am STUCK. I can play with XMP/RDF, that's fine, and I've been doing it. But I am finding myself unable to actually change the metadata of a given PDF. I have culled together a fairly short example; can anyone see any obvious problems? import java.io.FileOutputStream; import java.io.Buf

RE: [iText-questions] modifying metadata

2003-03-11 Thread Matt Benson
Dunno, I tried Jena without success, possibly I should try a little longer with it, but it almost seems easiest to go with generic XML parsing. Thanks, Leonard. -Matt --- Leonard Rosenthol <[EMAIL PROTECTED]> wrote: > At 03:00 PM 3/10/2003 -0800, Matt Benson wrote: > >Is XMP the only valid forma

RE: [iText-questions] modifying metadata

2003-03-10 Thread Leonard Rosenthol
At 03:00 PM 3/10/2003 -0800, Matt Benson wrote: Is XMP the only valid format for the Metadata stream? Yes. What means would you suggest for reading this? The Adobe XMP Toolkit is the best, but that assumes Mac OS or Windows. Since it's XML you can really use any XML parser you

RE: [iText-questions] modifying metadata

2003-03-10 Thread Matt Benson
tt Benson [SMTP:[EMAIL PROTECTED] > > Sent: Monday, March 10, 2003 17:34 > > To: itext-questions > > Subject:[iText-questions] modifying metadata > > > > I have pdfs created with Acrobat Distiller from > MSWord > > whose metadata is specified as XML

Re: [iText-questions] modifying metadata

2003-03-10 Thread Matt Benson
Thanks for the info, Leonard! -Matt --- Leonard Rosenthol <[EMAIL PROTECTED]> wrote: > At 9:33 AM -0800 3/10/03, Matt Benson wrote: > >I have pdfs created with Acrobat Distiller from > MSWord > >whose metadata is specified as XML with attributes > >like pdf:Title. > > It's based on an XML

Re: [iText-questions] modifying metadata

2003-03-10 Thread Leonard Rosenthol
At 9:33 AM -0800 3/10/03, Matt Benson wrote: I have pdfs created with Acrobat Distiller from MSWord whose metadata is specified as XML with attributes like pdf:Title. It's based on an XML grammar called XMP, which is based on RDF. Adobe has LOTS of info and an SDK available at

RE: [iText-questions] modifying metadata

2003-03-10 Thread Matt Benson
age- > > From: Matt Benson [SMTP:[EMAIL PROTECTED] > > Sent: Monday, March 10, 2003 17:34 > > To: itext-questions > > Subject:[iText-questions] modifying metadata > > > > I have pdfs created with Acrobat Distiller from > MSWord > > who

RE: [iText-questions] modifying metadata

2003-03-10 Thread Paulo Soares
PdfStamper outputs the contents of a PdfReader including the modifications. Best Regards, Paulo Soares > -Original Message- > From: Matt Benson [SMTP:[EMAIL PROTECTED] > Sent: Monday, March 10, 2003 17:34 > To: itext-questions > Subject: [iText-questions] modifying

[iText-questions] modifying metadata

2003-03-10 Thread Matt Benson
I have pdfs created with Acrobat Distiller from MSWord whose metadata is specified as XML with attributes like pdf:Title. I want to modify these pdfs' metadata. I know I should be able to create an entirely new Document and import pages, but I want to preserve the original content as closely as p