aboutsummaryrefslogtreecommitdiff
path: root/gn/pdf.gni
diff options
context:
space:
mode:
authorDominic Mazzoni <dmazzoni@chromium.org>2018-09-25 20:29:15 -0700
committerHal Canary <halcanary@google.com>2018-09-27 19:35:40 +0000
commit656cefe65d620f9aa7f689e412fa7720fe01c447 (patch)
tree7d7238eaa9b8f492884d95f4969a89ed33d5a8a5 /gn/pdf.gni
parentb400d4d7e0905dd2a5a0c16e648be49cf853981a (diff)
downloadskqp-656cefe65d620f9aa7f689e412fa7720fe01c447.tar.gz
Add initial support for generating tagged PDFs.
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>
Diffstat (limited to 'gn/pdf.gni')
-rw-r--r--gn/pdf.gni2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn/pdf.gni b/gn/pdf.gni
index 37d1612472..9efc65fbf5 100644
--- a/gn/pdf.gni
+++ b/gn/pdf.gni
@@ -46,6 +46,8 @@ skia_pdf_sources = [
"$_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",