Hi , ( and thanks ...)
pdf_SetFont("Times New Roman","BI",16) ; (Bold+Italic) ---> NOT Ok
pdf_SetFont("Times","BI",16) ; (Bold+Italic) ---> Ok
I need to create a pdf with this type of Font, is it possible? << pdf_SetFont("Times New Roman","BI",16) >>
Or (with purePdf) you can only create some fonts?
Pure Pdf
- VisualJump3D
- User

- Posts: 75
- Joined: Thu Jun 23, 2011 8:32 pm
- Location: italy
- Contact:
Re: Pure Pdf
The problem is with the font name you are using.
try: ( for built in font)
I forgot how to lookup font names and it should be here in the forum somewhere but Times-Roman works with purePDF
Norm.
try: ( for built in font)
Code: Select all
pdf_SetFont("Times-Roman","BI",16) Norm.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
- VisualJump3D
- User

- Posts: 75
- Joined: Thu Jun 23, 2011 8:32 pm
- Location: italy
- Contact:
Re: Pure Pdf
thanks for the reply !
Es :
Result = FontRequester(NomeFont$, SizeFont, #PB_FontRequester_Effects,Color)
If result
FontName$= SelectedFontName()
FontSize = SelectedFontSize()
FontColor= SelectedFontColor()
FontStyle= SelectedFontStyle()
etc etc
endif
if I use the fonts as code above,
he comes back to me as a font name "Times New Roman" NOT "Times-Roman".
This is my problem ...
and if I want to use other fonts?
Es :
Result = FontRequester(NomeFont$, SizeFont, #PB_FontRequester_Effects,Color)
If result
FontName$= SelectedFontName()
FontSize = SelectedFontSize()
FontColor= SelectedFontColor()
FontStyle= SelectedFontStyle()
etc etc
endif
if I use the fonts as code above,
he comes back to me as a font name "Times New Roman" NOT "Times-Roman".
This is my problem ...
and if I want to use other fonts?
Re: Pure Pdf
I used "Times-Roman" as an example because that one is built into purePDF
if a font is not built in then it would be appended:
This code works fine for me when I choose all kinds of different fonts.
if you run this test , dont forget to close the pdf after you have viewed because PUREPDF will not overwrite a pdf that is open.
Code: Select all
pdf_SetFont("Times-Roman","BI",16)Code: Select all
file$="c:\fancyfont.pdf"
#PurePDF_Include=1
XIncludeFile "PurePDF.pb"
Result = FontRequester("",12, #PB_FontRequester_Effects)
If result
fontnm$= SelectedFontName()
EndIf
pdf_Create()
pdf_AddPage()
pdf_SetFont(fontnm$,"U",12)
pdf_Text(10,30,"This is an embedded font ("+fontnm$+"Size 12 Underlined)")
pdf_Save(file$)
RunProgram(file$)
if you run this test , dont forget to close the pdf after you have viewed because PUREPDF will not overwrite a pdf that is open.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
