Report Builder 14.04 + wPDF 3.75 - Cannot start PDF document

  • 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.

    • Offizieller Beitrag

    Hi,

    I couldn't get RB14 to work yet on Win7-64. Did you try to place a breakpoint near the line where BeginDoc is called in the unit wppdfRBDev?

    Mabye it tries to export to a protected directory, such as the application directory?

    Julian