Beiträge von ehimmer

    Related question:

    Why would in one case, it save the linked image using TWPTempSaveTextObjHelper, and in the other case, save the linked image using TWPOImage?

    Zitat

    {\*\wptools\wpomode0\wpoframe0{\*\wppicname{C:\\Whisper\\WhisperReporter2005\\Release\\Database\\00001\\52e592e3-96eb-4c73-af25-0285f8faa0c6\\IMG_4766.jpg}}{\*\wppicsource{C:\\Whisper\\WhisperReporter2005\\Release\\Database\\00001\\52e592e3-96eb-4c73-af25-0285f8faa0c6\\IMG_4766.jpg}}{\bin397 TWPTempSaveTextObjHelper TPF0TWPTempSaveTextObjHelper WidthTW@HeightTWpWriteRTFModewobAutomaticExtra Type:12;Name:"C:\Whisper\WhisperReporter2005\Release\Database\00001\52e592e3-96eb-4c73-af25-0285f8faa0c6\IMG_4766.jpg";Source:"C:\Whisper\WhisperReporter2005\Release\Database\00001\52e592e3-96eb-4c73-af25-0285f8faa0c6\IMG_4766.jpg";Width:2880;Height:2160;Wrap:0;ObjTag ??? }}

    Zitat

    {\*\wptools\wpomode0\wpoframe0{\*\wppicname{C:\\Whisper\\WhisperReporter2005\\Release\\Database\\00001\\52e592e3-96eb-4c73-af25-0285f8faa0c6\\IMG_4766.jpg}}{\*\wppicsource{C:\\Whisper\\WhisperReporter2005\\Release\\Database\\00001\\52e592e3-96eb-4c73-af25-0285f8faa0c6\\IMG_4766.jpg}}{\bin319
    TWPOImage TPF0 TWPOImage WidthTW@HeightTWpWriteRTFModewobBoth
    StreamNamegC:\Whisper\WhisperReporter2005\Release\Database\00001\52e592e3-96eb-4c73-af25-0285f8faa0c6\IMG_4766.jpgObjTag FileNamegC:\Whisper\WhisperReporter2005\Release\Database\00001\52e592e3-96eb-4c73-af25-0285f8faa0c6\IMG_4766.jpg }}\par


    Any ideas? Must be something I'm doing differently between the way I'm saving and restoring the two images, but not sure what it is yet.

    Thanks for any insight you can pass my way.

    What is the difference between an object which "IsImage" is true vs one which IsImage is false, but the type is wpobjImage?

    Reason for asking is that I've run into a case which is causing a TextObject that used to be identified with "IsImage", to become only identified as wpobjImage by using a binary export/import to/from XML. And when this occurs, the image does not appear (you get the X placeholder).

    I want to be able to protect text from being deleted if selected, so I set the ppProtectSelectedTextToo property. This prevents selected protected text from being deleted, but the bad side is that I can't then unprotect selected text either (i.e. once protected, it is always protected).

    Sooooo.... Would it be possible to have a "ProtectExceptForUnprotecting" property ;o)

    WPTools 5.202
    Delphi 7

    If I enable the wpUseIntervalls option for the TWPRuler, it only seems to honor the interval setting when dragging the tabstop. I seem to be able to insert a tabstop in-between an interval... to me that's OK, but unfortunately it is just another one of those things that is confusing my customers.

    Also, is the interval fixed at 1/8th inch (using units are set to wrInch)? or can I change it to 1/16th inch? Wasn't that an option in WPTools 4?

    WPTools 5.20.2
    Delphi 7

    Thanks!

    I'm trying to use your example using OnTextObjGetTextEx to adjust the page number since I might like to have a new section start page numbering at "1". For example, I'd like to have a two page cover page included, where physical page 3 starts numbering with "1 of 8". (i.e. total physical page count of 10 due to the two page cover page).

    However, when the TXTObject.Name= 'PAGE' as in your example, PrintString is always empty when using your WPPreviewDlg. Has a new page numbering technique been implemented?

    I tried the OnCalcPageNr event, and had the following code in it:

    Code
    ShowMessage( Format( 'Obj=%s, RTFPage=%d, PaintPage=%d, PrintedPage=%d',
                           [ TextObject.Name, RTFPageNr, PaintPageNr, PrintedPageNr ] ) );

    But the only time the sequence of messages made any sense was when I exported to a PDF file (i.e. PAGE/NUMPAGES cycled from 1 to number of pages as expected). When doing a Print Preview with WPPreviewDlg, it did not seem to fire.

    WPTools 5.20.2
    Delphi 7

    If I use your paragraph border dialog to set the paragraph color shading, it does not restore properly when saved/reloaded.

    Example:

    - Create a 4x4 table
    - Use the toolbar to set the paragraph color in each individual table cell, in row 1 only, to yellow.
    - use the paragraph border dialog to change cell 2, row 1 to 9% shading.
    - Save and reload... the cell's shading is now at 91%, not 9%.
    - Now for the fun stuff. Set the shading in cell 1 and cell 3, row 1 each to 9%.
    - Save and reload. Seems col 1 and col 3 are at 91%, but now col 2 is at 9%.

    Try different combinations, and you get what seems like random cell color shading upon a save and load.

    Might be time for me to update to 5.20.2 or whatever the latest is. :?

    WPTools 5.19.4
    Delphi 7

    Eric

    I'm trying to use a signature font in WPTools5. Just for the record, it works fine in WpTools4.

    For example, if I enter 5 lines where each line has a single Arial character of "a", and then select any one of the "a" characters, changing the font to the signature font, the "a" remains in Arial, yet the toolbar correctly displays the fontname. Also note that selecting any other "a", and the fontname is correctly reporting "Arial", but this will change.. keep reading.

    Now, if I save the WPRichText, and reload it, it now correctly shows the signature for that one "a" that has the signature font. Also, if I now select any of the other "a" chars, the toolbar incorrectly reports that it is Wingdings 3. Just moving the cursor over the characters, the toolbar is correct... it is only when selecting the character is when it reports incorrectly.

    So, two problems:
    1. Signature font not taking until save/reload
    2. Selecting a character after the save/reload incorrectly reports as Wingdings 3

    WPTools 5.19.4
    Delphi 7
    Signature font created from http://www.e-signature.com/ and works fine everywhere else, including WPTools4.

    Eric

    Comparing the following two function calls:

    PrintPages( 3, 3 );

    PrintPage( 3, 0, 0, [] );

    In the first case, page three prints nicely centered as expected, but in the second case, the page is shifted right about 1/4 inch and down about 1/4 inch. I guess I would have expected the output to be identical.

    On a related subject, what is the best way to print multiple uncollated page copies (i.e. page 1 three times, then page 2 three times, etc.). Currently I do the following, but seems like there might be a better way (have not looked at SuperPrint yet).

    Code
    WPRichText_Rpt.BeginPrint();
              try
                for i := pagesFrom to pagesTo do
                begin
                  for j := 1 to numCopies do
                    WPRichText_Rpt.PrintPages( i, i );
                end;
              finally
                WPRichText_Rpt.EndPrint;
              end;

    Using WPTools 5.19.4, Delphi 7

    I have a list of bullet items. If the item is bold, then bullet is also bold. This looks bad when the list has an assortment of bold and non-bold items. Is there a way to prevent the bullet character from taking on the bold attribute?

    WPTools 5.19.4
    Delphi 7


    Thanks,
    Eric

    Actually I've seen many instances where paragraphs in a document have negative indentation, meaning it starts left of the page margin. For instance, the bulk of a document has 1 inch margins, but headings are negatively indented to 1/2 inch.

    In that light, I'm not really dragging the left edge of the table outside the page area per se, just outside the margin area.

    In any case, I would think the text should stay within the table. Restricting the table to not be dragable outside the margins is fine, but be sure to restrict the text in the cell as well.

    That's all I was trying to say.

    Eric

    If you drag the left side of a table to the left of the left margin, the text in column 1 shifts left of the table.

    This can be seen even with the Wordpad5 demo.

    1. Create a table with any number of columns
    2. Drag the left edge of the table to the left of the left margin
    3. The text in the first column ends up to the left and outside of the table.

    WPTools 5.19.4
    Delphi 7

    Eric

    I found a temporary get-around that appears to get me going again. I first read in the rtf from the database into a temp WPRichText then assign it to the real WPRichText using AsANSIString as follows:

    Code
    WPRichText1.AsString := FieldByName( 'Comment' ).AsString;
    WPRichText_Cmt.AsString := WPRichText1.AsANSIString( 'WPTOOLS' );

    Must be something I'm doing wrong?

    Eric

    Still a serious issue with table sizing, even with wpDisableAutosizeTables enabled or disabled.

    If the table is indented, it does not set the width properly when reloading.

    See below for the original RTF, then the RTF after saving and reloading. The reloaded table is very narrow

    Original:

    After save/reload:

    Saving/Loading using LoadFromFile/SaveToFile seems to work fine, it is only when saving to a database field as type ftBlob where I appear to have problems. Using Advantage Local Database SQL like this:

    Code
    SQL.Add( Format( 'UPDATE ReportComments' +                 ' SET Comment = :memoData' +                 ', CheckboxesChecked = ''%s''' +                 ' WHERE ReportID = ''%s''' +                 ' AND CommentID = ''%s''',                 [ cbCheckedList.Text,                   curReport.ReportID,                   curComment.CommentID ] ) );ParamByName( 'memodata' ).DataType := ftBlob;ParamByName( 'memoData' ).AsBlob := WPRichText_Cmt.AsString;ExecSQL;

    And read it back in using:

    Code
    WPRichText_Cmt.AsString := FieldByName( 'Comment' ).AsString;

    WPTools 5.19.4
    Delphi 7

    Eric

    I'm not sure when this started, but I think it started with 5.19.xxx. Now when I export to PDF using wPDF, there are what appears to be random bookmarks showing up in the PDF bookmark outline.

    I looked at the RTF in the WPRichText, and there are TOC1 or TOC0 tags throughout, but I never added them specifically. How did they get in there, even on empty paragraphs?

    Another thing, I don't configure PDFExport to create an outline (CreateOutlines=False), but these TOC entries are still causing outline entries being added to the PDF file's bookmark outline. I seem to remember something a while back about auto-bookmark/TOC outline creation or something, but I can't find it to turn it off. But of course, eliminating those TOC's is preferred.

    WPTools 5.19.3
    Delphi 7

    Thanks,
    Eric