Beiträge von mschumann

    Thanks - the keyword is "how it is displayed". I exported immediately after doing the reformat without giving wptools the chance to update the displayed document. After inserting a small loop doing "application.processmessages" between reformat and pdf export it runs like clockwork! Great. I love wptools!

    I use WPTools 7 and WPdf 4 to print a document created based on a docx template. In that document I have a table formatted not to have page breaks within a row.

    This works perfecly well but if I export the document to pdf the page break is different - what astonishes me.

    The problem is that the export seems to ignore the "don't break table rows" attribute.

    Is there a way to reproduce the pages in WP tools exactly like in WPTools?



    So finally I nearly got everything how I want it. The last thing I need help with: How do I make the first row of the table the repeating header.?I did not find a WPAT code for that. Would you mind helping me with this? Thanks in Advance!

    P.S. I am aware of the fact, that HTML does not support repeating headers, I was jiust thining that one could use <th> for Headers that are repeated in the document.

    Thanks. I created this loop and found the table(s). Sorry for bugging again, but I can not find out how to reformat the table to make the frst row recurring on subsequent pages and how to create grey lines between the rows. The examples worked with callbacks on page creation, this I cannot use here.

    Would you mind helping me out and showing how to:

    • using the "par" below make the first row recurring
    • optinally draw lines between the rows

    Thanks in advance

    1. par := wp.firstPar;
    2. while par <> nil do
    3. begin
    4. if par.IsTable then begin
    5. // And now, what's next?
    6. end;
    7. par := par.nextPar;
    8. end;


    This is what I do:

    1. wp.Clear;
    2. wp.DefaultAttr.SetFontName('Raleway');
    3. wp.WritingAttr.Clear;
    4. wp.loadfromfile(changeFileExt(application.exename, '.docx'));
    5. wp.MergeTextEx('', '', wpobjBookmark, [wpmergeAllTexts]);

    So the code helped a lot. But I would like to get rid of having to set the default font. It does not use the fonts from the docx file. Am I missing something? If I omit setting the Font, it uses Arial.

    Sorry that I did not make it clear.

    A template is loaded as docx, all the variables are just test phrases and are marked as bookmarks and get overwritten. One of the variables will be overwritten by a complete table served as html. I was hoping to find that table (or tables) later in the process along with theit bookmark names to do additional formatting like repeating headers and cell lines.

    It would be great if I could somehow access the (table-)object that was created by the merge process.




    i licensed the docx plugin which works well for importing a docx template. Just the font of the template is always replaced by Arial also if I set the font as base font of the WPRichtect before and after loading the docment. I would be grateful if you could help me understand what I have to do.

    I am using mailmerge in WPTools 7 to insert HTML tables into a document, it works very good except for two things that just wouldn't work:

    1. Repeat header of the table on subsequent pages

    2. paint borders only between rows not around the table.

    Any hint is very appreciated!



    I came over a problem when users fax directly out of my application and hope there is a way to solve it: The fax driver tries to make raster images out of grey shades text and this makes parts of the document invisible. This is clearly related to the fax printer driver.

    Is it possible to make wptools turn everything to black into a document what is not white or transparent? Unfortunately the fax solution has no option to do that. I hate blaming things on other software instead I want to deliver solutions ;-)



    In my application I export WPTOOLS-documents directly to PDF (WPDF3, now WPDF4) but some graphics are crippeled like this:

    I tried with the demo and could export the document correctly with the WPTools-Premium Demo app, this seems to work, so I bought a wpPDF4 upgrade. Unfortunately the problem persists. If I import the same rtf into my application.

    I temporarily solved the problem by removing the JPG image, converting it to PNG and reinserting ist. The PDF also dropped in size from 3MB to 450KB! I also tried to export the jpg from Photoshop with different settings and size, the problem persists. An other graphic (also jpg) in the same document prints well. To a normal printer everything prints fine.

    I tried all avaliable wpdf4 options but to no avail. So I suspect it must be a setting in my source WPTOOLS component that creates this error as it seems to export correctly in the wptools7 premium demo app (I also use the latest wptools 7 version).

    As my customer created hundreds of documents with this template, we cannot replace the graphic in all of them for archiving. That's why I have to find a solution.

    Sorry having bugged here!

    Next time I will first look into my code more deeply! I create the lists from a a kind of HTML by code and used chr(149) instead of ansichar(149) for the bullets. Overseen when migrating from Delphi 2007 to XE6...