> -----Original Message-----
> From: Stew Meyers [mailto:
smeyers@...]
> Sent: Friday, June 26, 2009 2:27 PM
> To: 'Post all your questions about iTextSharp here'
> Subject: Re: [itextsharp-questions] BaseFont.DirectTextToByte
>
> Thanks for the suggestion Paulo, much appreciated. Unfortunately those
> changes didn't make a difference as far as the symbols
> appearing. Just to
> clarify what I did:
>
> I edited iTextSharp\text\pdf\DocumentFont.cs for v4.0.8.0 and made any
> changes as suggested that had to do with diffmap. This included the
> following within their respective methods (let me know if I
> should post
> entire file):
>
> private IntHashtable diffmap;
>
> if (diffs != null) {
> diffmap = new IntHashtable();
>
> if (c != null && c.Length > 0) {
> uni2byte[c[0]] = currentNumber;
> diffmap[c[0]] = currentNumber;
> }
>
> if (diffmap != null) { //widths for differences must override
> existing ones
> e = diffmap.ToOrderedKeys();
> for (int k = 0; k < e.Length; ++k) {
> int n = diffmap[e[k]];
> widths[n] = bf.GetRawWidth(n,
> GlyphList.UnicodeToName(e[k]));
> }
> diffmap = null;
> }
>
>
> All the other changes had nothing to do with diffmap, so they weren't
> changed (I wouldn't have been able to change most of those
> others anyhow, as
> there were changes in variables to overridden functions.
>
> I rebuilt the project successfully (of which the new dll is of course
> included in my project), but the problem remains. Setting
> BaseFont.DirectTextToByte to true still solves the problem,
> but I realize I
> shouldn't do that.
>
> Is there something simple that's missing in order to make this work?
>
> Thanks much,
>
> - Stew
>
> -----Original Message-----
> From: Paulo Soares [mailto:
psoares@...]
> Sent: Friday, June 26, 2009 5:44 AM
> To: Post all your questions about iTextSharp here
> Subject: Re: [itextsharp-questions] BaseFont.DirectTextToByte
>
> You can't replace one with other. See
>
http://itextsharp.cvs.sourceforge.net/viewvc/itextsharp/itexts> harp_new/iText
> Sharp/text/pdf/DocumentFont.cs?view=diff&r1=text&tr1=1.13&r2=t
> ext&tr2=1.9&di
> ff_format=h and replace only the code related to the variable diffmap.
>
> Paulo
>
> > -----Original Message-----
> > From: Stew Meyers [mailto:
smeyers@...]
> > Sent: Thursday, June 25, 2009 6:46 PM
> > To: 'Post all your questions about iTextSharp here'
> > Subject: Re: [itextsharp-questions] BaseFont.DirectTextToByte
> >
> > Thanks for the link.
> >
> > I tried using the new version of DocumentFont, but got a
> > bunch of compile
> > errors that referred to abstract members not being
> > implemented in the base
> > class. So then I downloaded the new version of BaseFont and
> > am now getting
> > compile errors in CJKFont, TrueTypeFont, Type1Font, &
> > Type3Font. Do you
> > think I can download these files as well for use with v4.0.8.0?
> >
> > - Stew
> >
> > -----Original Message-----
> > From: Paulo Soares [mailto:
psoares@...]
> > Sent: Thursday, June 25, 2009 1:18 PM
> > To: Post all your questions about iTextSharp here
> > Subject: Re: [itextsharp-questions] BaseFont.DirectTextToByte
> >
> > You may get away with this:
> >
http://itextsharp.svn.sourceforge.net/viewvc/itextsharp/trunk/> > src/core/iText
> > Sharp/text/pdf/DocumentFont.cs?revision=2&view=markup&sortby=d
> > ate. Using
> > BaseFont.DirectTextToByte is not recommended as it will
> fail with some
> > encodings.
> >
> > Paulo
> >
> > > -----Original Message-----
> > > From: Stew Meyers [mailto:
smeyers@...]
> > > Sent: Thursday, June 25, 2009 5:27 PM
> > > To: 'Post all your questions about iTextSharp here'
> > > Subject: Re: [itextsharp-questions] BaseFont.DirectTextToByte
> > >
> > > Unfortunately, I am stuck with sticking with v4.0.8.0 since
> > > some deprecated
> > > classes were unfortunately completely removed. Is it
> > > possible to either
> > > describe the fix that was done so I can make the change in
> > > v4.0.8.0; or if
> > > you think it is Ok to always set BaseFont.DirectTextToByte to
> > > true for all
> > > text (including normal text, symbols, etc) then that would be
> > > fine as well.
> > >
> > > Thanks much,
> > >
> > > - Stew
> > >
> > > -----Original Message-----
> > > From: Paulo Soares [mailto:
psoares@...]
> > > Sent: Thursday, June 25, 2009 12:11 PM
> > > To: Post all your questions about iTextSharp here
> > > Subject: Re: [itextsharp-questions] BaseFont.DirectTextToByte
> > >
> > > That's a bug that's already fixed in the SVN.
> > >
> > > Paulo
> > >
> > > > -----Original Message-----
> > > > From: Stew Meyers [mailto:
smeyers@...]
> > > > Sent: Thursday, June 25, 2009 2:47 PM
> > > > To:
itextsharp-questions@...
> > > > Subject: [itextsharp-questions] BaseFont.DirectTextToByte
> > > >
> > > > Hello,
> > > >
> > > >
> > > >
> > > > I was trying to determine how why certain symbols were not
> > > > appearing on PDF forms created through iTextSharp, and came
> > > > across BaseFont.DirectTextToByte. After setting this
> > > > property to true, the symbols now appear on the PDF form. As
> > > > an example, I want to use the 'Registered' symbol (decimal
> > > > #174) in the Arial TTF. Leaving BaseFont.DirectTextToByte at
> > > > its default value (false) produces a blank, but setting the
> > > > value to true produces the proper symbol.
> > > >
> > > >
> > > >
> > > > I searched the archives and looked in iText in Action, but
> > > > could not find any information about this property. Is there
> > > > any reason why it should not be set to true all the time? So
> > > > far in my tests, I have not had any problems with setting it
> > > > to true for all text produced through iTextSharp.
> > > >
> > > >
> > > >
> > > > Thank you