Beiträge von chuck

    Thank you, it works….

    Checkboxes i try shortly

    var

    obj: TWPTextObj;

    multiline : boolean;

    autosize : boolean;

    fontindex : integer;

    begin

    fontindex := 0;

    multiline := false;

    autosize := false;

    if multiline

    then obj := wpedit.TextObjects.InsertClass('TWPOEditControl', 360*5, 260*5 )

    else obj := wpedit.TextObjects.InsertClass('TWPOEditControl', 360*5, 260 );

    if obj.IsImage then begin

    obj.ObjRef.ObjName := 'AFieldName';

    // (obj.ObjRef as TWPOEditControl)._AllowFrame := true;

    (obj.ObjRef as TWPOEditControl).Text.Text := 'extEdit.Text';

    (obj.ObjRef as TWPOEditControl).Hint := 'intEdit.Text';

    (obj.ObjRef as TWPOEditControl).PDFFont := TWPOEditControlPDFFont(fontindex);

    if not autosize

    then (obj.ObjRef as TWPOEditControl).PDFOptions :=

    (obj.ObjRef as TWPOEditControl).PDFOptions - [wpecAutosizeFont];

    (obj.ObjRef as TWPOEditControl).Multiline := multiline;

    if multiline

    then (obj.ObjRef as TWPOEditControl).FontSize := 10;

    end;

    end;

    pdf := TWPPDFExport.Create(nil);

    if EmbeddedFonts

    then pdf.FontMode := wpEmbedTrueTypeFonts;
    rtf := TWPRichText.CreateDynamic;

    try

    rtf.InsertPointAttr.Hidden := true;

    rtf.AsString := ASource;

    rtf.ReformatAll(true);

    pdf.Source := rtf;

    pdf.AutoLaunch := LaunchReader;

    pdf.FileName := AFileName;

    try
    pdf.Print;

    Result := true;

    except

    Result := false;

    end;

    ......

    with WPEdit.InputTextFieldName('FORMCHECKBOX') do

    begin

    Source := 'Test1';

    Params := 'true'; //'false'

    end;

    and

    with WPedit.InputTextFieldName('FORMEDITFIELD') do

    begin

    Source := 'XXX';

    Params := 'testtext' + '@@HINT@@' + 'testhint hint hint';

    end;

    end;

    I see the entries in PDF, but they are not editable

    I got it going now, though i don't know exactly why. Obviously it is very important to keep 32 and 64 Bit apart.

    Applications are compiling but are not using the appropriate dcus.

    Chuck

    Hi Julian,

    I can't get the 64Bit version to work.

    I did test it in our app... and got a read error while reading a rtf stream into the WPRichedit component. Could not easily make out what was wrong

    So i saved the text into a file and made a VCL Form with a WPRichedit and a button loading the file. 32Bit works as expected, but the 64Bit

    compilation / exe does not start (access error in FormCreate).

    What am i doing wrong.

    What has to be put into library/Source pathes

    P.S. Yes, I use the newest premium 8 version)

    Chuck

    Hi,

    there is something not correct (since using WP8).

    We generate tables and insert them via merge. After merging, the bottom frame line is lost In the original data, the line is there. When i save it, i can see the line in Wordpad.

    But when i load it again into wptools, frame line bottom is lost (same mechanism as in merging as far as i see)..

    Chuck

    .activepar.savetostring(false,'ANSI') returns a garbage string, though activepar is defined (i can color it for example).

    What might be the problem?

    Chuck

    Thank you for the answer.

    I used another way, which is compatible with WPTools-Colors.

    I made a little frame with a wprichedit, a rich label and a toolbar with color,bicolor buttons.
    So i have the preview automatically and i have the same selection of colors as in the editor.

    We do insert tables programatical into wptools. The Colors are selected by TWPCombos. These are limited to 16 colors. We would like to use
    all colors to select from like in the editor Toolbar. Color ist stored by the index (colorbynr).

    How can we select the Numbers seeing all the colors. How do the index-numbers connect to all the colors (or do the connect anyway) ?

    Chuck

    Hi Julian,

    is it possible to change the const MaxBufLen = 256 (in WPEval) to something larger like 2048 or to make it changeable from outside.

    We use some function params which are quite long.

    Greetings

    Chuck

    the WPEval handling of comparing strings is erroneous because >,>=,<,<= are used in the wrong direction, the corresponding source should be:

    wpeoLarger: ResultVar.BoolValue := CompareText(StringValue, Right.StringValue) > 0;
    wpeoEqLarger: ResultVar.BoolValue := CompareText(StringValue, Right.StringValue) >= 0;
    wpeoSmaller: ResultVar.BoolValue := CompareText(StringValue, Right.StringValue) < 0;
    wpeoEqSmaller: ResultVar.BoolValue := CompareText(StringValue, Right.StringValue) <= 0;

    Greetings

    Chuck

    WPToolsRTFToansi has a different behavior then in the versions before.
    Passing a string like '1925' to it returned exactly this string in the versions before 7, but now an empty string is returned.

    We think, the initialization of hidden is missing.

    Greatings

    Chuck, MORE PROJECTS