WMF Picture Format Distortions in VPE 3.5

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

WMF Picture Format Distortions in VPE 3.5

Postby firstlight » Fri Oct 21, 2005 6:57 pm

Hello Everyone,

After upgrading to the VPE 3.5 Active X component, I have experienced an intermittent problem while printing windows metafile (wmf) diagrams from a Visual Basic 6.0 program. About 10% of the time, the diagrams are distorted, flattened, or squeezed on the x or y axis. Sometimes the image appears normal except that one or more objects in the diagram will be flipped like a mirror image, or maybe the font size of some text or an arc will balloon up to a huge size relative to the rest of the picture.

Another common occurrence happens when printing a series of diagrams in sequence. The first diagram prints correctly, but the subsequent diagrams print with the same renderwidth as the first one, as if Vpe hasn't let go of the x1, x2 settings. (I am closing each doc after printing before opening the next one.)

Here is the code I am using:

' Call mForm.cVPE.RenderPicture(VFREE, 724, App.Path & "\EASYVPE.WMF", PIC_KEEPIMAGE)
' Call mForm.cVPE.Picture(800 - Int(mForm.cVPE.nRenderWidth / 2), 1066, VFREE, 1790, App.Path & "\EASYVPE.WMF", 0)

If anyone has experienced a similar problem, please reply.
firstlight
 
Posts: 5
Joined: Fri Oct 21, 2005 5:59 pm

Postby IDEAL Software Support » Mon Oct 24, 2005 3:14 pm

Is it in VPE v3.50 or v3.60?

If it is in v3.60 (you can also test with the trial version), please send the WMF file to our support e-mail address and we will have a look.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby firstlight » Mon Oct 31, 2005 11:12 pm

It is in VPE 3.5 but I have also tried it in the trial version of VPE 3.6 with the same results. I will email some samples of the wmf files to your email support address.

Thank you.
firstlight
 
Posts: 5
Joined: Fri Oct 21, 2005 5:59 pm

Postby IDEAL Software Support » Thu Nov 03, 2005 4:22 pm

Thank you for sending two sample WMF files by e-mail.

In your e-mail you wrote:

>>
Here are two wmf files that should illustrate this problem. When you open one of them in VPE 3.5 or VPE 3.6, preview or print mode, it will display correctly. If you then open the other file, it will have the same renderwidth as the first file. It does not matter which file you open first, but the VB application must continue to run without being stopped.

I am using a Visual Basic 6 application with Windows XP SP1 and I have also tried it on Windows 2000 SP5. The problem does not occur with VPE 3.0.
<<

The attached files are named: ESD2VPES.WMF and ESD2VPEL.WMF

This brings up the question, if both files have *identical* filenames when you are using them with VPE. This will conflict with the image cache of VPE, because VPE caches the information about the width and height of an image for a specific filename. This might be the cause for your problem, please let me know.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby firstlight » Thu Nov 03, 2005 10:19 pm

Yes, the file always has the same name, "EASYVPE.WMF". It is killed and recreated each time the code is used, because there might be hundreds of pictures that get printed each time the program runs.

I tried stringing a variable into the file name so it changes the name each time, and that seems to fix the problem. However, I am wondering if there is a command or a setting that I can use to disable the image cache instead. I tried setting the picture cache size to 0 and not using PIC_KEEPIMAGE, but that didn't work. Is there some other way to do it?

Also, is this a new feature in VPE versions 3.5 and above?

Thank you.
firstlight
 
Posts: 5
Joined: Fri Oct 21, 2005 5:59 pm

Postby IDEAL Software Support » Fri Nov 04, 2005 3:29 pm

The image cache of VPE is a multi-level cache (3-level to be correct). On the top-level VPE caches information about an image (its name, type, width, height and other). This top-level is not influenced by the PIC_KEEPIMAGE flag or by the cache-size (it is only limited by an internal hard-coded number of image-informations which are cached). You can not change this behaviour and therefore different images may not have identical filenames.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby firstlight » Fri Nov 04, 2005 4:36 pm

This appears to be a change from previous versions of VPE. Is there a topic that discusses it in the programmer's manual or the ActiveX reference help?

Thanks.
firstlight
 
Posts: 5
Joined: Fri Oct 21, 2005 5:59 pm

Postby IDEAL Software Support » Mon Nov 07, 2005 4:06 pm

This is currently not discussed in the manual. We will include this information in the manual with the next major release of VPE.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 17 guests

cron