You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

artifact-image-npe.fo 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
  3. xmlns:fox="http://xmlgraphics.apache.org/fop/extensions"
  4. language="en" font-family="DejaVu LGC Serif">
  5. <fo:layout-master-set>
  6. <fo:simple-page-master master-name="normal" page-height="29.7cm" page-width="21cm" margin="2cm">
  7. <fo:region-body/>
  8. </fo:simple-page-master>
  9. <fo:simple-page-master master-name="with-header" page-height="29.7cm" page-width="21cm" margin="2cm">
  10. <fo:region-body margin-top="2.5cm"/>
  11. <fo:region-before extent="2cm"/>
  12. </fo:simple-page-master>
  13. </fo:layout-master-set>
  14. <fo:declarations>
  15. <x:xmpmeta xmlns:x="adobe:ns:meta/">
  16. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  17. <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
  18. <dc:title>PDF/UA test case provoking an NPE with artifact images.</dc:title>
  19. <dc:creator>The Apache Software Foundation</dc:creator>
  20. <dc:description>Demonstrates a NullPointerException a NullPointerException occurring with activated PDF/UA and when an image is marked as an artifact. See FOP-2646</dc:description>
  21. </rdf:Description>
  22. </rdf:RDF>
  23. </x:xmpmeta>
  24. </fo:declarations>
  25. <fo:page-sequence id="ps1" master-reference="with-header">
  26. <fo:static-content flow-name="xsl-region-before"> <!-- Don't do role="artifact" here! -->
  27. <fo:block><fo:retrieve-marker retrieve-class-name="running-header" retrieve-position="last-ending-within-page" retrieve-boundary="page-sequence"/></fo:block>
  28. </fo:static-content>
  29. <fo:flow flow-name="xsl-region-body">
  30. <fo:block><fo:marker marker-class-name="running-header"><fo:wrapper role="artifact">Chapter 1</fo:wrapper></fo:marker>Chapter 1</fo:block>
  31. <fo:block>Some text and an image wrapped in an fo:wrapper that is marked as an artifact:</fo:block>
  32. <fo:block><fo:wrapper role="artifact"><fo:external-graphic fox:alt-text="A red dot" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg=="/></fo:wrapper></fo:block>
  33. <fo:block>Some text.</fo:block>
  34. <fo:block><fo:marker marker-class-name="running-header"><fo:wrapper role="artifact">Chapter 2</fo:wrapper></fo:marker>Chapter 2</fo:block>
  35. <fo:block>Some text.</fo:block>
  36. <fo:block break-before="page"/>
  37. <fo:block><fo:marker marker-class-name="running-header"><fo:wrapper role="artifact">Chapter 3</fo:wrapper></fo:marker>Chapter 3</fo:block>
  38. <fo:block>Some text.</fo:block>
  39. </fo:flow>
  40. </fo:page-sequence>
  41. <fo:page-sequence id="ps2" master-reference="normal">
  42. <fo:flow flow-name="xsl-region-body">
  43. <fo:block>Next Page Sequence. Does accessibility still work?<fo:wrapper role="artifact">Artifact</fo:wrapper></fo:block>
  44. </fo:flow>
  45. </fo:page-sequence>
  46. </fo:root>