TWPRichText -load-save docx - with EXTRA INTERNAL table borders

  • Hello :)

    I'm trying the do the following using TWPRichText:

    1. Load doc1 from file:

    Code
    var
       doc1, doc2: TWPRichText;
       ............
    
       doc1.LoadFromFile('souce.docx');
       doc1.Header.PageSize := wp_DinA4;
       doc1.ReformatAll();

    2. Save doc1 to file:

    Code
       doc1.SaveToFile('test1.docx');

    3. Copy doc1 to doc2 using the following code:

    4. Save doc2 to file:

    Code
     doc1.SaveToFile('test2.docx');

    I open the three files (source.docx, test1,docx, test2.docx) in MSWord.

    Please follow the link to see the screenshots of the files open in MSWord:

    <edit: sorry we do not allow links for security reasons>

    The saved files (test1.docx and test2.docx) the internal borders of the main table are visible.

    They are not visible in the original file (source.docx)


    Einmal editiert, zuletzt von wpsupport (12. September 2019 um 06:50) aus folgendem Grund: Moderator: sorry we do not allow links for security reasons

  • Hi,

    The problem is with WPTools 7.

    Here in the sample I copy the the file just for test - to see if the same effect will appear:

    "test1.docx" - without copy

    "test2.docx" - with copy

    But in my main application I need to keep original WPRichText unchanged as a "template" and have copies of it which I will modify with some dynamic data.

    FYI:

    I had a source.rft file and saved it as source.docx using MSWord (no changes - just SaveAs...) because I need to work with .docx from now on in my application.

    So I use this source.docx

    I don't have this problem with source.rtf file - table is fine there.

    Best Regards

    Einmal editiert, zuletzt von longjohn (12. September 2019 um 08:24)

  • Thanks for the reply.

    1. About the table - You mean this property should be set during creating of the .rtf-document in MSWord, right ?

    this is about the "shrink-ed" columns/cells ?

    2. And what about the docx-document problem - the inner borders are hidden in the original document but visible in the document saved by WPTools?


    Best Regards

    Einmal editiert, zuletzt von longjohn (13. September 2019 um 16:14)

  • Hi,

    Thank you for the guidance :)

    We made some experiments with size of table, columns and cells and we've managed to get what we need with .rtf-template :)

    Do you have any idea about the other problem I described - with .docx-template:

    Some inner borders of the table which are set to be invisible in the template and after wptools processing the are visible.

    I've tried to hide/show all borders together, one-by-one etc. - but unfortunately no effect.

    It would be great if you could give some advice.

    Best Regards