Delen via


XPS Content Library (Manual)

This manual test uses the XPS Content Library tool to print a set of XPS file content that is a representative subset of the XPS specification. The test uses a static set of XPS files.

Note  

This test cannot run on Windows Server 2008 unless you first install Microsoft .NET Framework version 3.0.

 

Test details

Associated requirements

Device.Imaging.Printer.XPS.XPS

See the device hardware requirements.

Platforms

Windows 7 (x64) Windows 7 (x86) Windows 8 (x64) Windows 8 (x86) Windows Server 2012 (x64) Windows Server 2008 R2 (x64) Windows 8.1 x64 Windows 8.1 x86 Windows Server 2012 R2

Expected run time

~10 minutes

Categories

Certification Functional

Type

Manual

 

Running the test

Before you run the test, complete the test setup as described in the test requirements: Printer Testing Prerequisites.

Troubleshooting

For troubleshooting information, see Troubleshooting Device.Imaging Testing.

More information

An XPS print filter or device must consume all the valid XPS test files successfully and fail gracefully (that is, no crashes, "hangs," or resource leaks may occur) on the invalid XPS files.

This test includes the following test cases:

  • Test case 1 - Valid Content Test

  • Test case 2 - Invalid Content Test

Test case 1 - valid content test

This test first prints a set of valid XPS documents. The XPS print filter or device must consume these valid XPS files successfully.

Titles of the required valid quality logic documents

Document title Description

mb01.xps

XPS Paths and Geometries Test

mb02.xps

XPS Brushes Test

mb03.xps

XPS Glyphs Test

mb04.xps

XPS Transforms and Clipping Test

mb05.xps

XPS Resources, Color, Opacity Test

mb06.xps

XPS Document Structure, HyperLinks, Signature, PrintTicket Test

mb07.xps

Saved as XPS from Microsoft Office 2007 Word

mb08.xps

Breakfast Menu

mb09.xps

The Suzuki Guitar (printed to XPS from Microsoft Office 2007 PowerPoint)

 

Expected result

For these files, compare the output of the printed material with the images below. The printed material must match these images:

The following image represents mb01.xps

The following image represents is an illustration of mb02.xps

The following image represents is an illustration of mb03.xps

The following image represents is an illustration of mb04.xps

The following image represents is an illustration of mb05.xps

The following image represents is an illustration of mb06.xps

The following image represents is an illustration of mb07.xps

The following image represents is an illustration of mb08.xps

The following image represents is an illustration of mb09.xps

Test case 2 - invalid content test

This test case attempts to print a set of XPS documents whose contents violate certain rules in the XPS and OPC specifications and rules of markup compatibility. The description of each file and the corresponding rule that it violates is below. The XPS print filter must fail gracefully (that is, no crashes, "hangs," or resource leaks may occur) for each of these invalid XPS files. The XPS print filter must not produce output. It is acceptable for a printer to partially print the document, as long as the printer never prints the picture of the gumballs.

Note  

A driver or device that consumes XPS in stream format cannot detect the failure in the M3.14a.xps file until after the device has received the entire document. As a result, the device may complete printing the picture of the gumballs, but the device must detect the error and notify the user as soon as the error occurs.

 

Documents that violate rules in the OPC specification

Document title Description

M1.1a.xps

The 1.fpage part is missing a part name.

M1.2a.xps

The Default element in [Content_Types].xml is missing for the jpg type.

M1.2b.xps

The ContentType attribute in [Content_Types].xml is missing for the jpg type.

M1.2c.xps

The ContentType attribute in [Content_Types].xml is empty for the jpg type.

M1.3a.xps

The /Documents/1/Pages/1.fpage part has the name /Documents//Pages/1.fpage.

M1.5a.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages/1.fpage/.

M1.6a.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages#/1.fpage/. ('#' is a gen-deliminator character by RFC 3986)

M1.6b.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages?/1.fpage/. ('?' is a gen- deliminator character by RFC 3986)

M1.6c.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages[/1.fpage/. ('[' is a gen- deliminator character by RFC 3986)

M1.6d.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages]/1.fpage/. (']' is a gen- deliminator character by RFC 3986)

