skia2/gyp/pdf.gypi
halcanary 34422610ac 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
2015-10-12 10:11:18 -07:00

46 lines
1.8 KiB
Python

# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Include this gypi to include all 'pdf' files
# The parent gyp/gypi file must define
# 'skia_src_path' e.g. skia/trunk/src
# 'skia_include_path' e.g. skia/trunk/include
#
# The skia build defines these in common_variables.gypi
#
{
'sources': [
'<(skia_src_path)/doc/SkDocument_PDF.cpp',
'<(skia_src_path)/pdf/SkDeflate.cpp',
'<(skia_src_path)/pdf/SkDeflate.h',
'<(skia_src_path)/pdf/SkJpegInfo.cpp',
'<(skia_src_path)/pdf/SkJpegInfo.h',
'<(skia_src_path)/pdf/SkPDFBitmap.cpp',
'<(skia_src_path)/pdf/SkPDFBitmap.h',
'<(skia_src_path)/pdf/SkPDFCanon.cpp',
'<(skia_src_path)/pdf/SkPDFCanon.h',
'<(skia_src_path)/pdf/SkPDFDevice.cpp',
'<(skia_src_path)/pdf/SkPDFDevice.h',
'<(skia_src_path)/pdf/SkPDFFont.cpp',
'<(skia_src_path)/pdf/SkPDFFont.h',
'<(skia_src_path)/pdf/SkPDFFontImpl.h',
'<(skia_src_path)/pdf/SkPDFFormXObject.cpp',
'<(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',
'<(skia_src_path)/pdf/SkPDFShader.h',
'<(skia_src_path)/pdf/SkPDFStream.cpp',
'<(skia_src_path)/pdf/SkPDFStream.h',
'<(skia_src_path)/pdf/SkPDFTypes.cpp',
'<(skia_src_path)/pdf/SkPDFTypes.h',
'<(skia_src_path)/pdf/SkPDFUtils.cpp',
'<(skia_src_path)/pdf/SkPDFUtils.h',
],
}