Good morning,

> The encoding table is initialized and filled,
in PdfSimpleEncoding::InitEncodingTable() with
" !"#$%&'()*+,-./0123456789:;<=> 
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"

PODOFO_IS_LITTLE_ENDIAN is defined, therefore the values are shifted.
> Without the shift in the ifdef section it works!

I used standard Arial font with WinAnsiEncoding, nothing special,like
in the HelloWorld example.

Regards
Sebastian



-----Ursprüngliche Nachricht-----
Von: Dominik Seichter [mailto:[email protected]]
Gesendet: Mittwoch, 26. Mai 2010 23:13
An: EXTERNAL Loch Sebastian (Firma Ferchau; BhP/TEF17); 
[email protected]
Betreff: Re: [Podofo-users] Experiencing problems writing text since switch to 
new version 0.8.x

Hi,

What kind of fonts and encoding do use? Plain and simple TrueType fonts with
WinAnsiEncoding?

Is PODOFO_IS_LITTLE_ENDIAN defined? Is the m_pEncodingTable initialized
correctly?

Best regards,
        Dom

Am Mittwoch 26 Mai 2010 schrieben Sie:
> Hi all,
>
> the ConvertToEncoding method has a problem, it returns an empty PdfString
>  like Dom suspected.
>
> The encoding table is initialized and filled, but when querying this table
>  in the for-loop nothing is returned as the values for val doesn't seem to
>  be correct..
>
>     for( int i=0;i<lLen;i++ )
>     {
>         pdf_utf16be val = pszUtf16[i];
> #ifdef PODOFO_IS_LITTLE_ENDIAN
>         val = ((val & 0xff00) >> 8) | ((val & 0xff) << 8);
> #endif // PODOFO_IS_LITTLE_ENDIAN
>
>         *pCur = m_pEncodingTable[val];
>
>         if( *pCur ) // ignore 0 characters, as they cannot be converted to
>  the current encoding ++pCur;
>     }
>
>     *pCur = '\0';
>
>
> Without the shift in the ifdef section it works!
>
> Could this be fixed please?
>
> Regards
> Sebastian
>
> @Dom sorry for sending the first email off-list, things have been busy
> here at the customer
>
>
> -----Ursprüngliche Nachricht-----
> Von: Dominik Seichter [mailto:[email protected]]
> Gesendet: Mittwoch, 26. Mai 2010 12:12
> An: [email protected]
> Cc: FIXED-TERM Gnas Eugen (BhP/TEF17); EXTERNAL Loch Sebastian (Firma
>  Ferchau; BhP/TEF17) Betreff: Re: [Podofo-users] Experiencing problems
>  writing text since switch to new version 0.8.x
>
> Hi Sebastian,
>
> I do not have a Windows machine around right now, to debug this problem (it
> works on Linux).
>
> It seems that PdfFont::WriteStringToStream writes an empty string to the
>  PDF. So, I suspect either ePdfFilter_AsciiHexDecode does not work on
>  windows at the moment or more likely PdfEncoding::ConvertToEncoding has a
>  problem. If you want to set a break point in the above method in the
>  debugger, I think you will see quickly what the problem is. I am sure,
>  once the problem is identified, I can fix it easily. Do you think you can
>  provide additional information from a debugging session?
>
> Best regards,
>         Dom
>
> Am Mittwoch 26 Mai 2010 schrieb EXTERNAL Loch Sebastian (Firma Ferchau;
>
> BhP/TEF17):
> > Hi all,
> >
> > since the switch to the new version we couldn't write any text with
> >  DrawText when creating a new pdf or loading a template.
> >
> > We checked it with the actual trunk version 1240 on Windows XP and VS
> > .NET. The HelloWorld example didn't work either.
> >
> > Before we used revision 1156 without any problems, see attached files.
> >
> > Any ideas to fix this??
> >
> > Best Regards
> > Sebastianm
> >
> >
> >
> > -------------------------------------------------------------------------
> >-- ---
> >
> > _______________________________________________
> > Podofo-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/podofo-users
>
> --
> **********************************************************************
> Dominik Seichter - [email protected]
> KRename  - http://www.krename.net  - Powerful batch renamer for KDE
> KBarcode - http://www.kbarcode.net - Barcode and label printing
> PoDoFo - http://podofo.sf.net - PDF generation and parsing library
> SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
> Alan - http://alan.sf.net - A Turing Machine in Java
> **********************************************************************
>


--
**********************************************************************
Dominik Seichter - [email protected]
KRename  - http://www.krename.net  - Powerful batch renamer for KDE
KBarcode - http://www.kbarcode.net - Barcode and label printing
PoDoFo - http://podofo.sf.net - PDF generation and parsing library
SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game,  for KDE
Alan - http://alan.sf.net - A Turing Machine in Java
**********************************************************************

------------------------------------------------------------------------------

_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to