M1.7a.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages%2F/1.fpage/. (%2F is the percent-encoding for a forward slash.)

M1.7b.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages%5C/1.fpage/. (%5C is the percent-encoding for a backward slash.)

M1.8a.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages%48/1.fpage/. (%48 is the percent-encoding for a zero (0).)

M1.8b.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages%51/1.fpage/. (%51 is the percent-encoding for a 'q'.)

M1.8c.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages%7E/1.fpage/. (%7E is the percent-encoding for a tilde (~).)

M1.10a.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages/./1.fpage/.

M1.10b.xps

The /Documents/1/Pages/1.fpage part has the name /Documents/1/Pages/../1.fpage/.

M1.11a.xps

The /Resources/Images/image_0.jpg/image_1.jpg part has a name derived from adding a segment to the part name of the /Resources/Images/image_0.jpg part.

M1.12a.xps

/Resources/Images/image_0.jpg and /Resources/Images/IMAGE_0.JPG exist in the package.

M1.13a.xps

The ContentType attribute in [Content_Types].xml for the jpg type is "image". This breaks the RFC 2616 rule because it has a type but no subtype.

M1.13b.xps

The ContentType attribute in [Content_Types].xml for the jpg type is "image/jpeg?". This breaks the RFC 2616 rule because it has a separator.

M1.14a.xps

The ContentType attribute in [Content_Types].xml for the jpg type is "image / jpeg", which contains linear white space (LWS) between the type and subtype.

M1.14b.xps

The ContentType attribute in [Content_Types].xml for the jpg type is " image/jpeg", which contains a leading LWS.

M1.14c.xps

The ContentType attribute in [Content_Types].xml for the jpg type is "image/jpeg ", which contains a trailing LWS.

M1.15a.xps

The Default element in [Content_Types].xml for the jpg type is "image/jpeg <!-- comment -->", which contains an XML comment.

M1.17a.xps

[Content_Types].xml is encoded in ISO-8859-1.

M1.17b.xps

_rels\.rels is encoded in ISO-8859-1.

M1.18a.xps

[Content_Types].xml contains a DTD declaration at the top of the XML markup.

M1.18b.xps

_rels/.rels contains a DTD declaration at the top of the XML markup.

M1.20a.xps

[Content_Types].xml contains an illegal namespace at the top of the XML markup, and an attribute drawn from that namespace in the Default element for the jpg type.

M1.21a.xps

[Content_Types].xml contains an attribute drawn from the "xml" namespace in the Default element for the jpg type.

M1.21b.xps

_rels/.rels contains an attribute drawn from the "xsi" namespace in the Relationship element for the fixed document sequence.

M1.22a.xps

The content type for the Relationships part has a parameter / value pair.

M1.26a.xps

The _rels/.rels part contains two relationships with identical Id attribute values.

M1.26b.xps

The _rels/.rels part contains a relationship that has an illegal Id value according to the W3C Recommendation. The Id value includes an exclamation point.

M1.27a.xps

The Type attribute of the fixed document sequence relationship is missing.

M1.27b.xps

The Type attribute of the fixed document sequence relationship is incorrect. It is set to the core properties type.

M1.28a.xps

The Target attribute of the fixed document sequence relationship is missing.

M1.28b.xps

The Target attribute of the fixed document sequence relationship is not a URI.

M1.30a.xps

The fixed page relationship part is named incorrectly for a relationship part.

M1.30b.xps

The fixed page relationship part is has an invalid content type in [Content_Types].xml.

M2.4a.xps

The fixed document sequence type has no matching Default or Override elements.

M2.5a.xps

The fixed document sequence type has two matching Default elements.

M2.5b.xps

The fixed document sequence type has two matching Override elements.

M2.6a.xps

The Extension attribute is missing for the fixed document sequence type.

M2.6b.xps

The Extension attribute is missing a value for the fixed document sequence type.

M2.7a.xps

The PartName attribute is missing for the fixed document sequence type.

