Pure Pdf

Just starting out? Need help? Post your questions and find answers here.
User avatar
VisualJump3D
User
User
Posts: 75
Joined: Thu Jun 23, 2011 8:32 pm
Location: italy
Contact:

Pure Pdf

Post 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?
normeus
Enthusiast
Enthusiast
Posts: 485
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: Pure Pdf

Post 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.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
User avatar
VisualJump3D
User
User
Posts: 75
Joined: Thu Jun 23, 2011 8:32 pm
Location: italy
Contact:

Re: Pure Pdf

Post 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?
normeus
Enthusiast
Enthusiast
Posts: 485
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: Pure Pdf

Post 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.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
Post Reply