You are not logged in.
Pages: 1
Is there an example in which was used TPDFForm class?
Romek
Hi,
I have a problem with the constructor of TPDFForm.
constructor TPdfForm.Create(aDoc: TPdfDocumentGDI; aMetaFile: TMetafile);
(...)
P := TPdfPageGDI.Create(nil); // 1
try
oldPage := FPage;
FPage := P;
with aDoc.FCanvas do
begin
try
(...)
FPage.SetPageHeight(H); // 2
(..)
finally
if oldPage <> nil then
SetPage(oldPage);
end;
end;
1. TPdfPageGDI.Create(nil) don't initialize FMediaBox (from TPdfPage);
2. in method
procedure TPdfPage.SetPageHeight(AValue: integer);
begin
TPdfNumber(FMediaBox.Items[3]).Value := AValue
end;
attempts to an uninitialized variable FMediaBox raise exception.
If this constructor is correct?
Romek
Pages: 1