DynaPdf set font

dim vBold as integer
vBold = pdf.SetFont(“Times”, pdf.kfsBold, 12.0, true, pdf.kcp1252)

To call vBold in one part of the sw
call vBold
not work, how can I write without repeating
call pdf.SetFont(“Times”, pdf.kfsBold, 12.0, true, pdf.kcp1252)

[code]sub vBold(pdf as DynaPdfMBS)
pdf.SetFont(“Times”, pdf.kfsBold, 12.0, true, pdf.kcp1252)
end sub

call vBold()[/code]

You can call ChangeFont(vBold) and pass here the font handle for the font you activated before.

vBold as integer = pdf.SetFont(“Times”, pdf.kfsBold, 12.0, true, pdf.kcp1252)
vItalic as integer = pdf.SetFont(“Times”, pdf.kfsItalic, 12.0, true, pdf.kcp1252)

ChangeFont(vBold)

ChangeFont(vBold)

error - not work

call pdf.ChangeFont(vBold)

OK.
Thank you