You are not logged in.
Pages: 1
I'm fairly new to using TCanvas and synPDF so this has probably been answered somewhere else. I just can't find it.
We are designing a PDF report using the VCLCanvas (TCanvas). The report looks fine when it is generated on system that is using a normal font size (96 DPI). When we generate the PDF on a system using a large font size (120 DPI), the font size increases on the PDF.
Is there a way or some formula I can use to make sure the font on the Canvas stays the same regardless of the system font setting?
That works! I just uncommented the {.$define PUREPASCAL} already defined in synopse.inc.
Thanks
Do I need to do that explicitly? The Variants is in the uses clause for the SynCommons.pas file.
I'm not sure how I would add the Variants unit to the project file itself.
I did some more poking around and the problem seems to be that I want to add the synpdf source files to its own package. Here is the package source that I have:
package synpdf_proj;
{$R *.res}
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$DESCRIPTION 'SynPDF'}
{$RUNONLY}
{$IMPLICITBUILD OFF}
requires
rtl,
vcl;
contains
SynZip in 'SynZip.pas',
SQLite3Pages in 'SQLite3Pages.pas',
SynCommons in 'SynCommons.pas',
SynGdiPlus in 'SynGdiPlus.pas',
SynLZ in 'SynLZ.pas',
SynPdf in 'SynPdf.pas';
end.
Any ideas how I can work around the above error?
I've added the source directly to my application project and it seems to compile without error but I would like to use in a couple of applications so it would make more sense to create a package.
There there are warnings and an Error. The error is failing compilation. I was just trying to also clean up the warnings so I posted a hack to fix the problem.
The error is [DCC Error] E2201 Need imported data reference ($G) to access 'VarCopyProc' from unit 'SynCommons',
I tried to include {$IMPORTEDDATA ON} and {$G+}in the .inc file but it didn't make a difference.
Hi,
I posted some comments here with a similar problem with mORMot.
I received the following errors while trying to compile synPDF:
[DCC Warning] synpdf_proj.dpk(41): W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
[DCC Warning] synpdf_proj.dpk(41): W1032 Exported package threadvar 'SynCommons.SynLogFileIndex' cannot be used outside of this package
[DCC Error] E2201 Need imported data reference ($G) to access 'VarCopyProc' from unit 'SynCommons'
[DCC Warning] W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
I found this note on the embarcadero forum that describes one of the warnings:
An object file is being generated and Two, differently named, constructors or destructors with identical parameter lists have been created; they will be inaccessible if the code is translated to an HPP file because constructor and destructor names are converted to the class name. In C++ these duplicate declarations will appear to be the same function.
I fixed the following warnings by changing the signature of this CreateFrom constructor to include a default integer parameter that does nothing.
[DCC Warning] synpdf_proj.dpk(41): W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
[DCC Warning] W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
constructor CreateFrom(const aFileName: TFileName; param:integer=0);
I found this note on the embarcadero forum that describes the warning:
An object file is being generated and Two, differently named, constructors or destructors with identical parameter lists have been created; they will be inaccessible if the code is translated to an HPP file because constructor and destructor names are converted to the class name. In C++ these duplicate declarations will appear to be the same function.
I fixed the following warnings by changing the signature of this CreateFrom constructor to include a default integer parameter that does nothing.
[DCC Warning] synpdf_proj.dpk(41): W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
[DCC Warning] W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
constructor CreateFrom(const aFileName: TFileName; param:integer=0);
Hi,
I have a similar problem with D2007 for Win32 Professional. I get the following error and warnings:
[DCC Warning] synpdf_proj.dpk(41): W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
[DCC Warning] synpdf_proj.dpk(41): W1032 Exported package threadvar 'SynCommons.SynLogFileIndex' cannot be used outside of this package
[DCC Error] E2201 Need imported data reference ($G) to access 'VarCopyProc' from unit 'SynCommons'
[DCC Warning] W1029 Duplicate constructor 'TZipWrite.CreateFrom' with identical parameters will be inacessible from C++
Edit: Just realized I was in the wrong area. I received these errors while compiling synPDF.
Pages: 1