M2.7b.xps

The PartName attribute has an empty value for the fixed document sequence type.

M2.10a.xps

The rels type has Markup Compatibility markup.

M2.11a.xps

The fixed document sequence has both a non-interleaved part and an interleaved part.

M2.18a.xps

The _rels/.rels part is missing one piece.

M3.9a.xps

The entire ZIP archive is encrypted. The password is “password”.

M3.10a.xps

The file item "/[Content_Types].xml" has been renamed to "/Content_Types.xml".

M3.14a.xps

The local file header does not match the file header in the Central Directory for the _rels/.rels part.

 

Documents that violate rules in the XPS specification

Document title Description

M1.2a

The package is plain text instead of a zip archive.

M2.2a

The ContentType attribute is missing.

M2.3a

The fixedrepresentation relationship is missing.

M2.3b

There are two fixedrepresentation relationships.

M2.3c

The FixedDocumentSequence part is missing.

M2.4a

The FixedDocument part is missing.

M2.5a

The FixedPage part is missing.

M2.6a

The Font Part is missing.

M2.6b

The FontURI attribute is missing.

M2.7c

The FontURI attribute is invalid.

M2.7a

The Image Part is missing.

M2.7b

The ImageSource attribute is missing.

M2.7c

The ImageSource attribute is invalid.

M2.8a

The Remote Resource Dictionary Part is missing.

M2.8b

The FixedPage Resource attribute for Remote Resource Dictionary Part is missing.

M2.8c

The FixedPage Resource attribute is invalid.

M2.10a

The Required Resource relationships are missing.

M2.10b

The Required Resource relationships are invalid.

M2.13a

The fixedrepresentation relationships are missing.

M2.13b

There are two fixedrepresentation relationships.

M2.14b

The fixedrepresentation relationship points to the Nonexistence part.

M2.17a

The JPG image is corrupt.

M2.18a

The PNG image is corrupt.

M2.25a

The TIF image is corrupt.

M2.35a

The WDP image is corrupt.

M2.39a

The ODTTF font is corrupt.

M2.39b

The TTF font is corrupt.

M2.39c

The TTF font is treated as an obfuscated font.

M2.54a

The Obfuscated font file name is invalid.

M2.59a

Two PrintTickets are related to FixedDocumentSequence.

M2.59b

Two PrintTickets are related to FixedDocument.

M2.59c

Two PrintTickets are related to FixedPage.

M2.70a

XML is encoded using big5 type.

M2.71a

There is a DTD in Relationship markup.

M2.71b

There is a DTD in Content_Types markup.

M2.71c

There is a DTD in FixedPage markup.

M2.72a

The XML file is invalid.

M2.72b

There are elements that do not conform with XPS XSD schema.

M2.72c

There are attributes that do not conform with XPS XSD schema.

M2.73a

There is an Xml:id attribute in FixedPage markup.

M2.73b

There is an Xsi:SchemaLocation attribute on the <FixedPage> element.

M2.74a

Duplicate attribute (FixedPage::Width)

M2.74b

Duplicate element (Path::Fill)

M2.74c

Duplicate attribute/element (<Path> has Fill attrib and <Path.Fill> child element)

M2.75a

Xml:space attribute on <FixedDocument> element

M2.75b

Xml:space attribute on <PageContent> element

M2.75c

Xml:space attribute on <FixedPage> element

M2.75d

Xml:space attribute on <Path> element

M2.77a

The Source attribute is missing.

M2.77b

The Source attribute is invalid.

M3.2a

The DocumentReference::Source attribute is missing.

M3.2b

The DocumentReference::Source attribute is invalid.

M3.3a

Multiple <DocumentReference> elements point to the same FixedDocument.

M3.5a

The PageContent::Source attribute is missing.

M3.5b

The PageContent::Source attribute is invalid.

M3.6a

Multiple <PageContent> elements point to the same FixedPage.

M3.6b

Multiple <PageContent> elements point to the same FixedPage from different FixedDocuments.

M3.20a

The x:Key attribute for Canvas is missing.

M3.20b

