DevExpress and wPDF - wide grid won't convert properly

  • Hi guys,

    I'm using DevExpress & wPDF to export grid to pdf.
    When the grid is quite wide pdf export doesn't work as expected. All the cells appear to be blank. If grid is not wide it works just fine.
    If I do CopmonentPrinter.Preview it displays report properly(see my code).
    Any tips?


    there's my code:
    PDFPrinter.Filename := FileName;
    if PDFProperties.Execute then
    begin
    ComponentPrinter.RebuildReport( nil);
    //PDFPrinter.Filename := FileName;
    PDFPrinter.Modes := [wpClipRectSupport,wpAlwaysHighResPDF];
    res := Screen.PixelsPerInch;
    // settings for A4 formatted page
    //w := Round(21/2.54*res);
    //h := Round(29.7/2.54*res);
    WPDF_Start('secret','secret');
    PDFPrinter.BeginDoc;
    try
    for I := 0 To ComponentPrinter.GetPageCount - 1 Do
    begin
    with ComponentPrinter.CurrentLink.RealPrinterPage Do
    begin
    w := MulDiv(PageSizePixels.X,res, 100);
    h := MulDiv(PageSizePixels.Y,res, 100);
    PDFPrinter.StartPage(w,h,res,res, 0);
    ComponentPrinter.PaintPage(PDFPrinter.Canvas,I, Rect(0,0,w,h),PaintRectPixels);
    //ComponentPrinter.PaintPage(PDFPrinter.Canvas,I, Rect(0,0,PageSizePixels.X, PageSizePixels.Y), PaintRectPixels);
    ComponentPrinter.Preview(True,ComponentPrinter.CurrentLink);
    end;
    PDFPrinter.EndPage;
    end;
    finally
    PDFPrinter.EndDoc;
    end;
    end;

    • Offizieller Beitrag

    Hi,

    In the version I got from DevExperss (V3) it worked fine. They are using a printing code which is using unusual high coordinated, beyond the 64K range. wPDF detects that situation but it is possible that the printing suite has been changed and cannot be detected anymore. You may send me a metafile and I check that out.
    PDF only allows coordinates up to 32K.

    Julian Ziersch