none
Why is this file bad? RRS feed

Answers

  • Hi David, I looked at your file with the Open Office XML SDK and was able to find that there are 2 issues with your pptx.

    The first issue is that ppt/slideLayouts/_rels/slideLayout40.xml.rels has an incorrect path to an image. In following element:

    <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image11.tif"></Relationship>

    “image11.tif” needs to be changed to “image11.tiff”

    The second problem is in ppt/slideLayouts/slideLayout40.xml . There are 12 elements that have their opening and closing tags prepended with “ma14”. This should be either “a14” or “a”. I’m not sure which, both fix the issue with the file.

    Fortunately I did not need to debug the source code directly. I was able to find the problems with the Open Office XML SDK: https://github.com/OfficeDev/Open-Xml-Sdk. I found them by building the SDK locally from Github and then creating a simple command line project and installing the local instance of the OOXML SDK and then reading in the pptx file and using the debugger in the SDK to find what was causing the errors. Here is the code from the command line project, in case it could be useful to you in the future:

    using DocumentFormat.OpenXml;
    using DocumentFormat.OpenXml.Packaging;
    using DocumentFormat.OpenXml.Validation;
    using System;
    using System.Collections.Generic;
    using System.Reflection;
    
    namespace inspect_it
    {
        class Program
        {
            static void Main(string[] args)
            {
                Console.WriteLine("Enter the path to the OOXML file");
                string path = Console.ReadLine();
    
                OpenPresentation(path);
            }
            public static void OpenPresentation(string fileName)
            {
                PresentationDocument doc = PresentationDocument.Open(fileName, false);
                OpenXmlValidator openXmlValidator = new OpenXmlValidator();
                IEnumerable<ValidationErrorInfo> validations = openXmlValidator.Validate(doc);
                foreach (ValidationErrorInfo validationErrorInfo in validations)
                {
                    Console.WriteLine($"Validation Error: {validationErrorInfo}");
                }
            }
        }
    }
    

    Mike Bowen

    Escalation Engineer Microsoft Open Specifications

    • Marked as answer by DavidThi808 Tuesday, November 17, 2020 12:58 PM
    Tuesday, November 17, 2020 1:07 AM

All replies

  • Hi David

    Thank you for contacting Microsoft Open Specifications Support.
    One of the Engineers will be contacting you soon.


    HungChun Yu (MSFT)

    Friday, November 13, 2020 11:04 PM
  • Hi David, I looked at your file with the Open Office XML SDK and was able to find that there are 2 issues with your pptx.

    The first issue is that ppt/slideLayouts/_rels/slideLayout40.xml.rels has an incorrect path to an image. In following element:

    <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image11.tif"></Relationship>

    “image11.tif” needs to be changed to “image11.tiff”

    The second problem is in ppt/slideLayouts/slideLayout40.xml . There are 12 elements that have their opening and closing tags prepended with “ma14”. This should be either “a14” or “a”. I’m not sure which, both fix the issue with the file.

    Fortunately I did not need to debug the source code directly. I was able to find the problems with the Open Office XML SDK: https://github.com/OfficeDev/Open-Xml-Sdk. I found them by building the SDK locally from Github and then creating a simple command line project and installing the local instance of the OOXML SDK and then reading in the pptx file and using the debugger in the SDK to find what was causing the errors. Here is the code from the command line project, in case it could be useful to you in the future:

    using DocumentFormat.OpenXml;
    using DocumentFormat.OpenXml.Packaging;
    using DocumentFormat.OpenXml.Validation;
    using System;
    using System.Collections.Generic;
    using System.Reflection;
    
    namespace inspect_it
    {
        class Program
        {
            static void Main(string[] args)
            {
                Console.WriteLine("Enter the path to the OOXML file");
                string path = Console.ReadLine();
    
                OpenPresentation(path);
            }
            public static void OpenPresentation(string fileName)
            {
                PresentationDocument doc = PresentationDocument.Open(fileName, false);
                OpenXmlValidator openXmlValidator = new OpenXmlValidator();
                IEnumerable<ValidationErrorInfo> validations = openXmlValidator.Validate(doc);
                foreach (ValidationErrorInfo validationErrorInfo in validations)
                {
                    Console.WriteLine($"Validation Error: {validationErrorInfo}");
                }
            }
        }
    }
    

    Mike Bowen

    Escalation Engineer Microsoft Open Specifications

    • Marked as answer by DavidThi808 Tuesday, November 17, 2020 12:58 PM
    Tuesday, November 17, 2020 1:07 AM
  • First of, thank you for the answer.

    Second THANK YOU for the way to use the OpenXML SDK to find the problem. This is a giant help (the OpenXML SSK Tool just refused to open this, no info).

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Tuesday, November 17, 2020 1:00 PM