Character spacing or positioning in WMF/EMF files

  • I'm having problems when printing WMF or EMF files with wpPDF, when trying to stretch the metafiles (make them higher).

    When using WPTools 5 and printing to a normal printer or doing a print preview, the font is a bit stretched, but the output looks good.

    When using wpPDF, the result is different, however. Since the text now needs to occupy less space (in width) than before, there is an empty space displayed between each character. This doesn't look nice.

    As a workaround, I can set the wpDontAdjustTextSpacing option, which will not put the empty spacing between the text (no text spacing is adjusted), but as a result, the "surpluss" of empty space can be seen at the end of the string. This results in strings being left-aligned. Which is fine in most situations, execpt in my case where I'm displaying graphs and x-axis labels which are now shown at funny locations.

    Using the wpExactTextPositioning results in the spaces in the labels, and it seems that wpExactTextPositioning and wpDontAdjustTextSpacing cannot be combined.
    If would be nice to have an extra option to specify that the text spacing should not be done, but that the text itself should be right aligned in the rect (instead of the default left alignment).

    This is all taken care of inside the wpPDF DLL, which is not provided in source code. The website says that source code "optionally" available - is this an option I can ask for, please? (if so, then I can go in and see if I can hack my own solution for the text labels in the WMF/EMF files).

    Thanks for any insights.

    Groetjes, Bob Swart

    • Offizieller Beitrag

    Hi,

    You can mail me a debug page (simple stretched EMF) and some text asn EMF txt and I check it out. Set ePDF.DebugMode := TRUE to get such a file

    The source is available for EURO 1200,- - it is a quite complicated simulation of the windows GDI

    Julian

  • I still have a problem with WMF files and the production of PDF files.

    I will send you by e-mail an archive with a demo application (with the DebugMode set to True) plus one RTF template file and three example WMF files, giving the choice between the wpExactTextPositioning and wpDontAdjustTextSpacing options: neither gives me the output I want.
    I also have included a button to produce the output using another PDF procing tool (from a company in India) which is actually able to produce the output I want!

    Do you have any idea if and when you can offer me an option to combine the wpExactTextPositioning and wpDontAdjustTextSpacing options, or if there is another way where wpPDF can produce the same output as the other tool can?

    Thanks in advance for your answer!

  • Hi Julian,

    Like you suggested, I added the DebugMode := True to my example application, and it created a Debug directory with a Page1.EMF file being generated inside.

    This file contains the three WMF files I've included. However, it appears that (only in this debug file) the third WMF file is a copy of the second one. The actual PDF result that is generated has the right WMF files (so only the debug EMF file is wrong?), but the PDF file suffers from the extra space between the fonts or the position (location) of the labels, as mentioned in my other messages.

    Maybe the slightly incorrect debug EMF file has something to do with the problems I'm seeing with the final printing result?

    Groetjes, Bob Swart

    PS: The demo application I sent you by e-mail shows this behaviour as well - just check the resulting Debug\Page1.EMF file!