Hi,

I do not see how this is a problem. It is true that PoDoFo writes 
(Hello\nWorld) as (Hello
World) into the PDF. But the PDF is read as sequence of bytes and the byte for 
the linebreak is still there. If I understand the PDF reference correctly, the 
behaviour of PoDoFo is correct. Escaping is optional and not required. 

Please correct me if I am wrong here!

Do you have an example PDF that you could send me (in private mail if it 
should not go to the public).

Best regards,
        Dom

Am Montag 23 November 2009 schrieb A. Massad:
> Hello,
> 
> Maybe this is a bug in PoDoFo - or just wrong usage of the library
>  functions:
> 
> Reading/parsing PDF-Files which contain strings with escape sequences, e.g.
>  (\r) or (\b), causes problem when writing these strings: the functions
>  PdfVariant::Write() and PdfString::Write() yield a strange output - that
>  is: (\r)
> becomes
> (
> )
> and
> (\b)
> becomes
> )
> respectively.
> 
> That means, the escape sequences are resolved in the output to a CR or
>  BACKSPACE instead of maintaining the escaping with the Backslash "\".
> 
> Due to this behavior, the written PDFs are corrupt (esp. due to malformed
>  syntax produced by the \b).
> 
> Is there a special function or flag to find a work-around for this
>  behavior? I could not fix the problem with PoDoFo functions but rather had
>  use PdfVariant::ToString() and rewrite the std::string manually to hex
>  codes...
> 
> Thank you for your help!
> 
> Greetings,
> Amin
> 
> PS: The strange encodings with low code numbers occur in a PDF where a Font
>  Encoding remaps all present characters by a "Differences"-Mapping to codes
>  starting at 1 - i.e. the non-printable chars will be mapped to printable
>  characters by this encoding (cf. Pdf Spec Sect 9.6.6 Character Encoding).
>  --------------------------------------------------------------------------
> ---- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>  30-Day trial. Simplify your report design, integration and deployment -
>  and focus on what you do best, core application coding. Discover what's
>  new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Podofo-users mailing list
> Podofo-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/podofo-users
> 


-- 
**********************************************************************
Dominik Seichter - domseich...@web.de
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
**********************************************************************

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to