Home Devices
New Blog Posts: Merging Reports - Part 1 and Part 2

WPTools and Gnostice-PDF-Export

edited February 2008 in Devices
Hi!

I am using the WPTools for Richtext and would like to use Gnostice for
PDF-Export. But the Interface isn't compatible ('Startline' is missing)
so the whole WPTools-Richtext isn't exported.

Gnostice isn't really helpful in this way (I have to search for a
solution on my own).

Does anybody know a solution for this or is the only way to use the
PDF-Export for WBCUbed?

Gruß aus den Bergen
Günter

Comments

  • edited February 2008
    Hi,

    I've got exactly the same troubles. Please let me know if there's a
    solution.

    Regards

    Toni

    --
  • edited February 2008
    Günter Kieninger wrote:


    I resolved the issue so far.

    In gtRBExportIntf.pas change the routine to:

    procedure TgtRBXport.DrawWpRichText(aDrawWPRichText:
    TppDrawWPTRichText);
    var
    lMetaFile: TMetaFile;
    LUnit: TgtUnitType;
    lRect: TgtRect;
    s: string;
    pos: Integer;
    begin

    lMetaFile := TMetaFile.Create;

    if (aDrawWPRichText.EMFStream <> nil) and
    (aDrawWPRichText.EMFStream.Size > 4) then
    begin
    aDrawWPRichText.EMFStream.Position := 0;
    lMetafile.LoadFromStream(aDrawWPRichText.EMFStream);
    end;

    try
    if (lMetafile = nil) and (aDrawWPRichText.RichTextStream.Size >
    0) then
    begin
    SetString(s, PChar(aDrawWPRichText.RichTextStream.Memory),
    aDrawWPRichText.RichTextStream.Size);
    pos := 0;
    lMetafile := WPRenderMeta(aDrawWPRichText.Width,
    aDrawWPRichText.Height, s, pos);
    s := '';
    end;
    except
    end;

    LUnit := FEngine.MeasurementUnit;
    FEngine.MeasurementUnit := muMM;

    lRect.Left := aDrawWPRichText.Left div 1000;
    lRect.Top := aDrawWPRichText.Top div 1000;
    lRect.Right := aDrawWPRichText.Width div 1000+lRect.Left;
    lRect.Bottom:= aDrawWPRichText.Height div 1000+lRect.Top;

    IgtDocumentEngine(FEngine).PlayMetafile(lRect, lMetaFile);

    FEngine.MeasurementUnit := LUnit;

    lMetaFile.Free;

    end;







    After that you have to recompile Gnostice as described in the help.
    This works for me now (WPTools 5, D7ent, RB10.7).

    Regards

    Toni








    --
This discussion has been closed.