aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-10-12 10:11:18 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-12 10:11:18 -0700
commit34422610ac22adceeabb66023120f27b96cae953 (patch)
tree7d4833e9692b0b5a4bee10b301fdd67a4836dfb3 /gyp
parent14bbe1dcd58c386da8168bba496d19f066dc56fd (diff)
SkPDF: Optionally output PDF/A-2b archive format.
Note: this format does not yet pass validation tests. Add skia_pdf_generate_pdfa GYP flag. Default to off for now. PDF/A files are not reproducable, so they make correctness testing harder. Turn the Metadata struct into te SkPDFMetadata struct. This splits out a lot of functionality around both kinds of metadata. When PDF/A is used, add an ID entry to the trailer. Add SkPDFObjNumMap::addObjectRecursively. Test with GYP_DEFINES=skia_pdf_generate_pdfa=1 bin/sync-and-gyp ninja -C out/Release dm out/Release/dm --config pdf --src skp gm -w /tmp/dm With skia_pdf_generate_pdfa=0, all PDFs generated from GMs and SKPs are identical. With skia_pdf_generate_pdfa=1, all PDFs generated from GMs and SKPs render identically in Pdfium. BUG=skia:3110 Review URL: https://codereview.chromium.org/1394263003
Diffstat (limited to 'gyp')
-rw-r--r--gyp/common_variables.gypi1
-rw-r--r--gyp/pdf.gyp1
-rw-r--r--gyp/pdf.gypi2
3 files changed, 4 insertions, 0 deletions
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index 57fad1d890..c84a8e5ef1 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -225,6 +225,7 @@
'skia_win_ltcg%': 1,
'skia_osx_deployment_target%': '<(skia_osx_deployment_target)',
'skia_pdf%': '<(skia_pdf)',
+ 'skia_pdf_generate_pdfa%': 0, # emit larger PDF/A-2b file
'skia_profile_enabled%': '<(skia_profile_enabled)',
'skia_shared_lib%': '<(skia_shared_lib)',
'skia_opencl%': '<(skia_opencl)',
diff --git a/gyp/pdf.gyp b/gyp/pdf.gyp
index ee304880f5..77d19223ab 100644
--- a/gyp/pdf.gyp
+++ b/gyp/pdf.gyp
@@ -40,6 +40,7 @@
skia_os in ["win", "android", "linux", "chromeos", "mac"]',
{ 'dependencies': [ 'sfntly.gyp:sfntly' ] }
],
+ [ 'skia_pdf_generate_pdfa', { 'defines': ['SK_PDF_GENERATE_PDFA'] } ],
[ 'skia_android_framework', {
# Add SFTNLY support for PDF (which in turns depends on ICU)
'include_dirs': [
diff --git a/gyp/pdf.gypi b/gyp/pdf.gypi
index f114fa7f9f..888613eb29 100644
--- a/gyp/pdf.gypi
+++ b/gyp/pdf.gypi
@@ -29,6 +29,8 @@
'<(skia_src_path)/pdf/SkPDFFormXObject.h',
'<(skia_src_path)/pdf/SkPDFGraphicState.cpp',
'<(skia_src_path)/pdf/SkPDFGraphicState.h',
+ '<(skia_src_path)/pdf/SkPDFMetadata.cpp',
+ '<(skia_src_path)/pdf/SkPDFMetadata.h',
'<(skia_src_path)/pdf/SkPDFResourceDict.cpp',
'<(skia_src_path)/pdf/SkPDFResourceDict.h',
'<(skia_src_path)/pdf/SkPDFShader.cpp',