The x:Key attribute for Canvas is invalid.

M4.1a

The x:Key attribute for Path is missing.

M4.1b

The x:Key attribute for Path is invalid.

M4.2a

The x:Key attribute for PathGeometry is missing.

M4.2b

The x:Key attribute for PathGeometry is invalid.

M4.3a

There is a duplicate PathFigure.

M5.2a

The UnicodeString / Indices are missing.

M5.2b

The Indices and Invalid UnicodeString ("") are missing.

M5.2c

The Indices and Invalid UnicodeString ("{}") are missing.

M5.3a

The x:Key attribute for Glyphs is missing.

M5.3b

The x:Key attribute for Glyphs is invalid.

M5.4a

A <Glyphs> element has an Indices attribute that contains an invalid Glyph Index for the specified font.

M5.4b

A <Glyphs> element has more entries in the indices attribute than the UnicodeString attribute.

M5.7a

A <Glyphs> element has a UnicodeString attribute that starts with {.

M5.15a

A <Glyphs> element has both BidiLevel and isSideways attributes.

M6.1a

The x:Key attribute for SolidColorBrush is missing.

M6.1b

The x:Key attribute for SolidColorBrush is invalid.

M6.2a

The x:Key attribute for ImageBrush is missing.

M6.2b

The x:Key attribute for ImageBrush is invalid.

M6.3a

The ImageSource attribute is missing.

M6.3b

The ImageSource attribute (<ImageBrush> element that references a font part) is invalid.

M6.4a

The x:Key attribute for VisualBrush is missing.

M6.4b

The x:Key attribute for VisualBrush is invalid.

M6.5a

The x:Key attribute for LinearGradientBrush is missing.

M6.5b

The x:Key attribute for LinearGradientBrush is invalid.

M6.6a

The x:Key attribute for RadialGradientBrush is missing.

M6.6b

The x:Key attribute for RadialGradientBrush is invalid.

M7.2a

The namespace declaration in ResourceDictionary is missing.

M7.2b

The namespace declaration in ResourceDictionary is invalid.

M7.5a

A remote resource dictionary references another remote resource dictionary.

M7.6a

A ResourceDictionary has both Source and ResourceDefinitions set.

M7.11a

The x:Key attribute for MatrixTransform is missing.

M7.11b

The x:Key attribute for MatrixTransform is invalid.

M8.14a

The ContextColor value contains exponent form numbers.

M9.10a

There is a Name attribute in RemoteResourceDictionary.

M9.10b

There is a Name attribute in ResourceDictionary.

M12.2a

A FixedDocument is referenced twice in DocumentSequence.

M12.3a

A FixedPage is referenced twice in a single FixedDocument.

M12.3b

A FixedPage is referenced twice in different FixedDocuments.

M12.5a

A FixedDocumentSequence has two PrintTickets.

M12.5b

A FixedDocument with two PrintTickets.

M12.5c

A FixedPage has two PrintTickets.

M12.7a

A ContentType attribute contains a Parameter (ContentType="image/jpeg;q=0").

 

Documents that violate markup compatibility rules

Document title Description

M1.1a

The Canvas element in the FixedPage markup contains a BadMustUnderstand attribute in the Markup Compatibility namespace.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <Canvas mc:BadMustUnderstand="v1">

M1.2a

The Canvas element in the FixedPage markup contains a BadMustUnderstand attribute in the Markup Compatibility namespace.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <Canvas mc:BadMustUnderstand="v1">

M2.14a

The Canvas element in the FixedPage markup contains a ProcessContent attribute that doesn't belong to a namespace that is identified by the Ignoreable attribute on the Canvas element.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <Canvas mc:Ignorable="v3" mc:ProcessContent="v2:Blink">

M2.17a

The Canvas element in the FixedPage markup contains a ProcessContent attribute that doesn't belong to a namespace that is identified by the Ignoreable attribute on the Canvas element.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <Canvas mc:Ignorable="v2" mc:ProcessContent="v2:Blink"> <v2:Blink xml:lang="en-US">

M2.27a

The Canvas element in the FixedPage markup contains a MustUnderstand attribute that isn't understood.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <Canvas mc:MustUnderstand="v2">

M2.27b

The Canvas element in the FixedPage markup contains a MustUnderstand attribute that isn't understood. This problem occurs even though the attribute is specified as Ignorable.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <Canvas mc:Ignorable="v2"> <Canvas mc:MustUnderstand="v2">

M2.30a

The AlternateContent element in the FixedPage markup does not contain a Choice child element.

The XML in the\Documents\1\Pages\1.fpage part is invalid: <mc:AlternateContent> <mc:Fallback>

M2.31a

The AlternateContent element in the FixedPage markup contains two Fallback child elements.

The XML in the \Documents\1\Pages\1.fpage part is invalid:

M2.32a

The AlternateContent element in the FixedPage markup contains a Fallback child element that precedes a Choice element.

The XML in the \Documents\1\Pages\1.fpage part is invalid:

M2.33a

The AlternateContent element in the FixedPage markup is a child of another AlternateContent element.

The XML in the \Documents\1\Pages\1.fpage part is invalid:

M2.35a

The AlternateContent element has an attribute that is unprefixed.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:AlternateContent Ignorable="v2">

M2.36a

The AlternateContent element has a child that is neither understood nor ignorable.

The XML in the \Documents\1\Pages\1.fpage part is invalid (as a child of AlternateContent): <v2:Circle Center="13,20" Radius="20" Color="Yellow" Opacity="0.5" Luminance="13" />

M2.36b

AlternateContent has an attribute that belongs to a namespace that is neither understood nor ignorable.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:AlternateContent v2:Blink="Blink" />

M2.41a

The Choice element contains an attribute from a namespace that is neither understood nor ignorable.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Choice Requires="v2" v2:bad="bad">

M2.41b

The Fallback element contains an attribute from a namespace that is neither understood nor ignorable.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Fallback v2:bad="bad">

M2.42a

The Choice element has a MustUnderstand attribute that identifies a namespace that the test does not understand, which is v2.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Choice Requires="v2" mc:MustUnderstand="v2">

M2.42b

The Fallback element has a MustUnderstand attribute that identifies a namespace that the test does not understand, which is v2

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Fallback mc:MustUnderstand="v2">

M2.43a

The AlternateContent element has the xml:lang attribute.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:AlternateContent xml:lang="en-US">

M2.43b

The AlternateContent element has the xml:space attribute.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:AlternateContent xml:space="default">

M2.48a

The Choice element has an unprefixed attribute.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Choice Ignorable="v3" Requires="v2">

M2.49a

The Choice element has the xml:lang attribute.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Choice xml:lang="en-US" Requires="v2">

M2.49b

The Choice element has the xml:space attribute.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Choice xml:space="default" Requires="v2">

M2.50a

The Choice element has a Requires attribute that specifies a non-visible namespace.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Choice Requires="v5">

M2.52a

The Choice element has a Requires attribute that has the Markup Compatibility prefix.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Choice mc:Requires="v2">

M2.55a

The Fallback element has an attribute that has no prefix.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Fallback Ignorable="v2">

M2.56a

The Fallback element has an xml:lang attribute.

The XML in the \Documents\1\Pages\1.fpage part is invalid: <mc:Fallback xml:lang="en">

 

Documents that deal with thumbnails -- Optional:

Note  

This print job prints one page that is titled "Valid Thumbnail" and contains a red square box.

 

Document title Description

M2.36a

FixedPage with 2 thumbnails

M2.37a

FixedPage with TIF thumbnail

Thumbnail.xps

Valid XPS file containing a thumbnail

 

Documents that deal with discard control -- Optional:

Note  

This print job prints one page that is titled "Valid Discard Control" and contains a multi-color circle inside a black square box.

 

Document title Description

M10.6a

DiscardControl references itself (TargetUri)

M10.6b

DiscardControl references itself (SentinelUri)

M10.23a

Multiple DiscardControl package relationships

DiscardControl.xps

Valid XPS file containing a discard control

 

 

 

Send comments about this topic to Microsoft