Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / ? sign
Author Message
Anonymous
# Posted: 8 Jul 2009 03:07


Hi,

I'm having a problem printing a ? sign to pdf.
I've used all fonts I know and tried all the charsets.

Does anyone know how to fix this problem

Anonymous
# Posted: 8 Jul 2009 03:09


EDIT:

It seems like this forum has the same problem, The question mark should have been a euro sign.

Thanks in advance
Ivo Ver Eecke

max.f
# Posted: 8 Jul 2009 03:42


How do you use this character? I mean do you create PDF with a text containing this char or do you convert some document with this char? In two words, we need a sample to test. Can you please provide it?

--
Max Filimonov,
max.f@colorpilot.org

Anonymous
# Posted: 8 Jul 2009 04:13


Sample:


fnt=Pdf.AddFont('ARIAL',false,false,false,false,fc Default)
Pdf.UseFont(fnt,22)
Pdf.ShowTextAt(100,100,'?')

This code prints a "?" where it should print a euro sign (alt0128)

Vitaliy Shibaev
Member
# Posted: 8 Jul 2009 04:21


Hi,

Here is the sample code (C++):

long arial = PDF->AddFont(L"Arial", VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE, VARIANT_FALSE, fcDefault);
PDF->UseFont(arial, 14);
wchar_t euroSign[] = { 0x20AC, 0 };
PDF->ShowUnicodeText(euroSign);

Best regards,
Vitaliy Shibaev
Two Pilots

Vitaliy Shibaev
Member
# Posted: 8 Jul 2009 04:46


Hi,

Here is example on VBScript:

Set PDF = CreateObject("PDFCreatorPilot.PDFDocument4")

fnt = PDF.AddFont("Arial", False, False, False, False, 0)
PDF.UseFont fnt, 22
PDF.ShowUnicodeTextAt 100, 100, ChrW(8364)

PDF.SaveToFile "HelloPDF.pdf", true
Set PDF = Nothing

Best regards,
Vitaliy Shibaev
Two Pilots

Anonymous
# Posted: 8 Jul 2009 05:17


Why should I use ShowUnicodeText and not showText?
To me it seems like both methods do the same thing?

Vitaliy Shibaev
Member
# Posted: 8 Jul 2009 05:33


You can use ShowText too. Here is example:

fnt = PDF.AddFont("Arial", False, False, False, False, 238) 'fcEastEurope
PDF.UseFont fnt, 22
PDF.ShowText Chr(128)

Difference between these two methods is that ShowText uses charset of font for text showing and ShowUnicodeText expects and shows text in unicode.

You can read more about unicode and charsets in this good article:
http://www.joelonsoftware.com/articles/Unicode.htm l

ghost331
Member
# Posted: 18 May 2010 01:51


fnt = PDF.AddFont("Arial", False, False, False, False, 0)
PDF.UseFont fnt, 22
PDF.ShowUnicodeTextAt 100, 100, ChrW(8364)










覧覧覧覧覧覧
cheap golf clubs

Anastasiya
Member
# Posted: 21 May 2010 01:57


Dear ghost331,

Thank you for the information.

Two Pilots
http://www.colorpilot.com

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.027

 

Page top