Beiträge von jziersch

    Hi,

    Thanks for the insight about FreeMemoryContexts.

    I think it is best to lock the canvas handle. I use a cached handle because I also use SaveDC/RestoreDC. (Although I have a fallback function which avoids that routines on Win98)

    in PaintDesktop:

    OutCanvas.Lock;
    try
    while startpage < Length(_PaintPages) do
    .....
    inc(startpage);
    end;
    finally
    OutCanvas.Unlock;
    end;

    Julian

    >> What kind of code is useful to transfer the EMF from then TMetafile structure to the PDF.StartWaterMark call ?

    I had mentioned the required procedure calls. In fact it is really simmple:


    WPPDFPrinter1.StartWatermark('WaterM',
    MulDiv(WPRichtext.Header.PageWidth,Screen.PixelsPerInch,1440),
    MulDiv(WPRichtext.Header.PageHeight, Screen.PixelsPerInch,1440)
    Screen.PixelsPerInch, Screen.PixelsPerInch);
    WPPDFPrinter1.DrawTGraphic(0,0, metafile);
    WPPDFPrinter1.EndWatermark;


    Now in BeforePrintPage do this

    WPPDFPrinter1.UseWatermark('WaterM');

    Julian

    WPCubed TextDynamic is a new component (for dotNET and Visual Basic 6) which provides the developer with strong text editing and -creation capbilites. Special about TextDynamic is not only the strong RTF support (true header/footer, tables, nested tables, table header/footer rows, all usual character and paragraph attributes, paragraph styles, outlines, numbers and bullets) but also the included(!) HTML import and export. The user interface is customizable using XML scripts. It is even possible to change the glyphs which are displayed by the toolbars.

    Hi,

    There will be a DLL Version - also usable under .NET. Unfortunately the frmawork was not effective anough to have wptools running using managed code only.

    Julian

    Hi,

    If you get a refereneze to the current outlines style (Numberstyles) you can read the property Group from there. Now you can update all the styles (loop through NumberStyles) which use that group. Normally it should be '1'.

    The items in NumberStyles all have a property 'TextStyle'. That is the usual TWPTextStyle class which is also the anchestor of TParagragrap. To change the props use ASet()

    Julian

    Hi,

    Make sure the define USETBX is NOT defined in WPINC.INC.
    You should define it the project options.

    Open WPTools package (Packages/edit)

    Make sure the TBX package is not used by tnhe wptools package

    and form the Project menu select "Build All" (german: "Erstellen")

    Now the wptools package is built without the TBX stuff which avoids the problem.

    Julian

    Hi,

    I have received you e-mail, too. I also sent answer on 11/23 -
    I assume my answer has been caught by your spam filer.

    >> The PDF engine are the same, only the RTF2PDF part is version 3 now. You will get access to wPDFControl3 when is available.

    If you need RTF2PDF you can upgrade the wPDFControl License
    http://shareit1.element-5.de/cart.html?PRODUCT[169671]=1&language=English <<

    What kind of problem do you see - the PDF engine was really the same in that new RTF2PDF demo.

    Julian

    Hi,

    You many change EmbeddedText everywhere - but NOT in the OnMailMergeGetText event. There simply set the Contents.StringValue to change text.

    What I meant was changing in EmbeddedText in your MouseDown event - for example with the text object provided by FieldAtCP.

    Julian

    Hi,

    Zitat

    1. If you call MergeText with a name with spaces like:
    DBWPRichText3.MergeText('My Field',true);
    AND the field does exist as 'My Field' the field will be blanked out.

    I assume this is in an old, imported file. If there (see RTF code) the field names were not wrapped in "" they cannot be loaded as one name. Instead the first part will go into the Name, the second part into the 'Source' property of the TWPTextObj which represents the field start. You can add code to repair those fields - use FieldGetList and a loop.

    Zitat

    2. Also, if you ONLY do a mergetext on a DBWPRichText it does not appear to set the modified flag properly. In order for it to update to the database, I must manualy change some text within the RTF. This may be unrelated but I didn't have to do this before.

    Before you do modifications in a DBWPRichText you must call 'Changing'.

    Zitat

    3. One other question. Is there any way to do a type of 'translation' for the mergetext, because that is part of my problem here too. I may have a field in my database called 'uName', but the mergefield in the document might be 'Your Name', but they represent the same thing. Now obviously this isn't going to merge with the dataprovider because there is no db field called 'Your Name'. Would it be possible during the merge to do something like:

    If mergefield is 'Your Name' then merge 'uName' value into 'Your Name' mergefield.

    Yes, use the even OnMailMergeGetText to interpret the 'special' names. You can check out unit wpdbrich.pas to see how the data provider handles this event, it is just one screen height of code.

    Zitat

    If I could do this, I could probably get away with calling mergetext without names, which would be nice. Hope that makes sense.

    I recommend to call MergeText without names - in most cases this is not ideal. Either modify EmbeddedText directly or check for name in the event.

    Julian Ziersch

    Hi,

    a) latest version (V5.17.3) ?
    b) can you save the doc as WPT and mail it to me?

    There was a probblem with empty pars at page breaks which were duplicated on two pages, not visible ta first sight but noticable with cursor movement.

    That problem was solved in V5.16 I think.

    Julian

    Hi,

    AsnANSIString gets the text as string. The only difference to AsString is that you can specify the Format string (which now also holds the store options!)

    So AsANSIString(RTF) will get a string with RTF commands. It will not format the text, the other reader is responsible to formta the table correctly.

    Julian

    Hi,

    WPTools will always insaert a pagebreak if the page is too small for row or table. Only if possible the 'DoNotBreak' options have an effect.

    With graphics is table there was a bug in previous releses. When the table was hold togthere on the next page the graphics appeared duplicated. Maybe this is what you see?

    Julian