#1 PDF Engine » Generating PDF on systems with 120 DPI » 2011-12-29 19:47:07

hugh
Replies: 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?

#2 Re: PDF Engine » Problem Compiling with Delphi 2007 for Win32 Pro » 2011-12-09 14:54:54

That works!  I just uncommented the {.$define PUREPASCAL} already defined in synopse.inc.

Thanks

#3 Re: PDF Engine » Problem Compiling with Delphi 2007 for Win32 Pro » 2011-12-08 19:52:51

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.

#4 Re: PDF Engine » Problem Compiling with Delphi 2007 for Win32 Pro » 2011-12-08 15:19:40

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.

#5 Re: PDF Engine » Problem Compiling with Delphi 2007 for Win32 Pro » 2011-12-06 21:24:19

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.

#6 PDF Engine » Problem Compiling with Delphi 2007 for Win32 Pro » 2011-12-06 16:26:13

hugh
Replies: 7

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);

#7 Re: mORMot 1 » D7 Personal, problem when compiling runtime package » 2011-12-06 14:57:35

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);

#8 Re: mORMot 1 » D7 Personal, problem when compiling runtime package » 2011-12-06 14:42:11

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.

Board footer

Powered by FluxBB