Word Style Page Display - Please

  • I am trying to persuade my customers to switch from Microsoft Word to a word processor embedded in my application which uses WPTools. The problem I am having is that they do not like the way pages are displayed on the screen.

    Unless I am misunderstanding something, we have two choices: we can either display using screen resolution (wpfAlwaysFormatWithScreenRes) or we can display at printer resolution. Neither of these is good enough. With screen resolution, the text (and graphics) look good, but the page layout is wrong. Line breaks and page breaks are in the wrong places and do not represent the way the document will be printed. With printer resolution the line breaks and page breaks are in the correct places, but the text looks awful with irregular and strange placing of characters within the word. Moreover, photographs are distorted when they are re-scaled back to screen resolution using rather crude bitmap scaling rather than proper jpeg software.

    The reason why printer resolution looks so bad is that the paint engine (in effect) tries to place each individual character as close as possible to its actual position on the page, but because the pixel matrix is not fine enough, some characters are shifted left and others are shifted right. These adjustments can result in letters which appear to crash into one another and spaces in the middle of words which appear as wide as the spaces between the words.

    Both modes are imperfect and my customers are not prepared to compromise as MS Word does not suffer from these problems.

    The reason why MS Word appears better is that it cheats. It does not attempt to display the page exactly as it will be printed, but rather shows an approximate layout with the correct page and line breaks, but without getting too accurate about exact word and character placement.

    Please can we have a similar option within WPTools that combines the best of both options. This should works as follows: The printer resolution should be used to calculate where the line breaks and page brakes need to be. The screen resolution is then used to display the page. Where necessary pixels can be added or removed from the inter-word spaces and between paragraphs to balance the page.

    WPTools is a fantastic product, but without these changes, it looks very crude when compared to MS Word.

    • Offizieller Beitrag

    Hi,

    Zitat

    Please can we have a similar option within WPTools that combines the best of both options. This should works as follows: The printer resolution should be used to calculate where the line breaks and page brakes need to be. The screen resolution is then used to display the page. Where necessary pixels can be added or removed from the inter-word spaces and between paragraphs to balance the page.

    WPTools 4 did something like this and it was not optimal - I never want to go back there. The problem is, as soon as you zoom the page there is no "screen resolution" anymore. It would be required to recalculate all the character width for each change in the view. Recalculationg widths is quite slow while the reformatting process is very fast. This is why the character widths are cached and only calculated when really needed.


    The problems you see do not occur inside of wptools code, they are caused by windows inside the GDI when scaling from 600dpi to the actual view resolution.

    One possibility I see is to paint on an offscreen 600dpi bitmap and use an antialiased bitmap scaling method to render this to the actual editor window. This can be an option for a special edition of WPTools 6 PRO. If possible a different drawing method will be called in WPT6 to avoid this rounding errros.

    Kind Regards,
    Julian Ziersch