.
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-questions] Modifying Metadata
At 2:33 PM -0800 3/19
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
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
-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 wrote:
The filters are not modified
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
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, yup - I could see that as a problem...
Do you read the entire
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 other
modifications to this PDF file. I need to do this in Java.
I found the iText API very
: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 are all empty.
2
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.
]'
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 what you should be doing...
I found
: 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 recent
experiments with modifying
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
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
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
PROTECTED];
itext-questions
[EMAIL PROTECTED]
Sent: Wednesday, 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
: Wednesday, 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 implemented
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 them without
modifying the library... :(
-Matt
in
the package
com.lowagie.text.pdf.
Best Regards,
Paulo Soares
-Original Message-
From: Matt Benson [SMTP:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 15:36
To: Paulo Soares; itext-questions
Subject:Re: [iText-questions] modifying metadata
Except
:[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 shouldn't be until
July...
Thanks,
Matt
--- Paulo Soares
.
Best Regards,
Paulo Soares
-Original Message-
From: 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
,
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
Wait! You lost me... what?
-Matt
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
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
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[]
Message -
From: Matt Benson [EMAIL PROTECTED]
To: Leonard Rosenthol [EMAIL PROTECTED]; Paulo Soares
[EMAIL PROTECTED]; itext-questions
[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 20:59
Subject: RE: [iText-questions] modifying metadata
Okay, I am STUCK. I can play with XMP/RDF, that's
And now you have a stream as a direct object, which is illegal.
Best Regards,
Paulo Soares
- Original Message -
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
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 format
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
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 metadata
I have pdfs created
, 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 with attributes
like pdf:Title. I want to modify these pdfs'
metadata. I know I should be able to create
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
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 grammar
-questions
Subject:[iText-questions] modifying metadata
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
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
34 matches
Mail list logo