Hi, I have problem with wPDF export device for Report Builder. I am using the latest wPDF 3.75 with Report Builder 14.04 in Delphi XE2 Update 4.
If I try to print report to wPDF device, I always get "Cannot start PDF document" error. You can duplicate this error easily by creating sample application with TppReport + TButton + TSaveDialog components. In the OnButtonClick event write code:
var
MD: TppwPDFDevice;
begin
if SaveDialog1.Execute then
begin
MD := TppwPDFDevice.Create(nil);
try
if MD <> Nil then
begin
ppReport1.AllowPrintToFile := True;
ppReport1.BackgroundPrintSettings.Active := False;
ppReport1.BackgroundPrintSettings.Enabled := False;
ppReport1.ShowPrintDialog := False;
ppReport1.InitializeParameters;
MD.FileName := SaveDialog1.FileName;
MD.Publisher := ppReport1.Publisher;
ppReport1.PrintToDevices;
end;
finally
MD.Free;
end;
end;
If you run the app, you get the message. The empty file will be created.I used this code in the prior ReportBuilder version 12 and all works as expected.
Petr Slípek.