Hi,
I have a console application handling invoice and licence automatic generation
using dynapdf.
I have no problem with the invoice, and I can handle bold or normal different
chunk of text using pdf.SetFont before every chunk of text.
For the licence text I have a bunch of text from a database, that I write using
WriteFText to span the text across multiple pages.
To insert some basic formatting(I need only some parts in bold), I’m trying to
use some pseudo-html tags in the text.
so I am trying for a sample text string like this:
“this is normal text<b>this is bold</b>This is normal again”
TimesBoldHandle=pdf.SetFont("Times", pdf.kfsBold, 20.0, true, pdf.kcp1252)
TimesHandle=pdf.SetFont("Times", pdf.kfsItalic, 20.0, true, pdf.kcp1252)
licenceText = ReplaceAll(licenceText,"<b>","\FT["+str(TimesBoldHandle)+"]")
licenceText = ReplaceAll(licenceText,”</b>","\FT["+str(TimesHandle)+"]”)
this is taken from an MBS example, ‘create PDF with text block fonts”
the problem is that in my software, both TimesBoldHandle and TimesBoldHandle
will contain a value of -67108964, and the font change is not working
What is driving me mad is that if I load the MBS example and run it,
TimesBoldHandle and TimesHandle will be respectively 0 and 1, and all is
working as expected!
What I am missing here?
thanks in advance,
Giulio
- - - - - - - - - - - - - - - - - - - - - - -
BitBazar Srl
Via Andrea Doria, 57
00192 Roma
tel +39 0639737052
tel +39 0639725787
http://www.bitbazar.com
- - - - - - - - - - - - - - - - - - - - - - -
<http://www.bitbazar.com/>
> Il giorno 20 ott 2017, alle ore 23:08, Christian Schmitz
> <[email protected]> ha scritto:
>
>
>> It turned out that I had incorrectly assumed that GTK+3 was present in the
>> Linux machines, so I installed. This turned out not to be enough. After I
>> installed libgtk-3-dev, both your example and my project ran properly.
>>
>
> It would be good to know list of files in /usr/lib and
> /usr/lib/x86_64-linux-gnu before and after to know which libraries you have
> and what was missing. Maybe I can remove a dependency.
>
>
> Sincerely
> Christian
>
> --
> Read our blog about news on our plugins:
>
> http://www.mbsplugins.de/
>
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> [email protected]
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info