Project

General

Profile

Bug #4950

Render latin characters using WPdfRenderer

Added by José Luis Rey over 5 years ago. Updated over 5 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
06/03/2016
Due date:
% Done:

0%

Estimated time:

Description

Hello,

I'm having problems rendering latin character with WPdfRenderes, the accents and special characters don't appear in the document, v3.3.4 on vs2010:

HPDF_Doc pdf = HPDF_New(error_handler, 0);

HPDF_Font font;

HPDF_UseUTFEncodings(pdf);

HPDF_SetCurrentEncoder(pdf, "UTF-8");

HPDF_Page page = HPDF_AddPage(pdf);

HPDF_Page_SetSize(page, HPDF_PAGE_SIZE_A4, HPDF_PAGE_PORTRAIT);

Wt::Render::WPdfRenderer renderer(pdf, page);

renderer.setMargin(0.54);

renderer.setDpi(200);

renderer.render(\"

áéíóúñ

\");

#1

Updated by Koen Deforche over 5 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche

Hey,

Putting non-ascii characters in source code is ill-defined: depending on the compiler and the system locale this may or may not have the intended effect. In c++11 you can do this only if you use u8"..." string literals. I'm not sure if Visual Studio 2010 already supports this.

Koen

Also available in: Atom PDF