You are not logged in.
Pages: 1
when I complie synpdf,on lazarus 2.2.2 fpc3.2.2(target win32,i386 )
SynPdf.pas Error: Identifier not found "TMetaFile"
procedure RenderMetaFile(MF: TMetaFile; ScaleX: Single=1.0; ScaleY: Single=0.0;
XOff: single=0.0; YOff: single=0.0;
TextPositioning: TPdfCanvasRenderMetaFileTextPositioning=tpSetTextJustification;
KerningHScaleBottom: single=99.0; KerningHScaleTop: single=101.0;
TextClipping: TPdfCanvasRenderMetaFileTextClipping=tcAlwaysClip);
add uses synfpcmetafile,it disp many error:
SynPdf.pas(3010,8) Error: Wrong number of parameters specified for call to "GetFontData"
font.inc(135,10) Error: Found declaration: GetFontData(LongWord):<record type>;
SynPdf.pas(3014,6) Error: Wrong number of parameters specified for call to "GetFontData"
font.inc(135,10) Error: Found declaration: GetFontData(LongWord):<record type>;
SynPdf.pas(3029,57) Error: Incompatible type for arg no. 7: Got "LongWord", expected "PDWord"
SynPdf.pas(3135,38) Error: Call by var for arg no. 3 has to match exactly: Got "PChar" expected "Byte"
SynPdf.pas(3149,38) Error: Call by var for arg no. 3 has to match exactly: Got "PChar" expected "Byte"
Lazarus 2.24 FPC3.2.2
Offline
At least the mORMot 2 unit (should) compile with FPC and Windows.
You probably just want the complete mORMot 2 package. Compiling just the mormot.ui.pdf.pas will pull in everything else anyway.
Compiling mORMot 2 on Lazarus/FPC trunk (from 2 months ago) works fine.
I only had to include mormot.ui.pdf.pas and mormot.lib.uniscribe as files in my console project because they are not in the mormot2ui.lpk.
(mormot.ui.report.pas is missing there too)
I did get this message during install of mormot2ui.lpk.
Suspicious include path
The package mormot2ui 2.0.1 adds the path "$(PkgIncPath)" to the include path of the IDE.
This is probably a misconfiguration of the package.
It probably doesn't add the path to the include path.
The path is in the package but somehow it doesn't get included automatically to the project when adding mormot2ui as requirement.
Manually setting "mORMot2\src\ui;mORMot2\src\lib" as "Other unit files" in projects options works too.
After that, creating a PDF with TPdfDocumentGDI isn't a problem.
Can't speak about the rest of mORMot 2
But overall, using mormot.ui.pdf shouldn't be too hard on Lazarus (Windows, I didn't test Linux).
BTW. mormot2ui should install designtime components, shouldn't it?
I don't think it does. It does have the "Install" button but I don't think it really installs anything.
(or I'm just looking in the wrong place)
Edit: Ah, this probably answers it
// do-nothing-unit on non Delphi + Windows system
// = not yet compatible with FPC/LCL due to a lot of Windowsims and VCLisms :(
procedure Register;
begin
end;
Last edited by rvk (2023-11-22 19:42:38)
Offline
You are right, mormot2ui does not install any component - there is no component installed with Lazarus packages anway IIRC.
Note that mormot.ui.pdf would work on Windows only, as documented in the unit.
Online
You are right, mormot2ui does not install any component - there is no component installed with Lazarus packages anway IIRC.
No, components are installed via packages in Lazarus. Same as with Delphi. Only when you click Install the whole IDE (lazarus) gets re-compiled.
Now the mormot2ui package is made as an install (design-time) package which recompiles the IDE while this shouldn't be necessary because there is no components installed. So it can just be a non-design package (same as the mormot2).
It does work as it is now but "Install" wouldn't be needed I think.
Unless components are added.
BTW. In Delphi only the path is added to the project after which everything gets compiled automatically. This could also be done the same way with Lazarus or FPC. But a package could add that path automatically which is easier. But I think the package could also just contain all the needed paths without adding all the files specifically (but somehow that doesn't work correctly now). I will look into that.
Note that mormot.ui.pdf would work on Windows only, as documented in the unit.
Ah, yeah, I didn't look at that. I think FPC has its own fcl-pdf package anyway.
Offline
Ah, yeah, I didn't look at that. I think FPC has its own fcl-pdf package anyway.
Yes, fpc-pdf is cross-platform, but has not the same featureset - especially no support of regular TCanvas drawing or windows metafiles (nor encryption or other advanced features). My guess it is also slower.
Online
Pages: 1