Aspose Word save to PDF for stacked column issue.7z (8.6 MB)
We have tried to convert word document to pdf using Aspose.word.save, where word doc contains a chart of type stacked column. On conversion the pdf result is not matching with input word document. I have also checked in Convert Files Online - Word, PDF, HTML, JPG And Many More for converting the attached input doc to pdf, same issue is coming.
Aspose1.docx is the input file & Aspose2.pdf is the output file. attaching those for referencetestAspose1.docx (17.4 KB)
testAspose2.pdf (90.8 KB)
using System;
using System.Drawing.Imaging;
using System.IO;
using System.Web.UI;
using asposeWords = Aspose.Words;
using asposeWordsSaving = Aspose.Words.Saving;
namespace WebApplication2
{
public partial class WebForm1 : Page
{
protected void Page_Load(object sender, EventArgs e)
{
using (var wordDocument = new MemoryStream(File.ReadAllBytes(Server.MapPath("/File") + "\\testAspose1.docx")))
{
var wordDoc = new asposeWords::Document(wordDocument);
byte[] pdfContent;
using (var pdfMemoryStream = new MemoryStream())
{
var pdfSaveOptions = new asposeWordsSaving::PdfSaveOptions
{
JpegQuality = 100,
TextCompression = asposeWordsSaving::PdfTextCompression.None,
PageSet = asposeWordsSaving.PageSet.All,
};
pdfSaveOptions.OutlineOptions.DefaultBookmarksOutlineLevel = 9;
pdfSaveOptions.MetafileRenderingOptions.RenderingMode =
asposeWordsSaving::MetafileRenderingMode.Vector;
wordDoc.Save(pdfMemoryStream, pdfSaveOptions);
pdfContent = pdfMemoryStream.ToArray();
System.IO.File.WriteAllBytes(Server.MapPath("/File") + "\\testAspose2.pdf", pdfContent);
wordDoc.Save(Server.MapPath("/File") + "\\testAspose2.docx");
}
}
}
}
}
Aspose Word save to PDF for stacked column issue.7z (8.6 MB)