[fpc-pascal] Directory Tree
Jean SUZINEAU
jean.suzineau at wanadoo.fr
Wed Apr 21 23:46:22 CEST 2021
Le 18/04/2021 à 17:22, James Richters via fpc-pascal a écrit :
> RE: [fpc-pascal] Directory Tree
> I figured out how to make a pdf file, but I don’t know how to
> implement it… if we can just have a button to print result.txt… then I
> could just change the printer to Microsoft Print to PDF which is
> included with Widows 10….
There is a Freepascal utility for converting a text file to pdf.
Supposing your lazarus is installed at c:\lazarus, it 'll be at
C:\lazarus\fpc\3.2.0\source\packages\fcl-report\demos\txt2pdf.lpi
It doesn't display the correct chars if you compile and execute it
directly on Result.txt on the command line.
But I've included the source code from this project and modified the
code to produce the pdf.
I've had trouble with the fonts but it seems to works reasonably well
with DejaVuSans.
It's not the ideal font, but box characters are displayed relatively
correctly.
I'm not 100% sure it will work for you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20210421/a391c3e2/attachment-0001.htm>
More information about the fpc-pascal
mailing list