I'm not proposing to actually generate the metadata, that's application specific after all. PDF/X compatibility requires at least metadata and a couple of other key and that's what I'm supporting: put/get metadata and the other keys. It's still the responsability of the 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 > > Wait! You lost me... what? > > -Matt > > --- Paulo Soares <[EMAIL PROTECTED]> wrote: > > Well, I'll do even better (this sounds like those TV > > commercials to sell > > super frying pans), I'll add insertion/extraction of > > metadata in the library > > and you'll also get (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 > > > 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 <[EMAIL PROTECTED]> wrote: > > > > They will be public in the next version together > > > > with some others. If you > > > > don't want to mess with the library put your > > code 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 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 > > > > > > > > > > --- Matt Benson <[EMAIL PROTECTED]> wrote: > > > > > > Oops. :) Okay, thanks for the solution, > > Paulo! > > > > > > > > > > > > -Matt > > > > > > > > > > > > > > > > > > --- Paulo Soares <[EMAIL PROTECTED]> > > wrote: > > > > > > > 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] 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 as > > always > > > > > > > returning > > > > > > > > null. I didn't know why that should be, > > so > > > > I > > > > > > > changed > > > > > > > > it. It was: > > > > > > > > > > > > > > > > public byte[] toPdf(PdfWriter > > writer) { > > > > > > > > dicBytes = super.toPdf(writer); > > > > > > > > return null; > > > > > > > > } > > > > > > > > > > > > > > > > but I changed it to: > > > > > > > > > > > > > > > > public byte[] toPdf(PdfWriter > > writer) { > > > > > > > > dicBytes = super.toPdf(writer); > > > > > > > > return dicBytes; > > > > > > > > } > > > > > > > > > > > > > > > > and it seems to work now. > > > > > > > > > > > > > > > > > > > > > > > > -Matt > > > > > > > > > > > > > > > > --- Matt Benson <[EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > 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 zones! > > :) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Matt Benson <[EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > > 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.BufferedOutputStream; > > > > > > > > > > import > > java.io.ByteArrayOutputStream; > > > > > > > > > > > > > > > > > > > > import com.lowagie.text.pdf.PdfName; > > > > > > > > > > import > > com.lowagie.text.pdf.PRStream; > > > > > > > > > > import > > com.lowagie.text.pdf.PdfObject; > > > > > > > > > > import > > com.lowagie.text.pdf.PdfReader; > > > > > > > > > > import > > com.lowagie.text.pdf.PdfStream; > > > > > > > > > > import > > com.lowagie.text.pdf.PdfStamper; > > > > > > > > > > import > > > > com.lowagie.text.pdf.PdfDictionary; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > public class > > MinimalModifyPdfMetadata > > > > > > > > > > { > > > > > > > > > > > > > > > > > > > > public byte[] > > modifyMetadata(String > > > > pdf) > > > > > > > > > > throws Exception > > > > > > > > > > { > > > > > > > > > > ByteArrayOutputStream baos = new > > > > > > > > > > ByteArrayOutputStream(); > > > > > > > > > > > > > > > > > > > > PdfReader pdfReader = new > > > > > > PdfReader(pdf); > > > > > > > > > > byte[] b = > > > > > > > > > > > > > > > > > > > > > > === message truncated === > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Web Hosting - establish your business online > http://webhosting.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions