Aspose.Slides Problems

Hello, our customer have bought aspose.totals. He have met 2 problems :
1.How to load readonly pptx file? The attachment pptx file which that I can not load it by using the following code:
Presentation pres = new Presentation(“C:\B5L_01pcs.pptx”);
It could prompt error when execute above code

2:When I convert my pptx file to pdf,I found that my style has been changed.The attachment pdf file is my converted file, could you tell me how to solve this problem?Aspose.zip (495.6 KB)

@www.evget.com,

I have observed your comments. Can you please share which Aspose.Slides version you are using on your end. Also please share source presentation of generated pdf which you already shared so that we can further investigate to help you out.

Hello,

一、
1.Aspose.Slides version :Aspose.Slides 17.11;
2.source presentation of generated pdf :
Aspose.Slides.Presentation doc = new Aspose.Slides.Presentation(sourcePath);
doc.Save(targetPath, Aspose.Slides.Export.SaveFormat.Pdf);
3. Exception information:
Aspose.Slides.PptxReadException: 未实现该方法或操作。
System.NotImplementedException: 未实现该方法或操作。
在 Aspose.Slides.[1] .[1](IChartLinesFormat [1],
, )
在 Aspose.Slides. .[1](IAxis [1],
, )
在 Aspose.Slides.[1] .[1](IAxesManager [1], [1]
, )
在 Aspose.Slides.
.[1](IChart [1],
,
, )
在 Aspose.Slides. .[1](IShapeCollection [1], IChart
, , )
在 Aspose.Slides. .[1](IShapeCollection [1],
, , Boolean )
在 Aspose.Slides.
.[1](IGroupShape [1],
, )
在 Aspose.Slides.
.[1](IBaseSlide [1],
, )
在 Aspose.Slides.
.[1](Slide [1])
在 Aspose.Slides. .[1](IPresentation [1])
在 Aspose.Slides. .[1](Presentation [1], Stream
)
— 内部异常堆栈跟踪的结尾 —
在 Aspose.Slides. .[1](Presentation [1], Stream
)
在 Aspose.Slides.Presentation.(Stream [1])
在 Aspose.Slides.Presentation.
(Stream [1])
在 Aspose.Slides.Presentation.[1](String [1])
在 Aspose2pdf.Convertor.PPT2Pdf(String sourcePath, String targetPath) 位置 G:\work\WAN\code\projdata\src\wanproj\Aspose2pdf\Aspose2pdf\Convertor.cs:行号 343


Hi, there. One of our customers are using aspose total .net they bought two weeks ago, but when they tried to convert some Word documents to PDF documents, the layout changed, the sample and messages they provided blow may helpful to solve the problem:
1.Aspose. Words version :Aspose.Words 17.11;
2.source presentation of generated pdf :
The code from AssemblyInfo.cs:

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle(“Aspose2pdf”)]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct(“Aspose2pdf”)]
[assembly: AssemblyCopyright(“Copyright © 2017”)]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid(“5548f8d2-886d-4056-946e-d6e205f685b8”)]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '’ as shown below:
// [assembly: AssemblyVersion("1.0.
")]
[assembly: AssemblyVersion(“1.0.0.4”)]
[assembly: AssemblyFileVersion(“1.0.0.4”)]

The code from Aspose2pdf.csproj:

<?xml version="1.0" encoding="utf-8"?> Debug AnyCPU {5548F8D2-886D-4056-946E-D6E205F685B8} Library Properties Aspose2pdf Aspose2pdf v4.5 512 true full false bin\Debug\ DEBUG;TRACE prompt 4 pdbonly true ..\..\..\..\Bin\ TRACE prompt 4 true bin\x64\Debug\ DEBUG;TRACE full x64 prompt MinimumRecommendedRules.ruleset bin\x64\Release\ TRACE true pdbonly x64 prompt MinimumRecommendedRules.ruleset true false ..\..\..\..\Bin\Aspose.Cells.dll False ..\..\..\..\Bin\Aspose.Pdf.dll ..\..\..\..\Bin\Aspose.Slides.dll ..\..\..\..\Bin\Aspose.Words.dll True

The code from Convertor.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using System.IO;
using System.Drawing;
using System.Drawing.Imaging;

namespace Aspose2pdf
{

public class Convertor
{

    public Convertor()
    {
       
    }

    public Convertor(string connstring, string serial_NO, string jobId)
    {
        Aspose.Pdf.License l1 = new Aspose.Pdf.License();
        l1.SetLicense("Aspose2pdf.Aspose.Total.lic");
        l1.Embedded = true;

        Aspose.Slides.License l2 = new Aspose.Slides.License();
        l2.SetLicense("Aspose2pdf.Aspose.Total.lic");

        Aspose.Cells.License l3 = new Aspose.Cells.License();
        l3.SetLicense("Aspose2pdf.Aspose.Total.lic");

        Aspose.Words.License l4 = new Aspose.Words.License();
        l4.SetLicense("Aspose2pdf.Aspose.Total.lic");
    }

    public int Word2Pdf(string sourcePath, string targetPath)
    {
        try
        {
            Aspose.Words.Document doc = new Aspose.Words.Document(sourcePath);
            doc.Save(targetPath, Aspose.Words.SaveFormat.Pdf);

            Aspose.Pdf.Document pdfdoc = new Aspose.Pdf.Document(targetPath);
            return pdfdoc.Pages.Count;
        }
        catch (Exception ex)
        {
            wrapper.WriteLog("ERROR", Serial_NO, JobId, "Word2Pdf", ex);
            return 1;
        }
       
    }

    public int Excel2Pdf(string sourcePath, string targetPath)
    {
        try
        {
            Aspose.Cells.Workbook doc = new Aspose.Cells.Workbook(sourcePath);
            doc.Save(targetPath, Aspose.Cells.SaveFormat.Pdf);

            Aspose.Pdf.Document pdfdoc = new Aspose.Pdf.Document(targetPath);
            return pdfdoc.Pages.Count;
        }
        catch (Exception ex)
        {
            wrapper.WriteLog("ERROR", Serial_NO, JobId, "Excel2Pdf", ex);
            return 0;
        }
     
    }

    public int PPT2Pdf(string sourcePath, string targetPath)
    {
        try
        {
            Aspose.Slides.Presentation doc = new Aspose.Slides.Presentation(sourcePath);
            doc.Save(targetPath, Aspose.Slides.Export.SaveFormat.Pdf);

            Aspose.Pdf.Document pdfdoc = new Aspose.Pdf.Document(targetPath);
            return pdfdoc.Pages.Count;
        }
        catch (Exception ex)
        {
            wrapper.WriteLog("ERROR", Serial_NO, JobId, "PPT2Pdf", ex);
            return 1;
        }
      
    }

}

}

Aspose.zip (137.9 KB)

@www.evget.com,

I have observed the issue shared by you and have been able to reproduce the issue specified. An issue with ID SLIDESNET-39616 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.

The issues you have found earlier (filed as SLIDESNET-39616) have been fixed in Aspose.Slides for .NET 18.1. Please try using the latest release version and in case you experience any issue or you have any further query, please feel free to contact.