1

I use the command wkhtmltopdf https://www.google.com output.pdf to get a file of pdf.

I got the pdf, the result is successfully, but I write codes that use the library Podofo, the text is upside down.

        PdfMemDocument document;
        PdfPainter painter;
        PdfPage* page;

        document.Load( "output.pdf");

        page = document.GetPage(0);
        painter.SetPage(page);

        PdfString eNtext((const pdf_utf8*)"Test");
        PdfFont* pFont = document.CreateFont("STHeiti Medium", false, new PdfIdentityEncoding(0, 0xffff, true));
        painter.SetFont(pFont);

        painter.DrawText( 10.0, page->GetPageSize().GetHeight() - 100, eNtext);

        painter.FinishPage();
        document.Write("output2.pdf");

Please help me, How can I do it?

Ken Chen
  • 11
  • 2

0 Answers0