Special characters in info dictionary

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Special characters in info dictionary

Sven Loth
Hi,

I want to set some additional Information like author, title etc. but
special characters like ampersand do not appear in Acrobat Reader.

PdfStamper stamp = new PdfStamper(reader, new
FileOutputStream( "stamped.pdf"));
HashMap moreInfo = new HashMap();
moreInfo.put("Author", "1&1 Internet AG");
stamp.setMoreInfo(moreInfo);

I tried also unicode

...
moreInfo.put("Author", "1\u00261 Internet AG");
...

Acrobat Reader displays "11 Internet AG"

Thanks for your help!

Sven


--
Sven Loth
Output Management
Billing-Systeme

---
1&1 Internet AG - Elgendorfer Str. 57 - 56410 Montabaur
Phone#  +49 2602 96 1377 - Fax#  +49 2602 96 1423
E-Mail: sven.loth@xxxxxxxx - www.1und1.de

Member of United Internet
www.united-internet.de



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Reply | Threaded
Open this post in threaded view
|

Re: Special characters in info dictionary

Leonard Rosenthol
At 10:41 AM 7/15/2005, Sven Loth wrote:
>I want to set some additional Information like author, title etc. but
>special characters like ampersand do not appear in Acrobat Reader.

         Reader 7, I presume?

         There appears to be a bug in Acro/Reader 7 regarding
ampersands in metadata :(.


>I tried also unicode
>
>...
>moreInfo.put("Author", "1\u00261 Internet AG");
>...

         Not that's valid Acrobat Unicode - or iText has a bug in how
it writes out Unicode strings to the Info dict.


Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:[hidden email]>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                              215-938-0880 (fax)




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Reply | Threaded
Open this post in threaded view
|

RE: Special characters in info dictionary

Paulo Soares
In reply to this post by Sven Loth
Ampersand is not a special character and info works with everything
including japanese.

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On
> Behalf Of Sven Loth
> Sent: Friday, July 15, 2005 3:42 PM
> To: [hidden email]
> Subject: [iText-questions] Special characters in info dictionary
>
> Hi,
>
> I want to set some additional Information like author, title etc. but
> special characters like ampersand do not appear in Acrobat Reader.
>
> PdfStamper stamp = new PdfStamper(reader, new
> FileOutputStream( "stamped.pdf"));
> HashMap moreInfo = new HashMap();
> moreInfo.put("Author", "1&1 Internet AG");
> stamp.setMoreInfo(moreInfo);
>
> I tried also unicode
>
> ...
> moreInfo.put("Author", "1\u00261 Internet AG");
> ...
>
> Acrobat Reader displays "11 Internet AG"
>
> Thanks for your help!
>
> Sven
>
>
> --
> Sven Loth
> Output Management
> Billing-Systeme
>
> ---
> 1&1 Internet AG - Elgendorfer Str. 57 - 56410 Montabaur
> Phone#  +49 2602 96 1377 - Fax#  +49 2602 96 1423
> E-Mail: sven.loth@xxxxxxxx - www.1und1.de
>
> Member of United Internet
> www.united-internet.de
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> iText-questions mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Reply | Threaded
Open this post in threaded view
|

RE: Special characters in info dictionary

Leonard Rosenthol
At 10:55 AM 7/15/2005, Paulo Soares wrote:
>Ampersand is not a special character

         It is in XML - and Acrobat 7 treats things more XML-like due
to the XMP synchronization changes made in this version...


Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:[hidden email]>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                              215-938-0880 (fax)




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Reply | Threaded
Open this post in threaded view
|

Re: Special characters in info dictionary

Paulo Soares
Last I looked there was nothing about XML in the /Info dictionary. It's
possible that with all the XML frenzy Adobe mistakenly took the /Info as
XML.

----- Original Message -----
From: "Leonard Rosenthol" <[hidden email]>
To: "Paulo Soares" <[hidden email]>; "Sven Loth" <[hidden email]>;
<[hidden email]>
Sent: Friday, July 15, 2005 5:57 PM
Subject: RE: [iText-questions] Special characters in info dictionary


> At 10:55 AM 7/15/2005, Paulo Soares wrote:
> >Ampersand is not a special character
>
>          It is in XML - and Acrobat 7 treats things more XML-like due
> to the XMP synchronization changes made in this version...
>
>
> Leonard
>
> --------------------------------------------------------------------------
-
> Leonard Rosenthol
<mailto:[hidden email]>
> Chief Technical Officer                      <http://www.pdfsages.com>
> PDF Sages, Inc.                              215-938-7080 (voice)
>                                               215-938-0880 (fax)
>
>



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Reply | Threaded
Open this post in threaded view
|

Re: Special characters in info dictionary

Leonard Rosenthol
At 01:07 PM 7/15/2005, Paulo Soares wrote:
>Last I looked there was nothing about XML in the /Info dictionary. It's
>possible that with all the XML frenzy Adobe mistakenly took the /Info as
>XML.

         As of Acrobat 5, when they introduced XMP - there was a
"mapping" between the XMP metadata in /Catalog/Metadata and that of
the /Info dictionary.

         With 6, that became stronger and forced the XMP to be the
"true definitive metadata" (meaning that if you have XMP it will
cause Acro to ignore what is in /Info).

         Acrobat 7 attempts to give both XMP and /Info equal time -
it does this in a way that is causing problems with /Info dict
entries with & in them...


Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:[hidden email]>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                              215-938-0880 (fax)




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/itext-questions