Kaydet (Commit) 9547c0ed authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Thorsten Behrens

Export background images provided by master page as artifacts

Such that screenreaders don't announce them. To make this happen,
pass them as NonStructElement to PDF writer.

Change-Id: I94d52ee0207cd6362edabfb9b891faa7fe341543
üst bd66a020
...@@ -2217,38 +2217,14 @@ namespace drawinglayer ...@@ -2217,38 +2217,14 @@ namespace drawinglayer
{ {
// structured tag primitive // structured tag primitive
const vcl::PDFWriter::StructElement& rTagElement(rStructureTagCandidate.getStructureElement()); const vcl::PDFWriter::StructElement& rTagElement(rStructureTagCandidate.getStructureElement());
bool bTagUsed(vcl::PDFWriter::NonStructElement != rTagElement); const bool bTagUsed(vcl::PDFWriter::NonStructElement != rTagElement);
const bool bIsBackground(rStructureTagCandidate.isBackground());
//Z For now, just do not create StructureTag(s) for hidden/background if(mpPDFExtOutDevData && bTagUsed)
// (Graphic)Objects - see '/Artifact' comments below
if(bTagUsed && rStructureTagCandidate.isBackground())
{ {
bTagUsed = false; // Write start tag. For background elements use NonStructElement instead of real element type (e.g. Figure)
} // to guarantee it gets exported as artifact (tagged PDF)
mpPDFExtOutDevData->BeginStructureElement(bIsBackground ? vcl::PDFWriter::NonStructElement : rTagElement);
if(mpPDFExtOutDevData && bTagUsed)
{
// write start tag
mpPDFExtOutDevData->BeginStructureElement(rTagElement);
// if(rStructureTagCandidate.isBackground())
// {
// //Z need to somehow apply '/Artifact' information...
// // - Already experimented with adding two BeginStructureElement adding
// // a 'vcl::PDFWriter::Artifact' -> not really what e.g. PAC3 expects.
// // - May also be adding someting using 'SetStructureAttribute' and
// // extending vcl::PDFWriter::StructAttribute...
// // - Simple solution for now (see above): Just do not create
// // StructureTag(s) for hidden/background (Graphic)Objects. That
// // works, shows all content in PDF renderers, but hides in
// // TaggedStructure. But: also not visible in PAC3's 'LogicalStructure'
// // View where there is a tab for 'Artifacts' - I *guess* a correctly
// // tagged '/Artifact' should appear there.
// // Unfortunately found no real example - there is https://www.w3.org/TR/WCAG20-TECHS/PDF4.html
// // which claims to have an example in
// // https://www.w3.org/WAI/WCAG20/Techniques/working-examples/PDF4/decorative-image.docx
// // but that file has no '/Artifact' entries at all...
// }
} }
// process children normally // process children normally
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment