Skia
2D Graphics Library
SkPDF::Metadata Struct Reference

Optional metadata to be passed into the PDF factory function. More...

#include <SkPDFDocument.h>

Public Types

enum class  Outline : int { None = 0 , StructureElementHeaders = 1 }
 
enum class  CompressionLevel : int {
  Default = -1 , None = 0 , LowButFast = 1 , Average = 6 ,
  HighButSlow = 9
}
 PDF streams may be compressed to save space. More...
 
enum  Subsetter { kHarfbuzz_Subsetter , kSfntly_Subsetter }
 Preferred Subsetter. More...
 

Public Attributes

SkString fTitle
 The document's title. More...
 
SkString fAuthor
 The name of the person who created the document. More...
 
SkString fSubject
 The subject of the document. More...
 
SkString fKeywords
 Keywords associated with the document. More...
 
SkString fCreator
 If the document was converted to PDF from another format, the name of the conforming product that created the original document from which it was converted. More...
 
SkString fProducer = SkString("Skia/PDF m" SKPDF_STRING(SK_MILESTONE))
 The product that is converting this document to PDF. More...
 
DateTime fCreation = {0, 0, 0, 0, 0, 0, 0, 0}
 The date and time the document was created. More...
 
DateTime fModified = {0, 0, 0, 0, 0, 0, 0, 0}
 The date and time the document was most recently modified. More...
 
SkScalar fRasterDPI = SK_ScalarDefaultRasterDPI
 The DPI (pixels-per-inch) at which features without native PDF support will be rasterized (e.g. More...
 
bool fPDFA = false
 If true, include XMP metadata, a document UUID, and sRGB output intent information. More...
 
int fEncodingQuality = 101
 Encoding quality controls the trade-off between size and quality. More...
 
StructureElementNodefStructureElementTreeRoot = nullptr
 An optional tree of structured document tags that provide a semantic representation of the content. More...
 
enum SkPDF::Metadata::Outline fOutline = Outline::None
 
SkExecutorfExecutor = nullptr
 Executor to handle threaded work within PDF Backend. More...
 
enum SkPDF::Metadata::CompressionLevel fCompressionLevel = CompressionLevel::Default
 
enum SkPDF::Metadata::Subsetter fSubsetter = kHarfbuzz_Subsetter
 

Detailed Description

Optional metadata to be passed into the PDF factory function.

Member Enumeration Documentation

◆ CompressionLevel

PDF streams may be compressed to save space.

Use this to specify the desired compression vs time tradeoff.

Enumerator
Default 
None 
LowButFast 
Average 
HighButSlow 

◆ Outline

enum SkPDF::Metadata::Outline : int
strong
Enumerator
None 
StructureElementHeaders 

◆ Subsetter

Preferred Subsetter.

Only respected if both are compiled in.

The Sfntly subsetter is deprecated.

Experimental.

Enumerator
kHarfbuzz_Subsetter 
kSfntly_Subsetter 

Member Data Documentation

◆ fAuthor

SkString SkPDF::Metadata::fAuthor

The name of the person who created the document.

◆ fCompressionLevel

enum SkPDF::Metadata::CompressionLevel SkPDF::Metadata::fCompressionLevel = CompressionLevel::Default

◆ fCreation

DateTime SkPDF::Metadata::fCreation = {0, 0, 0, 0, 0, 0, 0, 0}

The date and time the document was created.

The zero default value represents an unknown/unset time.

◆ fCreator

SkString SkPDF::Metadata::fCreator

If the document was converted to PDF from another format, the name of the conforming product that created the original document from which it was converted.

◆ fEncodingQuality

int SkPDF::Metadata::fEncodingQuality = 101

Encoding quality controls the trade-off between size and quality.

By default this is set to 101 percent, which corresponds to lossless encoding. If this value is set to a value <= 100, and the image is opaque, it will be encoded (using JPEG) with that quality setting.

◆ fExecutor

SkExecutor* SkPDF::Metadata::fExecutor = nullptr

Executor to handle threaded work within PDF Backend.

If this is nullptr, then all work will be done serially on the main thread. To have worker threads assist with various tasks, set this to a valid SkExecutor instance. Currently used for executing Deflate algorithm in parallel.

If set, the PDF output will be non-reproducible in the order and internal numbering of objects, but should render the same.

Experimental.

◆ fKeywords

SkString SkPDF::Metadata::fKeywords

Keywords associated with the document.

Commas may be used to delineate keywords within the string.

◆ fModified

DateTime SkPDF::Metadata::fModified = {0, 0, 0, 0, 0, 0, 0, 0}

The date and time the document was most recently modified.

The zero default value represents an unknown/unset time.

◆ fOutline

enum SkPDF::Metadata::Outline SkPDF::Metadata::fOutline = Outline::None

◆ fPDFA

bool SkPDF::Metadata::fPDFA = false

If true, include XMP metadata, a document UUID, and sRGB output intent information.

This adds length to the document and makes it non-reproducable, but are necessary features for PDF/A-2b conformance

◆ fProducer

SkString SkPDF::Metadata::fProducer = SkString("Skia/PDF m" SKPDF_STRING(SK_MILESTONE))

The product that is converting this document to PDF.

◆ fRasterDPI

SkScalar SkPDF::Metadata::fRasterDPI = SK_ScalarDefaultRasterDPI

The DPI (pixels-per-inch) at which features without native PDF support will be rasterized (e.g.

draw image with perspective, draw text with perspective, ...) A larger DPI would create a PDF that reflects the original intent with better fidelity, but it can make for larger PDF files too, which would use more memory while rendering, and it would be slower to be processed or sent online or to printer.

◆ fStructureElementTreeRoot

StructureElementNode* SkPDF::Metadata::fStructureElementTreeRoot = nullptr

An optional tree of structured document tags that provide a semantic representation of the content.

The caller should retain ownership.

◆ fSubject

SkString SkPDF::Metadata::fSubject

The subject of the document.

◆ fSubsetter

enum SkPDF::Metadata::Subsetter SkPDF::Metadata::fSubsetter = kHarfbuzz_Subsetter

◆ fTitle

SkString SkPDF::Metadata::fTitle

The document's title.


The documentation for this struct was generated from the following file: