Page 1 of 1
Pure Pdf
Posted: Tue Feb 24, 2015 12:42 pm
by VisualJump3D
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?
Re: Pure Pdf
Posted: Tue Feb 24, 2015 5:28 pm
by normeus
The problem is with the font name you are using.
try: ( for built in font)
Code: Select all
pdf_SetFont("Times-Roman","BI",16)
I forgot how to lookup font names and it should be here in the forum somewhere but Times-Roman works with purePDF
Norm.
Re: Pure Pdf
Posted: Tue Feb 24, 2015 7:07 pm
by VisualJump3D
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?
Re: Pure Pdf
Posted: Tue Feb 24, 2015 8:17 pm
by normeus
I used "Times-Roman" as an example because that one is built into purePDF
Code: Select all
pdf_SetFont("Times-Roman","BI",16)
if a font is not built in then it would be appended:
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$)
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.