Beiträge von Thomas Grimm

    Hello,

    we use mail merging with fields.
    In the former Version 1.82.2 the editor display the merge field as
    <<Variable>>
    after updating to a newer Version, we also tested Version 1.95.0 (19.01.2013), the fields are displayed as
    VariableVariable>>

    Is it a bug or a feature?
    If it is a feature, what can we do to deactivate it.

    Kind regards

    Thomas

    Hello,

    if we create a red table-cell and directly export it to HTML, the file is okay (red background), only after saving it to the database by SaveToString(..."RTF-nobinary") and reading it from database by LoadFromString(..."RTF-nobinary") the export to HTML is corrupted (white background).

    Here is the WPT-Data after loading from database:

    Code
    <!WPTools_Format V=610/>
    <GlobalPageFormat wpcss="landscape:0;paperw:12240;paperh:15840;margr:1800;margl:1800;margt:1440;margb:1440;marg_header:720;marg_footer:720;deftabstop:720;marginmirror:0;"/><StandardFont wpcss="CharFont:'Arial';CharFontSize:1100;"/>
    <variables>
    <variable name="Generator" data="ansi" text="WPTools_6.060-PRM#c;"/></variables>
    <numberstyles></numberstyles>
    <stylesheet></stylesheet><table name="cfafa544-271b-407a-815c-84fdc39b989b" wpsty=[[BoxWidth:8606;BoxWidth_PC:10000;]]><tr><td wpsty=[[IndentLeft:0;IndentFirst:0;IndentRight:0;Alignment:1;BorderWidthB:10;BorderWidthR:10;BorderWidthT:10;BorderWidthL:10;FGColor:clRed;BGColor:clRed;ShadingValue:0;BorderFlags:15;]]><cs nr=1 wpsty=[[CharCharset:1;CharFontSize:1400;CharStyleMask:1;CharStyleON:1;]]/><c nr=1/>Überschift</td>
    </tr>
    </table>
    <div></div>

    Sincerely yours

    Hello,

    I want to generate HTML from a text with tables. The table has red background with white text.

    Using the function editor.Memo.SaveToString(false, "HTML") generates a table with white background and white characters. If I use a simple paragraph the backgroud is okay.

    Which option I forgot or what can I do?

    If I use the Option "BPropSel.wpViewOptions, 0, BPropVal.on" some borders did not appear on the screen.
    First I made a table without any border. Than I marked an inner gridcell. The left and the upper border are shown (if set) correctly, the bottom and right shown are never shown. In a previewwindow without the Gridline-Option the right and bottom border has been shown as I ascpected.

    Hallo,
    which Option should I use to Jump with a Tab from one tablecell to the next?
    I tried the following flags:

    Hallo,
    in my application I wrote a small text "Hallo World" an then i call the wpaProcedure "BOuter" within the paragraph. There is a Border around the paragraph but on the top the border is missing at the Text an at the bottom is no border. What is wrong in my application. The Testapplication works with a Border around the whole Parapraph.

    Hallo Julian,

    My Output-Window for Console in Visual Studio reports only my own Logs.

    Delete the ReformatAll has no influence to my Problem.

    Disable the watermark code (no eventhandler or Option #32) does not fit the problem.

    Using the new Version 1.36.1 does not solve the problem.

    SavePageAsMetafile runs a little bit better, no emf-File was empty, but not at every page the watermark-Routine was called. It sems to be like a randomnumber genarator which page gets a Watermark. A new call to build the same 4 pages will bring a new result.

    Using the SavePageAsMetafile is okay, but the watermark should be on every page.

    An idea to solve the Problem?

    The GetPageAsMetafile-Function returns very ofter Zero and I don't know why. Is there any chance to get the Error-Code?
    Sometime when I am in the Debugger the function returns a correct handle and sometimes not. The last test result with the same original text (2 pages)
    first time every thing okay, secound and third try no page loaded fourth try only page 2 loaded.

    Here are some parts of my c# code

    //// Part 1 Filling copy of the original text and try to get Metafiles
    //////////////////////////////////////////////////////////////////////////

    public TextDynamicPreviewDialog(WPDLLInt editorToBePreviewed)
    {
    InitializeComponent();

    WPDLLInt editorToPreview = new WPDLLInt();
    TextDynamicHelper.RegisterEditor(editorToPreview);

    editorToPreview.Memo.LoadFromString(editorToBePreviewed.Memo.SaveToString(false, "RTF"), false, "RTF");

    editorToPreview.SpecialTextAttr(SpecialTextSel.wpInsertpoints).Hidden = true;

    editorToPreview.OnPaintWatermark += new WPDLLInt.PaintWatermarkEvent(TextEditor_OnPaintWatermark);

    editorToPreview.Memo.ReformatAll(true, false);

    pages = new Metafile[editorToPreview.Memo.TextCursor.PageCount];

    for (int i = 0; i < pages.Length; i++)
    {
    editorToPreview.Memo.ReformatAll(false, false);
    IntPtr metaHandle = editorToPreview.Memo.GetPageAsMetafile(i, 8);
    if (metaHandle.ToInt32() == 0)
    {
    pages[i] = null;
    Console.WriteLine("page " + i.ToString() + " not loaded");
    }
    else
    {
    Metafile aMetafile = new Metafile(metaHandle, true);
    pages[i] = aMetafile;
    }

    }

    editorToPreview.OnPaintWatermark -= TextEditor_OnPaintWatermark;


    //// Part 2 OnPaintWatermark-Event
    /////////////////////////////////////////////////////////////////////////////////
    void TextEditor_OnPaintWatermark(object Sender, int Editor, int Mode, Graphics Canvas, float X, float Y, float X1, float Y1, float Xres, float Yres)
    {
    Canvas.DrawString("OnWatermark Editor=" +
    Editor.ToString() + "; Seite=" + (Mode & 0xffff).ToString() + "; Pos1=" +
    X.ToString() + "/" + Y.ToString() + "; Pos2=" +
    X1.ToString() + "/" + Y1.ToString() + "; Auflösung=" +
    Xres.ToString() + "/" + Yres.ToString(),
    new Font("Arial", Convert.ToInt32(12 * Xres / Canvas.DpiX)), Brushes.BlueViolet, new Point(10, 10));
    }