You are not logged in.
Pages: 1
Hello.
I tried the synPDF and I must say it's wonderfull piece of code.
I tried it instead of PDF creator to save result of some electrical measurement. But I noted that the boldness (and possible other styles) from RTF aren't preserved. In the preview everything is OK, but in the resulting PDF there's everything from RichEdit without styling.
Manual output, using DrawText and other methods, where is the font.style property set manually, works fine. Maybe I'm doing something wrong, I tried include fonts in PDF and other things, but without effect. Only standard fonts and 'Symbol' font are used - the Symbol font seems not to be included too :-(
Part of the input file together with the whole testing source files and PDF output are stored on [http://web.spscv.cz/~kolousek/synPDF]
Thanks in advance for help of anyone here ...
Tomas
Offline
Hi, for RTF you need to draw it on a TMetafileCanvas and then you draw the metafile on the VCLCanvas. This creates the best results, i think.
There is some example code in this forum - you have just to search a little bit...
Offline
I was doing it in almost identical way as in the example you pointed me to - but I realized that when using in production code, which is utilizing TJVRichEdit from JVCL library, the font styles are retained as they should be. I'll investigate further what are the diferencies and how it is working when using TntRichEdit. I'm just wondering why the preview is displaying everything correctly and in the PDF output from TRichEdit source styles are missing.
I forgot to mention that it's related to Delphi7 which I'm using for my projects.
Regards
Tomas
Offline
that's interesting - I downloaded your demo program and it does exactly what it should - the correct formatting is preserved in the PDF - bold, alignment, underline, font size... (of course only in "Report PDF" Button, "Demo PDF" does not render the pdf text)...
everything works for me.
I use Delphi 2007
+ I am sorry to say that I have not Delphi 7 and so I can't check your code with it, but in Delphi 2007 the code works fine
Last edited by reddwarf (2011-07-14 05:53:12)
Offline
Pages: 1