Forum > Packages and Libraries

fpPDF questions

(1/1)

Aidex:
Hi!
I have a few beginner questions about fpPDF (fcl-pdf).
I tried fpPDF for the first time today and I'm glad it exists. :)

1) Is there already a helper function to write a table/spreadsheet (text content only) into a PDF?

2) Is it correct that fpPDF does not have a Canvas yet?
So I couldn't use my existing program parts for canvas drawings?

3) Has anyone tried rendering HTML into a PDF? (or alternatively to a Canvas?)

Thanks in advance for your answers.
Regards, Jörg

xos:
I have already tried with fpPdf. I asked myself the same questions.
Unfortunately, the current fpPDF does not yet have a canvas, but more painful is that the inclusion of TTF fonts is only rudimentarily solved. For my project I should be able to include any installed fonts (Win). As I understand it, the TTF font must now be in the output directory.
Without the complete inclusion of all installed TTF fonts I can not port my project from Delphi to Lazraus.

af0815:
Maybe you can look in the sources of fpreport. There is a Manager for the fonts. You have to read the fonts at startup, but this reading of the fonts can be done often automatic, because the most known directories of the font are scanned. If you have other directories you have to specify this.

From the sample (in Lazarus examples)

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TFrmSimpleReportLCL.FormActivate(Sender: TObject);begin  if not FInit then begin    gTTFontCache.ReadStandardFonts;    gTTFontCache.BuildFontCache;   .....    FInit:= true;  end;end;  And function gTTFontCache: TFPFontCacheList  is in fpTTF.

Then you can search for fonts or families and more. In fpreport this is used for the pdf-renderer as well.

winni:
Hi!

I  think he is talking about the ability to embedd Fonts - a big advantage of PDF, because of that the PDF file can be used a data exachange format for graphic stuff. No matter if a font is installed at the destination. Stolen from PostScript.

Winni

marcov:
https://bugs.freepascal.org/view.php?id=30116 ?

Navigation

[0] Message Index

Go to full version