Portion of EMF image file is missing

Stimulsoft Reports.NET discussion
EricJMc
Posts: 8
Joined: Tue Dec 18, 2012 5:06 pm

Portion of EMF image file is missing

Post by EricJMc »

We are generating a report or label for individual parts. Each label contains information specific to that item as compiled in the report and has a .wmf part image embedded. When exporting the report or label for a third party we export the entire report as an emf image for their label printer.

The method is something like this:

BuildReportObject(ReportObj, Report, DatabasePath, ReportCategoryType) - gather information for the report
Report.Compile() - place information about that part in the report including the part image
Report.ExportDocument(Stimulsoft.Report.StiExportFormat.ImageEmf, Path.Combine(DestinationPath, PartName& ".emf"))

The problem is that while the part image (what started out as a .wmf image) is visible when viewed in windows file previewer it does not show up when viewed by the third party software or by Corel Draw as pointed out by the customer.

Image

Image

Could the scale of the wmf image in the original report cause something like this?

Looking for suggestions.
Last edited by EricJMc on Mon Dec 24, 2012 2:25 pm, edited 1 time in total.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Portion of EMF image file is missing

Post by HighAley »

Hello.

Please, send us the emf file for analysis and your report template with data to reproduce your issue.

Thank you.
EricJMc
Posts: 8
Joined: Tue Dec 18, 2012 5:06 pm

Re: Portion of EMF image file is missing

Post by EricJMc »

Aleksey:

I have attached the requested files.
Attachments
MicrovellumWorkOrder.zip
Data Set
(458.24 KiB) Downloaded 138 times
EMF Files.zip
Emf Files
(38.15 KiB) Downloaded 136 times
NestPartLabel.mrt
Report Template
(60.62 KiB) Downloaded 171 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Portion of EMF image file is missing

Post by HighAley »

Hello.

Sorry, we need a little more time to prepare an answer for you.

Thank you.
EricJMc
Posts: 8
Joined: Tue Dec 18, 2012 5:06 pm

Re: Portion of EMF image file is missing

Post by EricJMc »

Aleksey:

Thank you for looking into this issue.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Portion of EMF image file is missing

Post by HighAley »

Hello.

We create wmf file using the GDI+ library.
The file is created in the EmfPlusDual type. So this file could be opened by programs that use GDI and GDI+.
We have made an investigation and have found out next occasional thing.
If there is a Metafile in the report then such problem occurs when you open exported file in the program that use GDI.
And there is alright in the GDI+ application. So this problem in the GDI+ library and we can not affect it.

Thank you.
EricJMc
Posts: 8
Joined: Tue Dec 18, 2012 5:06 pm

Re: Portion of EMF image file is missing

Post by EricJMc »

Aleksey:

Thank you for the information. Do you have any suggestions as to how we can modify our report image so that it could be viewed on a system that is using GDI instead of GDI+ ? Should we save the report image in a different format and then convert it - or something similar?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Portion of EMF image file is missing

Post by HighAley »

Hello.
EricJMc wrote:Thank you for the information. Do you have any suggestions as to how we can modify our report image so that it could be viewed on a system that is using GDI instead of GDI+ ? Should we save the report image in a different format and then convert it - or something similar?
The one way that we can provide you now is to embed other then wmf images in your report.

Thank you.
EricJMc
Posts: 8
Joined: Tue Dec 18, 2012 5:06 pm

Re: Portion of EMF image file is missing

Post by EricJMc »

Alesksey:

Thank you I had the same thought. Instead of changing the embedded image I exported the report as a bitmap in a memory stream and then saved it to file as an EMF which seemed to work. After doing so I read several articles that indicated this would not work because the files are not really saved as true emf files but png files with an emf extension instead.

I will do a little more investigation and may have to do as you indicated and use a different image format on the report if possible.
EricJMc
Posts: 8
Joined: Tue Dec 18, 2012 5:06 pm

Re: Portion of EMF image file is missing

Post by EricJMc »

Aleksey:

Can the Report.ExportDocument be used to output emf files in multiple formats? For example, I believe other methods output a dual plus format emf and the older GDI format. Are there options within the StiExportSettings that I could try?
Post Reply