Xojo Conferences
XDCMay2019MiamiUSA

[MBS] Possible bug in DynaPDF (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] DynaPDF: manage image quality
Next thread: [MBS] A mailing list for our Filemaker Plugin


Re: [MBS] MBS Icon Routines redefined?   -   Garth Hjelte
  [MBS] Possible bug in DynaPDF   -   Sergio Tamborini
   Re: [MBS] Possible bug in DynaPDF   -   Sergio Tamborini
   Re: [MBS] Possible bug in DynaPDF   -   Christian Schmitz

[MBS] Possible bug in DynaPDF
Date: 19.04.11 22:23 (Tue, 19 Apr 2011 23:23:40 +0200)
From: Sergio Tamborini
Hi Christian.
I've found a possible bug in DynaPDF. If I draw a string that contains endofline characters, that ones will be ignored. I've tried with "endofline", with "chr(10)" and with "chr(13)" too, but the same result.
Here the code I use:

TheString="FirstLine"+chr(10)
for ito 4
TheString=TheString+"Line N. "+str(i)+chr(10)
Next
g.DrawString TheString,5,50

It display a string like the following:
FirstLineLine N. 0Line N. 1Line N. 2Line N. 3

and not
FirstLine
Line N. 0
Line N. 1
Line N. 2
Line N. 3

Let me know if I miss anything! Thanks!

Bye!

------

Sergio Tamborini
Brescia
http://www.system-i.it



_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Possible bug in DynaPDF
Date: 20.04.11 06:31 (Wed, 20 Apr 2011 07:31:24 +0200)
From: Sergio Tamborini
Thank you! It works fine. I see that it respect the font and the site setted in the Dynapdfgraphics! Good!

Il giorno 20/apr/2011, alle ore 00.01, Christian Schmitz ha scritto:

> Sub DrawString(text as string, x as double, y as double)
> text = ReplaceAll(text, "", "\") // escape all backslashes
> call pdf.WriteFTextEx(myOffsetX+x, myOffsety+y-myTextSize, pdf.GetPageWidth, -1, pdf.ktaLeft, text)
> End Sub

------

Sergio Tamborini
Brescia
http://www.system-i.it



_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Possible bug in DynaPDF
Date: 19.04.11 23:01 (Wed, 20 Apr 2011 00:01:35 +0200)
From: Christian Schmitz

Am 19.04.2011 um 23:23 schrieb Sergio Tamborini:

> Hi Christian.
> I've found a possible bug in DynaPDF. If I draw a string that contains endofline characters, that ones will be ignored. I've tried with "endofline", with "chr(10)" and with "chr(13)" too, but the same result.

You are drawing with the graphics class replacement from the DynaPDF Graphics project?

DrawString here uses WriteText which does not do line breaks.

You can change code to this:

Sub DrawString(text as string, x as double, y as double)
text = ReplaceAll(text, "", "\") // escape all backslashes
call pdf.WriteFTextEx(myOffsetX+x, myOffsety+y-myTextSize, pdf.GetPageWidth, -1, pdf.ktaLeft, text)
End Sub

Greetings
Christian