public virtual void DictionaryCapacityHasNoLimitsTest()
        {
            PdfDictionary longDictionary = PdfACheckerTestUtils.GetLongDictionary(999999);

            // An exception should not be thrown as there is no limits for capacity of a dictionary
            // in PDFA 2
            pdfA2Checker.CheckPdfObject(longDictionary);
            PdfStream longStream = PdfACheckerTestUtils.GetStreamWithLongDictionary(999999);

            // An exception should not be thrown as there is no limits for capacity of a dictionary
            // and stream in PDFA 2
            pdfA2Checker.CheckPdfObject(longStream);
        }
        public virtual void ValidObjectsTest()
        {
            int    maxNameLength         = pdfA1Checker.GetMaxNameLength();
            int    maxStringLength       = pdfA1Checker.GetMaxStringLength();
            int    maxArrayCapacity      = MAX_ARRAY_CAPACITY;
            int    maxDictionaryCapacity = MAX_DICTIONARY_CAPACITY;
            long   maxIntegerValue       = pdfA1Checker.GetMaxIntegerValue();
            long   minIntegerValue       = pdfA1Checker.GetMinIntegerValue();
            double maxRealValue          = pdfA1Checker.GetMaxRealValue();

            NUnit.Framework.Assert.AreEqual(65535, maxStringLength);
            NUnit.Framework.Assert.AreEqual(127, maxNameLength);
            PdfString     longString     = PdfACheckerTestUtils.GetLongString(maxStringLength);
            PdfName       longName       = PdfACheckerTestUtils.GetLongName(maxNameLength);
            PdfArray      longArray      = PdfACheckerTestUtils.GetLongArray(maxArrayCapacity);
            PdfDictionary longDictionary = PdfACheckerTestUtils.GetLongDictionary(maxDictionaryCapacity);

            NUnit.Framework.Assert.AreEqual(2147483647, maxIntegerValue);
            NUnit.Framework.Assert.AreEqual(-2147483648, minIntegerValue);
            NUnit.Framework.Assert.AreEqual(32767, maxRealValue, 0.001);
            PdfNumber largeInteger    = new PdfNumber(maxIntegerValue);
            PdfNumber negativeInteger = new PdfNumber(minIntegerValue);
            PdfNumber largeReal       = new PdfNumber(maxRealValue - 0.001);

            PdfObject[] largeObjects = new PdfObject[] { longName, longString, longArray, longDictionary, largeInteger
                                                         , negativeInteger, largeReal };
            // No exceptions should not be thrown as all values match the
            // limitations provided in specification
            foreach (PdfObject largeObject in largeObjects)
            {
                pdfA1Checker.CheckPdfObject(largeObject);
                CheckInArray(largeObject);
                CheckInDictionary(largeObject);
                CheckInComplexStructure(largeObject);
                CheckInContentStream(largeObject);
                CheckInArrayInContentStream(largeObject);
                CheckInDictionaryInContentStream(largeObject);
                CheckInFormXObject(largeObject);
                CheckInTilingPattern(largeObject);
                CheckInType3Font(largeObject);
            }
        }
        private PdfDictionary BuildLongDictionary()
        {
            int testLength = MAX_DICTIONARY_CAPACITY + 1;

            return(PdfACheckerTestUtils.GetLongDictionary(testLength));
        }