Justified text

Hi All - I’ve seen some content on the web about getting the alignment of a textarea to be justified but it isn’t make sense/working on my machine. I’ve actually got a bunch of text in a string that I’m trying to write to a pdf with justified alignment. Is there a simple way to do this without purchasing add-ons? I’m coding on my mac but the program needs to run on windows as well. Thanks all.

i manage to get justify alignment on pdf by using using html and showing in htmlviewer. then i use wkhtmltopdf to generate the pdf. the code to use in html is <ALIGN=JUSTIFY>

Was this all done thru xojo?

I’m essentially trying to create a program for my office in which you can enter some client information in fill-able fields, the program does some math, and then automatically generates a letter to the client. Everything is working great except the letter would look better justified.

Right now I have the letter stored in a string. I write the string to a textarea and then create a styledtextprinter object and print the textarea. I can then either save to pdf or print directly from the print dialogue. There is likely a better way to do this, possibly with justified text…

Dan, u need a command line program called wkhtmltopdf and of course the free acrobat reader. One is to write the pdf and the other one to read.

what you need to do is put in a htmlviewer on your form and then with a click on a button, create a html file with the content of your letter, save the html file and then on the htmlviewer, read the html in display on the htmlviewer and then another button to generate the pdf.

i used shell to execute the wkhtmltopdf with the html file name for the 1st parameter and the pdf file you want as the 2nd parameter.