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


All forums · Statistics · Search ·

Two Pilots forum / For software developers / PDFCreatorPilot : SymbolFonts ( Wingdings )
Author Message
Lynx
Member
# Posted: 12 Apr 2006 16:20


Hi
I need help with my purchased version of PDFCreatorPilot in Visual Basic 6.
Using "normal" fonts ( Helvetica, Arial ) works fine.
But I need a telefone symbol from Wingdings (char "(" )
Im using the following code :
PDF.PDFPAGE_SetActiveFont "Wingdings", False, False, False, False, intBaseFontSize, 0
PDF.PDFPAGE_TextOut dblX,dblY, 0, strWord

But the result is alsway the char "(" in a normal font not the Symbol in "Wingdings" on the PDF file...

Got any idea ?

greets
Lynx

Stanislav
# Posted: 12 Apr 2006 17:18


Dear Lynx,

Unfortunately there is no way to display this character using TextOut methods, because Wingdings font uses complex character mapping scheme.

There is no simple way to do this, however, you can draw one-char text line to device context, save it as a metafile and add to PDF using PDFPAGE_PlayMetaFileEx or PDFPAGE_PlayMetaFileExFromFileName.

Sorry for any inconvenience.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Lynx
Member
# Posted: 13 Apr 2006 14:32


Thanks Stanisalv for your fast answer even this isnt what i wanted to hear -_-

My problem is that the PDF created by our software is going to be printed as newspaper.
So if its scaled the "vector" like fonts stay well. but not the images.
They behave like pixel imges do and loose quality.
Do you have any idea how to implement a scaleabled telephone symbol ?

Are there any plans to support symbol fonts in near future ?

regards
Lynx

Lynx
Member
# Posted: 20 Apr 2006 13:26


however, you can draw one-char text line to device context, save it as a metafile and add to PDF using PDFPAGE_PlayMetaFileEx or PDFPAGE_PlayMetaFileExFromFileName.

How exactly do you mean this ?
whats your meaning of 'metafile' ?
do you think of importing a textfile, containing the needed char ?

greets
Lynx

Stanislav
# Posted: 20 Apr 2006 14:04


Dear Lynx,

No, i mean device context - you can draw on DC, then get contents as metafile and pass it to the library.

Here
http://www.vb-helper.com/howto_create_metafile.html
is metafile example for VB

You don't need to import text file, just use TextOut GDI function, don't forget to select you font before this. I hope this can solve your problem.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Lynx
Member
# Posted: 20 Apr 2006 15:06


Hi Stanislav

Thanks 4 your answer.
I created a wmf containing just the symbol like you told me.
The file works fine under windows but pdf creator just tells me : "Metafile is not valid"
The file works well with any other program -_-
Could you tell me whats wrong ?
The file is available here : http://www.public-soft.de/temp/tel.rar

Thanks for your efforts
Lynx

Stanislav
# Posted: 20 Apr 2006 15:15


Dear Lynx,

Library expects EMF file, not WMF. To create EMF, use CopyEnhMetaFile function.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Lynx
Member
# Posted: 20 Apr 2006 16:06 · Edited by: Lynx


Hi

Finally i created the emf file containing the symbol.
But loaded into the PDF its displayed as bracket '('.
Not as the original Windings Symbol.
Other Applications display the emf file as symbol :/

any further Ideas ?
Whats the latest version of PDF Creator pilot ?
my version is 2.50.0.0

Lynx

Edit :
My failure :
Its not displayed as bracked : its not displayed at all :(

Stanislav
# Posted: 20 Apr 2006 16:36


Dear Lynx,

Please send us your emf file.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Lynx
Member
# Posted: 20 Apr 2006 16:49


Hi

available again here : http://www.public-soft.de/temp/tel.rar

thanks
Lynx

Stanislav
# Posted: 20 Apr 2006 17:58


Dear Lynx,

I've just forwarded your emf to library developers, i hope they will be able to find a solution.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Lynx
Member
# Posted: 20 Apr 2006 18:02


Thank you very much for your efforts !

This is support thats worth its name !

Stanislav
# Posted: 20 Apr 2006 18:02


Dear Lynx,

Using this VBScript test script i've succesfully added emf to document

Set PDF = CreateObject("PDFcreatorPilot2.piPDFDocument")

PDF.StartEngine "demo@demo","demo"

PDF.DocumentInfo_CreationDate = Now
PDF.DocumentInfo_Title = "PDF Creator Pilot Demo (Work with metafiles)"
PDF.Filename = "Metafile.pdf"
PDF.AutoLaunch = true
PDF.PageLayout = 1 ' 1=plOneColumn
PDF.COmpression = 1 ' 1 = ctFlate
PDF.BeginDoc
PDF.PDFPAGE_Width = 376
PDF.PDFPAGE_Height = 373
PDF.PDFPAGE_PlayMetaFileFromFileName "tel.emf"
PDF.EndDoc

Please save it to your HD in *.vbs file and try on your machine.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Stanislav
# Posted: 20 Apr 2006 18:10


Dear Lynx,

I can help you to fix your code if it is in VB.NET - i don't have VB 6, unfortunately.

So, if you have VB.NET and test script works OK on your machine, you can send me your code in zip archive using our support form, and i'll try to fix it.

In case if test script doesn't work on your test machine, i have to contact developers.
Sorry for any inconvenience.

Thank you very much !

Best regards,
Stanislav
Two Pilots

Lynx
Member
# Posted: 20 Apr 2006 18:18 · Edited by: Lynx


Thank you very much !

I found my problem :
PDF.PDFPAGE_PlayMetaFileExFromFileName App.Path & "\tel.emf", Seize, (I * BaseFontSize + TopRand) + (I * ExtraLineHeight) - 1, 23,19
was my original code.
I thought "xScale and yScale" are pixel values. They are not :P
PDF.PDFPAGE_PlayMetaFileExFromFileName App.Path & "\tel.emf", Seize, (I * BaseFontSize + TopRand) + (I * ExtraLineHeight) - 1, 0.6, 0.6

Like this the emf Picture isnt anymore much bigger then the whole pdf and thus invisible Oo

Thank you again four your patience, you saved my day ;)

best regards
Lynx

 

 

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

 

Page top