Namespace issue with Aspose.Slides 13.12.0.0

Hello,

We create a POC using the trial (Evaluation) version of Aspose.Slides for .Net (Framework is net4.0). We are working with PowerPoint 2010. Everything worked fine with trial version. Now we got license for full version of Aspose.Slides for .Net and the DLL version is 13.12.0.0v. After updating the reference to the licensed version of Aspose.Slides (13.12.0.0v) dll, we not able to add the name space (using Aspose.Slides.Pptx;) in our project. Basically I see all different name spaces with this upgraded version then I saw in 8.0.0.0.

Our question is, did the latest version of Aspose.Slides for .Net (13.12.0.0v) change the Name Space structure? We are getting following errors in our project. If it did then what is the new name space we should be using to work with PowerPoint 2007 and 2010? How do we use object model for ‘PresentationEx’?

The type or namespace name ‘Pptx’ does not exist in the namespace ‘Aspose.Slides’ (are you missing an assembly reference?)

The type or namespace name ‘SlideEx’ could not be found (are you missing a using directive or an
assembly reference?)

The type or namespace name ‘TableEx’ could not be found (are you missing a using directive or an
assembly reference?)

The type or namespace name ‘PresentationEx’ could not be found (are you missing a using directive or
an assembly reference?)

Using this licensed version I am able to find “Presentatin” but not the “PresentationEx”. Does this
verison support both PowerPoint 2003 and PowerPoint 2007?

Please let us know.

Hi Nelson,

Thank you for considering Aspose.

Well, Aspose.Slides for .NET v13.12.0 is our new unified API of Aspose.Slides for .NET which provides a single namespace for both PPT and PPTX files. This new unified API is introduced to overcome the inter conversion issues between PPT and PPTX files.

Now, as per the issues you are facing, please simply replace PresentationEx with Presentation class. Presentation class will be used for both PPT and PPTX files in unified API. Replace SlideEx with ISlide and TableEx with ITable and it will work fine for you. Following is a sample code regarding how to create a table in a presentation which will give you an idea of how to change your code.

//Instantiate Presentation class that represents PPTX file
using (Presentation pres = new Presentation())
{
    //Access first slide
    ISlide sld = pres.Slides[0];

    //Define columns with widths and rows with heights
    double[] dblCols = { 50, 50, 50 };
    double[] dblRows = { 50, 30, 30, 30, 30 };

    //Add table shape to slide
    ITable tbl = sld.Shapes.AddTable(100, 50, dblCols, dblRows);

    //Set border format for each cell
    foreach (IRow row in tbl.Rows)
        foreach (ICell cell in row)
        {
            cell.BorderTop.FillFormat.FillType = FillType.Solid;
            cell.BorderTop.FillFormat.SolidFillColor.Color = Color.Red;
            cell.BorderTop.Width = 5;

            cell.BorderBottom.FillFormat.FillType = FillType.Solid;
            cell.BorderBottom.FillFormat.SolidFillColor.Color = Color.Red;
            cell.BorderBottom.Width = 5;

            cell.BorderLeft.FillFormat.FillType = FillType.Solid;
            cell.BorderLeft.FillFormat.SolidFillColor.Color = Color.Red;
            cell.BorderLeft.Width = 5;

            cell.BorderRight.FillFormat.FillType = FillType.Solid;
            cell.BorderRight.FillFormat.SolidFillColor.Color = Color.Red;
            cell.BorderRight.Width = 5;
        }

    //Merge cells 1 & 2 of row 1
    tbl.MergeCells(tbl[0, 0], tbl[1, 0], false);

    //Add text to the merged cell
    tbl[0, 0].TextFrame.Text = "Merged Cells";

    //Write PPTX to Disk
    pres.Write(path + "table.pptx");

Also, we are working on the documentation updates for the new unified API and it will be available online soon.

Please feel free to contact support in case you need any further assistance.

Thanks & Regards,

Good morning. Perhaps it's time to update the online documentation or alert the "Live Chat" operators of this change. I've wasted the first day of my 30 day trial trying to figure out why I couldn't instantiate an instance of PresentationEx.

Hi Jeff,

We understand your concern and as informed in my previous reply, we are working on updating the documentation based on new API and it will be available online very soon. Please be patient and spare us sometime to update the documentation. In case you face any issue, please let us know and we will assist you accordingly.

Thanks & Regards,

FYI, the message above was not from Nelson

Hi Nelson,

Sorry for the confusion.

As this post was initiated by you, so mistakenly I addressed you.

Hi Jeff,

Please see my reply to your concern in the above post.

Thanks & Regards,

Hi,

Please let us know if the Unified API documentation is completed. Kindly let us know the documentation link.

Thanks,

Rubia

Hi Rubia,

Yes, we have updated our documentation according to the new unified API. Following is the link to our online documentation which you can refer as per your requirements.

Thanks & Regards,

Hi,

Previously we were using Aspose.slides 7.5.0.0 version where size property under presentation class fetches width-5760 and height-4320 and now we have upgraded to Aspose.slides 13.2.0.0 version where in presentation class,ISlideSize property fetches width-720 and height -540. So we are facing issues internally.We are performing certain calculations using these values.Kindly let us know how we can proceed.

Regards,

Rubia S,

Hi Rubia,

Please share your sample code and template file with us for further testing of your issue. We will check it and get back to you soon.

Thanks & Regards,

Hi,

Below is the sample code,

System.Drawing.SizeF pagesize;

Presentation m_show = new Presentation();

SlideLayoutType layouttype = m_show.LayoutSlides[0].LayoutType;

ILayoutSlide layout = m_show.LayoutSlides.GetByType(layouttype);

m_show.Slides.AddEmptySlide(layout);

Presentation m_masterTemplate = new Presentation(@"C:\\Desktop\\PPTTemplates\\Master.ppt");

if (m_masterTemplate != null && m_masterTemplate.Masters[0] != null)

{

pagesize = m_masterTemplate.SlideSize.Size;

}

When we use Aspose.Slide 14.2.0.0 version ,pagesize extracted from the template is width-720.0 and height-540.0. When we use Aspose.Slides 7.5.0.0 version,pagesize extracted from the template is width-5760 and height -4320. As we use the above width and height internally in our calculations,we face issues while exporting to ppt.Due to the upgraded version of dll ,the extracted details seems to be different.Kindly let us know how to tackle this issue.

Hi Rubia,

Thank you for the details and sample code.

In our legacy version, PPT and PPT had different measurement scales. For PPT we had Pixel per Inch and for PPTX the scaling factor 8 was used i.e. Pixel per Inches / 8. Now, in the new unified API, Pixel per Inches / 8 has been standardized for both PPT and PPTX file. So, you need to used the scaling factor i.e. 8 in your calculation.

In case you need any further assistance, please do let us know.

Thanks & Regards,