PdfStream xmp = new PdfStream("xmp
text".getBytes("UTF-8"));
xmp.put(PdfName.TYPE, PdfName.METADATA);
xmp.put(PdfName.SUBTYPE, new PdfName("XML"));
PdfIndirectReference ref =
stp.getWriter().addToBody(xmp).getIndirectReference();
pdfReader.getCatalog().put(PdfName.METADATA, ref);

--- "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:

> Can you tell me where the xml is and how I can get
> to it?
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 08, 2004 4:34 AM
> To: Conway, Cameron;
> [EMAIL PROTECTED]
> Subject: Re: [iText-questions] "PDF Properties"
> Question
> 
> 
> Windows Explorer is probably reading the xml
> metadata.
> iText only changes the Info dictionary. You'll have
> to
> change the xml yourself.
> 
> --- "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
> 
> > Dear support:
> > 
> > I use the following code to change the Title
> > property:
> > 
> >       PdfReader pdfReader = new
> > PdfReader("C:\\comments\\11438.pdf");
> >       HashMap meta = pdfReader.getInfo(); 
> >       PdfStamper stp = new PdfStamper(pdfReader,
> new
> > FileOutputStream("C:\\comments\\out.pdf"));
> >       String title = "brand new title'";
> >       meta.put(new String("Title"), title);
> >       stp.setMoreInfo(meta); 
> >       stp.close();
> > 
> > The new title appears in the file out.pdf in
> Acrobat
> > Document Properties Summary, but when I right
> click
> > the file in Windows Explorer and look at the "PDF
> > Properties" tab, almost all of the properties are
> > blank, where there was info in the original file,
> > 11438.pdf.
> > 
> > Thanks in advance for your time.
> > 
> > Cameron
> > 
> > 
> > 
> >
>
-------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT
> > Products from real users.
> > Discover which products truly live up to the hype.
> > Start reading now. 
> > http://productguide.itmanagersjournal.com/
> > _______________________________________________
> > iText-questions mailing list
> > [EMAIL PROTECTED]
> >
>
https://lists.sourceforge.net/lists/listinfo/itext-questions
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to