Numbers are shown on the graph when converting to image

Hello team,

Thank you for your support.

PQ2400.zip (164.2 KB)
1.jpg (11.9 KB)

I have converted PQ2400.pptx to image however I got 1 error.

  1. numbers are shown on the graph

I have also attached PQ2400SaveAsPdfByPowerPoint.pdf which is a pdf MS PowerPoint outputs correctly as a reference.
PQ2400SaveAsPdfByPowerPoint.pdf.pdf (174.8 KB)

This is my code.

  public static List<string> ConvertPowerPointToImage(string docName, MemoryStream docStream, Dictionary<string, string> config)
    {
        try
        {
            var pageInfoList = new List<string>();

            // Get config setting
            string docRootDir = config["DocumentsFilePath"];
            int dpi = int.Parse(config["ImageDPI"]);
            int thumbMaxH = int.Parse(config["ThumbnailMaxHeight"]);
            int thumbMaxW = int.Parse(config["ThumbnailMaxWidth"]);
            int maxPageNum = int.Parse(config["DocumentMaxPageNum"]);
            float readScale = float.Parse(config["ImageReadScale"]);

            // Create images directory
            string pageImgDir = docRootDir;
            if (!Directory.Exists(pageImgDir))
                Directory.CreateDirectory(pageImgDir);

            // Get the encoder of JPEG
            ImageCodecInfo jpgEncoder = GetCodecInfo();
            //EncoderParameters encParams = GetEncoderParams();

            EncoderParameters encParams = GetEncoderParams(int.Parse(config["ImageJpegQuality"]));

            // Instantiate the License class
            Aspose.Slides.License license = new Aspose.Slides.License();
            license.SetLicense("Aspose.Total.lic");

            // Convert .doc and .docx file to PDF.
            Presentation presen = new Presentation(docStream);

            for (int i = 0; (i < presen.Slides.Count) && (i < maxPageNum); i++)
            {
                ISlide slide = presen.Slides[i];

                // Export image file
                string imgFile = string.Format("{0}_{1:D8}.jpg",
                        Path.GetFileNameWithoutExtension(docName), i+1);
                string imgPath = Path.Combine(pageImgDir, imgFile);
                string thumbFilename = string.Format(@"{0}_thumb.jpg", Path.GetFileNameWithoutExtension(imgPath));
                string thumbPath = Path.Combine(Path.GetDirectoryName(imgPath), thumbFilename);
                using (Bitmap bitmap = slide.GetThumbnail(readScale, readScale))
                {
                    bitmap.SetResolution(dpi, dpi);
                    bitmap.Save(imgPath, jpgEncoder, encParams);
                }

                // Add  PageInfo List
                pageInfoList.Add(imgPath);
            }

            // return results with flag of max page limit over
            return pageInfoList;
        }
        finally
        {
        }
    }

They are parameters.

            // Get config setting
               Create Appseting key value for async function
               Dictionary<string, string> config = new Dictionary<string, string>();

               config.Add("DocumentsFilePath", outDir);
               config.Add("ImageDPI", "96");
               config.Add("ImageReadScale", "1.25");
               config.Add("ThumbnailMaxHeight", "252");
               config.Add("ThumbnailMaxWidth", "210");
               config.Add("ImageJpegQuality", "80");
               config.Add("DocumentMaxPageNum", "1000");

Thank you,
PFU DSOL2

@PFU.DSOL2,

I have observed the issue shared by you. However, I am unable to find the source presentation in attached information as the zip file also contain a PDF. Can you please share the requested information.

Hello,

Here it is.
PQ2400.zip (30.7 KB)

Thank you,
PFU DSOL2

@PFU.DSOL2,

Thank you for sharing the presentation. I have been able to reproduce the issue on my end. An issue with ID SLIDESNET-39283 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.