I'm using a trial copy of aspose.total for .NET.
I've been able to convert .msg files to PDF without the following problem behavior. For some reason, when converting the (screen shot only attached) of this one particular MSGFile, the PDF file contains an xml dump on page one (screen shot PdfConvertPg1.JPG attached).
Is there a known cause for this result on a pdf conversion? Thanks
Hi,
Thank you for inquiry.
Could you please share the sample code and source MSG files for our analysis? We will look into it.
Thanks.
I've attached the routines from my development copy of our document generation web service in file AsposeTicket-Src.txt. I've also attached the ".msg" file that was being converted. And I also included a stand-alone copy of the .xls file.
The code first converts the .msg file, then it spins through the attachments and converts and appends those conversions to end up with one consolidated PDF. NOTE: this is just one particular use case requested.
The 3 files attached are
AsposeTicket-Src.txt, Correspondence_1.msg (.ZIP), and Wright Express Service Co 2011.xls.
A 2nd issue that I don’t believe is related to the xml issue is the “USA Map” that is the first worksheet in the Wright Express Service Co 2011.xls that I attached above. That graphic does not get converted properly using the code that I sent you. The map “vectors” are not positioned the same as the source. Is there some settings for that particular worksheet that could be used to have it convert? Thanks. The primary concern at the moment is the xml that dumped out on page 1 though.
Hi,
I have tried to convert the file and here are my observations:
Aspose.Email - convert from MSG to MHT - the MHT does not contain extra XML
Aspose.Words - convert from MHT to PDF - the PDF contains XML
I have moved this thread in Aspose.Words forums. My colleagues here will respond to you and will help you accordingly.
The code to reproduce the issue is:
// Aspose.Email - MSG to MHT conversion
MailMessage message = MailMessage.Load(“Correspondence_1.msg”, MessageFormat.Msg);
MemoryStream stream = new MemoryStream();
message.Save(stream, MailMessageSaveType.MHtmlFromat);
// The MHT does not contain the XML tags
message.Save(“test.mht”, MailMessageSaveType.MHtmlFromat);
// Aspose.Words - MHT to PDF conversion
stream.Position = 0;
// Needs to be fixed here
Document doc = new Document(stream);
doc.Save(“test.pdf”, SaveFormat.Pdf);
Hello
I'm a representative for Aspose.Words. Thank
you for reporting this problem to us. I managed to reproduce the problem on my
side. Your request has been linked to the appropriate issue. You will be
notified as soon as it is resolved.
Best regards,
Thank you very much on the work you're doing for the XML issue.
Have you had a chance to look at the 2nd issue that I mentioned, where the 1st worksheet in the XLS was a US map and my conversion implementation essentially "blew" those vectors up on the resulting PDF? Should I open that as a separate ticket?
Hello
Thanks for your inquiry. I think this
problem related to Aspose.Cells. I will move your request to the Aspose.Cells
forum and my colleagues will answer you shortly.
Best regards,
I will be hearing from you then on two issues? Is that correct?
1) the XML 'dump' in the pdf (that you recreated)
2) the Aspose.Cells team will respond about the Worksheet USA Map issue.
Thanks
Hi,
I am representative of Aspose.Cells.
Please explain what is the problem you are getting related to Aspose.Cells. Please share your sample code using the Aspose.Cells API.
Please also try the latest version:
Aspose.Cells for .NET v7.0.2.1
and see if it resolves your issue.
Attached is the source from a document mgmt web service that converts files to PDF using aspose.
The attached spreadsheet is used by our Transportation division in many of their spreadsheets as the first worksheet, followed by more typical worksheets with text and numbers in cells. This USA map does not convert using the code attached.
Thanks for any help. I'll wait to hear from you before upgrading to see what your results are.
Hi,
I tried to convert your source USAMap.xls file into pdf file using the following code with the latest version: and it throws the following exception.
I have logged this issue in our database. We will fix it and update you asap.
This issue has been logged as CELLSNET-40017.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\USAMap.xls”;
Workbook workbook = new Workbook(filePath);
workbook.Save(filePath + “.out.pdf”);
Exception:Aspose.Cells.CellsException was unhandled
Message=“Shape to image Error!”
Source=“Aspose.Cells”
StackTrace:
at Aspose.Cells.Workbook.Save(String fileName, SaveOptions saveOptions)
at Aspose.Cells.Workbook.Save(String fileName)
at AsposeProject.Program.f1() in F:\Shak-Data-RW\Projects\AsposeProject\AsposeProject\Program.cs:line 59
at AsposeProject.Program.Main(String[] args) in F:\Shak-Data-RW\Projects\AsposeProject\AsposeProject\Program.cs:line 49
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Thank you very much. The v7.0.2.2 Aspose.Cells.dll that I downloaded from your post was installed. I rebuilt the application and ran the conversion of the ".msg" file through again. This .msg file contained the XLS attachment with the USA map.
The XML dump was not in the converted output and the USA map worksheet converted without an issue.
Both of these are fixed, and this ticket can be closed. Great job. Thanks
Hi,
Good to know that your issue(s) are resolved now.
Thank you.
The issues you have found earlier (filed as WORDSNET-4038) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.(10)