Page 1 of 2
Portion of EMF image file is missing
Posted: Tue Dec 18, 2012 5:45 pm
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.
Could the scale of the wmf image in the original report cause something like this?
Looking for suggestions.
Re: Portion of EMF image file is missing
Posted: Thu Dec 20, 2012 7:20 am
by HighAley
Hello.
Please, send us the emf file for analysis and your report template with data to reproduce your issue.
Thank you.
Re: Portion of EMF image file is missing
Posted: Thu Dec 20, 2012 5:56 pm
by EricJMc
Aleksey:
I have attached the requested files.
Re: Portion of EMF image file is missing
Posted: Fri Dec 21, 2012 11:48 am
by HighAley
Hello.
Sorry, we need a little more time to prepare an answer for you.
Thank you.
Re: Portion of EMF image file is missing
Posted: Fri Dec 21, 2012 2:17 pm
by EricJMc
Aleksey:
Thank you for looking into this issue.
Re: Portion of EMF image file is missing
Posted: Sat Dec 22, 2012 10:48 am
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.
Re: Portion of EMF image file is missing
Posted: Mon Dec 24, 2012 2:45 pm
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?
Re: Portion of EMF image file is missing
Posted: Wed Dec 26, 2012 10:54 am
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.
Re: Portion of EMF image file is missing
Posted: Wed Dec 26, 2012 2:22 pm
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.
Re: Portion of EMF image file is missing
Posted: Wed Dec 26, 2012 11:07 pm
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?