Hi, Could you send a code sample and the resulting PDF?
Best regards,
Dom
Am Donnerstag, 20. August 2009 schrieb Vincent den Boer:
> Hello,
>
> I've tried using PdfIdentityEncoding but the output is still garbage. I
> allocate the PdfIdentityEncoding myself. Do I need to get it from some
> place else? Or do I need to convert the utf8 data to utf16be somehow? If
> so, please tell me how.
>
> Thanks in advance,
> Vincent den Boer
>
> On Friday 31 of July 2009 11:28:38 Dominik Seichter wrote:
> > Hi,
> >
> > Try using PdfIdentityEncoding for unicode output. It will support all
> > glyphs available in the font. So all characters from a UTF8 string can be
> > displayed.
> >
> > Best regards,
> > Dom
> >
> > Am Freitag, 31. Juli 2009 schrieb Vincent den Boer:
> > > On Tuesday 21 of July 2009 16:59:58 you wrote:
> > > > On Tue, 2009-07-21 at 10:45 +0200, Vincent den Boer wrote:
> > > > > Hello everyone,
> > > > >
> > > > > I'm planning to use PoDoFo. I looked through the API docs and
> > > > > everything I need is supported. I also read that the library is
> > > > > Unicode compatible. The only problem is that I have little
> > > > > knowledge of Unicode and C++ since I normally have other libraries
> > > > > deal with encoding issues. I need to read some text from a UTF-8
> > > > > encoded file and display it in a PDF document. Could anyone please
> > > > > give me some pointers on how to do that?
> > > >
> > > > PoDoFo works with utf8 and UTF16BE unicode data in most places where
> > > > it matters. You should be able to feed your UTF-8 encoded text
> > > > straight into (eg) PdfString.
> > >
> > > I'm experimenting with the PoDoFo tutorial. I have these lines:
> > > std::string test; // This contains the string ěščřžáéëéèäáà
> > > std::cout << test << std::endl;
> > > painter.DrawMultiLineText( 0, pPage->GetPageSize().GetHeight() - 50,
> > > 500, 50, PdfString(test));
> > >
> > > The first line outputs the correct string. The second however, output a
> > > lot of garbage to the PDF. In the docs I see the PdfDocument takes a
> > > PdfEncoding as parameter. I'm guessing that I should pass the UTF8
> > > encoding there. The only thing is that I can't find the right way to
> > > get the encoding object. It looks like
> > > PdfEncodingFactory::CreateEncoding might be what I'm searching for but
> > > I don't know what to pass to it... Could anyone give me some pointers?
> > >
> > > > If all you need to do is create new PDF files, though, there are
> > > > alternatives that you might find a better fit for your needs than
> > > > PoDoFo. PoDoFo is low level and rather capable in terms of being able
> > > > to parse/edit/write PDF, but you need to know a bit about PDF to get
> > > > the best out of it. If it'll do what you need, then great. I'd
> > > > suggest looking at Cairo <http://cairographics.org/> too, though, as
> > > > it's potentially a very good option that's rather easy to use for
> > > > simple PDF output.
> > >
> > > I chose PoDoFo because the API looked simple enough for me and all the
> > > features I need are there (including Unicode which is the reason I'm
> > > switching from libHaru). I've looked at Cairo but it looks to me that
> > > it's too hard to set up on Windows (I mainly work on Linux but I
> > > sometimes have to use Windows too).
--
**********************************************************************
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
**********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
