Skip to Content
author's profile photo Former Member
Former Member

Problem with EMF (Enhanced Metafile) image sizing displayed with Crystal Runtime


I have modified some reports to include our company logo and other vector graphics in EMF (enhanced metafile) format rather than a raster/bitmap format as before. These have the advantage of small file sizes and high quality.

These images display ok in Crystal Reports (designer) 2016, and look perfect when printed or exported to PDF. However, when being opened in our business application on a machine with the latest runtime (13.0.20) installed, the metafile images are slightly squashed vertically and do not fill the full height of the bounding box (visible when hovering the mouse over the image). The same result happens when printed or exported to PDF.

This did not happen with version 13.0.18, however the problem with that version was that some of the metafile graphics were heavily pixelated when printed. Version 13.0.19 fixed the pixelation issue but introduced the vertical squashing issue.

I have tested and for some reason the images seem to be more squashed on Windows 7 than Windows 10. I made sure the test PCs had all Windows updates installed.

Are there any plans to fix this issue in a future runtime release?

Many thanks,

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Aug 22, 2017 at 05:06 PM

    Hi James,

    Can you upload the report, no data just the image and image file to a file share so I can test it?

    Have you tried using the InterpolationMode API?

    LstInterpolationMode.Enabled = true;
    Array CRinterpolationMode = Enum.GetValues(typeof(System.Drawing.Drawing2D.InterpolationMode));
    foreach (object obj in CRinterpolationMode)
    LstInterpolationMode.SelectedItem = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;

    The default is set to NearestNeighbor, either of the HighQuality modes should fix things for you.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2017 at 04:38 PM

    Hi Don,

    Thanks for you reply. I've uploaded my test report here:

    Unfortunately this is a third-party business application and I am not the developer so I wouldn't be able to try using the API as you suggest but it might be something I can pass along to the application developers.

    I am curious as to what has changed between 13.0.18 and 13.0.19 that would have upset the sizing of EMF images. It only seems to be affecting vertical sizing and after testing on a few machines, the result is different in each case.

    Below is my machine which seems to display the images ok. I have put a black box around the first logo to show the area it should be filling. The second logo is a bitmap version to show the correct size, and this never gets squashed or stretched.

    Below is shown on another machine which shrinks the logo vertically


    Other machines shrink it even more and one I have tested expands it vertically so it gets cropped off at the bottom.

    Seems very strange and inconsistent in any case!


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.