Generate reports with special characters (accent) like á é ú


#1

Hi,

we are evaluating the product ASPOSE.PDF and I’ve downloaded the demo and started playing with it.

I’ like to know if it is possible to generate reports with special characters (accent) like á é ú, very common in latin language.

thks

Edson


#2

Dear Edson,

Thanks for your consideration.

Here is an example:

[XML]
<?xml version="1.0" encoding="utf-8" ?>



special characters: á é ú





[C#]
Pdf pdfDoc = new Pdf();

Section sec = new Section(pdfDoc);
pdfDoc.Sections.Add(sec);

Text text1 = new Text(sec);
sec.Paragraphs.Add(text1);

Segment segment1 = new Segment(text1);
text1.Segments.Add(segment1);
segment1.TextInfo.FontName = “Helvetica”;
segment1.TextInfo.FontEncoding = “winansi”;
segment1.Content = “special characters: á é ú”;

pdfDoc.Save(“d:/temp/test.pdf”);


[VisualBasic]
Dim pdfDoc As Pdf = New Pdf()

Dim sec As Section = New Section(pdfDoc)
pdfDoc.Sections.Add(sec)

Dim text1 As Text = New Text(sec)
sec.Paragraphs.Add(text1)

Dim segment1 As Segment = New Segment(text1)
text1.Segments.Add(segment1)
segment1.TextInfo.FontName = “Helvetica”
segment1.TextInfo.FontEncoding = “winansi”
segment1.Content = “special characters: á é ú”

pdfDoc.Save(“d:/temp/test.pdf”)