Delphi 6, WPTools 5.x, WPDF 2.x
I didn't notice it originally, but the PDF file we are generating from our ACE Reports using WPDF has some strange looking spacing. Like some things look too close together and the spacing is very tight.
Heck... it even has a slightly misaligned look... meaning some letters look higher or lower than the letter next to it... ever so slightly.
Here is the code for this generation:
Code
procedure TPrint2WPDF.MakePDF(aAceFileName: String);
var
n,numPages : integer;
aAceFile : TAceAceFile;
begin
aAceFile := tAceAceFile.Create;
try
aAceFile.LoadFromFile(aAceFileName);
numPages := TAceAceFile(aAceFile).AceFileInfo.Pages;
if (numPages > 0) then
begin
for n := 1 to numPages do InternSendPDFPage(aAceFile, n);
end;
finally
aAceFile.Free;
end;
end;
procedure TPrint2WPDF.InternSendPDFPage(aAceFile: TAceFile; pageno: integer);
var
res :integer;
aps: TAcePrinterSetup;
begin
aps := TAcePrinterSetup.Create;
TAceAceFile(aAceFile).GetPagePrinterInfo(aps, pageno);
res := Screen.PixelsPerInch;
StartPage(Round(aps.width*res),Round(aps.length * res),
res, res , Ord((aps.Orientation = DMORIENT_LANDSCAPE)));
try
aAceFile.PlayPage(Canvas.Handle,pageno);
// Self.Canvas.Font.Name := 'Arial';
// Self.Canvas.Font.Size := 8;
// Self.Canvas.TextOut((Round(aps.width*res) - Round(1.5*res)),(Round(aps.length * res) - Round(0.5*res)),'Page 21 of 36');
finally
EndPage;
aps.free;
end;
end;
Alles anzeigen
Perhaps using the printer as the canvas reference instead of the default display... if this is even part of the issue.
Thanks in advance.