656cefe65d
Adds an interface for the document creator to pass in a tree of tags indicating the structure of the document, each with a type (from a predetermined enum of possible types) and a node ID. It also adds a setNodeId function to SkCanvas so that page content can be associated with a particular tag. If both the tag tree and marked content are present, Skia can now output a properly tagged PDF. An example program is included. When used properly, the PDF generated by this patch is valid and the tags are parsed properly by Adobe Acrobat. It handles many corner cases like content that spans more than one page, or tags that don't correspond to any marked content, or marked content that doesn't correspond to any tags. However, it doesn't implement all of the features of PDF accessibility yet, there are some additional attributes that can be associated with some tags that need to be supported, too, in order to properly tag things like figures and tables. Bug: skia:8148 Change-Id: I2e448eca8ded8e1b29ba685663b557ae7ad7e23e Reviewed-on: https://skia-review.googlesource.com/141138 Reviewed-by: Hal Canary <halcanary@google.com>
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
# Copyright 2016 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# Things are easiest for everyone if these source paths are absolute.
|
|
_src = get_path_info("../src", "abspath")
|
|
_include = get_path_info("../include", "abspath")
|
|
|
|
skia_pdf_sources = [
|
|
"$_include/docs/SkPDFDocument.h",
|
|
"$_src/pdf/SkBitmapKey.h",
|
|
"$_src/pdf/SkClusterator.cpp",
|
|
"$_src/pdf/SkClusterator.h",
|
|
"$_src/pdf/SkDeflate.cpp",
|
|
"$_src/pdf/SkDeflate.h",
|
|
"$_src/pdf/SkJpegInfo.cpp",
|
|
"$_src/pdf/SkJpegInfo.h",
|
|
"$_src/pdf/SkKeyedImage.cpp",
|
|
"$_src/pdf/SkKeyedImage.h",
|
|
"$_src/pdf/SkPDFBitmap.cpp",
|
|
"$_src/pdf/SkPDFBitmap.h",
|
|
"$_src/pdf/SkPDFCanon.cpp",
|
|
"$_src/pdf/SkPDFCanon.h",
|
|
"$_src/pdf/SkPDFConvertType1FontStream.cpp",
|
|
"$_src/pdf/SkPDFConvertType1FontStream.h",
|
|
"$_src/pdf/SkPDFDevice.cpp",
|
|
"$_src/pdf/SkPDFDevice.h",
|
|
"$_src/pdf/SkPDFDocument.cpp",
|
|
"$_src/pdf/SkPDFDocumentPriv.h",
|
|
"$_src/pdf/SkPDFFont.cpp",
|
|
"$_src/pdf/SkPDFFont.h",
|
|
"$_src/pdf/SkPDFFormXObject.cpp",
|
|
"$_src/pdf/SkPDFFormXObject.h",
|
|
"$_src/pdf/SkPDFGradientShader.cpp",
|
|
"$_src/pdf/SkPDFGradientShader.h",
|
|
"$_src/pdf/SkPDFGraphicState.cpp",
|
|
"$_src/pdf/SkPDFGraphicState.h",
|
|
"$_src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp",
|
|
"$_src/pdf/SkPDFMakeCIDGlyphWidthsArray.h",
|
|
"$_src/pdf/SkPDFMakeToUnicodeCmap.cpp",
|
|
"$_src/pdf/SkPDFMakeToUnicodeCmap.h",
|
|
"$_src/pdf/SkPDFMetadata.cpp",
|
|
"$_src/pdf/SkPDFMetadata.h",
|
|
"$_src/pdf/SkPDFResourceDict.cpp",
|
|
"$_src/pdf/SkPDFResourceDict.h",
|
|
"$_src/pdf/SkPDFShader.cpp",
|
|
"$_src/pdf/SkPDFShader.h",
|
|
"$_src/pdf/SkPDFTag.cpp",
|
|
"$_src/pdf/SkPDFTag.h",
|
|
"$_src/pdf/SkPDFTypes.cpp",
|
|
"$_src/pdf/SkPDFTypes.h",
|
|
"$_src/pdf/SkPDFUtils.cpp",
|
|
"$_src/pdf/SkPDFUtils.h",
|
|
]
|