Beiträge von ralfiii

    Recently I wanted to make some minor changes to an application that uses WPTools to generate reports.

    Doing that I stumbled over a problem in WPDF.
    It seems the PDF/A support of WPTools has a bug.
    Clipping is not handled properly when using a metafile and GDI+
    (It's not clipped at all)

    1) A WPRichText object is created and a metafile with clipping and a gdi + polyline inserted.
    2) PDFA is set as a print option
    3) -> clipping does not seem to be working. If I don't use pdfa it works!
    4) A standard GDI polyline works! (I suppose the GDI+ metafile is written in 2 versions, a gdi and a gdi+ compatible version).

    Help!!!

    I have created a small demo-application that shows the problem.
    I've uploaded it here:


    (btw: The URL-Link-function of the forum seems not to work. And why can't I attach anything here in the forum? Would be handy.)

    I use WPTools 6 and the last wPDF version[/url]

    After upgrading from WPTools 6.2.7 to Version 6.2.8 I suddenly experience bad misbehavior:

    I create a document with dynamically inserted graphics at runtine. With the new version WPTools sometimes "forgets" to insert a pagebreak when a graphics doesn't fit on a page anymore.

    Here is some code dempnstrating the problem:
    (Just create a fresh empty project and wire the code to a button-OnClick-Event.

    When you look at the resulting printout: After the 1st graphic there's a pagebreak but after the 2nd graphic the pagebreak is missing and therefore the 3rd graphic is half-clipped.

    The 4th graphic is printed fine again...

    Please HELP!!!! It's utterly urgent.

    I'd like to insert graphics into a WPRichText.
    (The graphics are generated by the App dynamically - bitmap-graphics or wmf vector graphics. The text holds tags that are replaced by these graphics)

    Now there seem to be various ways to do that, e.g.

    Code
    // Prepare graphicgra:=TBitmap.Create;gra.LoadFromFile(AppPath+'monitor_64.bmp');  // just a sample, in reality this is painted somewhere...wpimg:=TWPOImage.CreateImage(WPRichText1.Memo.RTFData, gra);// code specific for this solutionwpimg.WidthTW :=1000;wpimg.HeightTW:=1000;WPRichText1.TextObjects.Insert(wpimg);


    or

    Code
    // first 4 lines as in the 1st sample
    
    
    wptobj:=WPRichText1.TextObjects.InsertNewObject(wpobjImage);
    wptobj.ObjRef:=wpimg;
    // object size is ignored - needs to be set here
    wptobj.Width :=1000;
    wptobj.Height:=1000;

    What's the difference, which one is recommended and is there a better way to do that?

    Thanks!

    Strange, I have a very similar problem.

    If I use

    Code
    WPRichText1.Finder.ToStart;     WPRichText1.Finder.ReplaceAll('xxxx', 'yyyy');     WPRichText1.ReformatAll(True, True);

    then it works. Unfortunately I can't use that approach. I need to evaluate tags and replace them intelligently.
    (A tag would look like this: {V Params})

    So I tried

    and this doesn't work, no matter which insertion method I choose. The formatting of the paragraph is always lost for the inserted text.

    HELP!
    Thanks!

    I didn't find useful information on this:
    What's best: Should I use this file or shouldn't I?

    In the download area I read: "RTF writer unit to avoid problem with Word"

    My users may not use Word with the reports they create for my application.
    Should I still use this unit or should I leave it away?
    (What is maintained better, stability etc.)

    Thanks,
    Ralf