Hi,
I’m having an issue where a picture of a graph in the word document that contains 2 x-axis dotted lines when converted to PDF using the code below renders them as solid lines. But when you zoom into the PDF to a ridiculous percentage, the line appears to be dotted.
string pdfReportPath = dir + @"TestPDF_12022025\PDF_Aspose.pdf";
string wordFile = dir + @"TestPDF_12022025\TextFile_Aspose.docm";
Document oWordDoc = new Document(wordFile);
Aspose.Words.Saving.PdfSaveOptions options = new Aspose.Words.Saving.PdfSaveOptions
{
SaveFormat = Aspose.Words.SaveFormat.Pdf,
// Optimize file size and preserve vector image quality
OptimizeOutput = true,
ImageCompression = PdfImageCompression.Auto, // Keep EMF as vector
// Downsampling off to preserve image resolution (especially vector)
DownsampleOptions = new DownsampleOptions
{
DownsampleImages = false // Do not rasterize EMF or downsample images
},
// Optional: Embed only used fonts (smaller size)
EmbedFullFonts = false
};
// Save the document as PDF
oWordDoc.Save(pdfReportPath, options);
Is there a way to fix this?
Here are some screenshots of the axis in context:
AxisInWordFIle.png (30.1 KB)
AxisInPDF.png (52.9 KB)
Here are the files I’ve used for testing:
TestPDF_12022025.zip (111.0 KB)