Free Support Forum - aspose.com

Ink tools disappeared when converting to PDF

Thank you for your support.

N0024.zip (143.2 KB)
This is the file and code.

public static void Run()
{
    try {
        string inputFile = "c:\\work\\N0024.xlsx";
        string outputFile = inputFile + ".pdf";
        using (MemoryStream docStream = new MemoryStream(File.ReadAllBytes(inputFile)))
        using (MemoryStream pdfStream = new MemoryStream())
        {
            // Convert .xls and .xlsx file to PDF.
            using (var book = new Workbook(docStream))
            {
                book.CalculateFormula();
                book.Save(pdfStream, Aspose.Cells.SaveFormat.Pdf);
            }

            using (var fileStream = new FileStream(outputFile, FileMode.Create, FileAccess.Write))
            {
                var buffer = new byte[1024];
                while (pdfStream.Read(buffer, 0, buffer.Length) > 0)
                {
                    fileStream.Write(buffer, 0, buffer.Length);
                }
            }
        }
    }
    catch (System.Exception ex)
    {

    }
}

@PFU.DSOL2,

Thanks for the template file and sample code.

After an initial test, I am able to observe the issue as you mentioned by converting your template XLSX file to PDF file format. I found Ink tools/shape disappeared when converting to PDF.
e.g
Sample code:

using (var book = new Workbook("N0024.xlsx")) 
            { 
                book.Save("out1.pdf", Aspose.Cells.SaveFormat.Pdf); 
            }  

I have logged a ticket with an id “CELLSNET-45961” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@PFU.DSOL2,

For your information, the ink type tools/shapes are not currently supported when rendering to PDF file format. It might take some time to support this feature.

Once we have any new information, we will share it with you.

@PFU.DSOL2,

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-45961”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes

@PFU.DSOL2

Please download and try the following fix and let us know your feedback.

Thanks for your support.
I confirmed that the ink tool object could be conveted to image or PDF.
Next release of Aspose.Cells contains this hot fix, doesn’t it?

Regards,

@PFU.DSOL2

Thanks for confirmation and using Aspose APIs.

The next official release 18.6 will be published on NuGet around 18th-20th of June, 2018. Once, it will be released, you will get automatic notification in this topic.

The issues you have found earlier (filed as CELLSNET-45961) have been fixed in Aspose.Cells for .NET 18.6. Please also check the document/article for your reference: https://docs.aspose.com/display/cellsnet/Installation

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan