239 {
240 static const char templateString[] =
241 "<?xpacket begin=\"\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n"
242 "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\"\n"
243 " x:xmptk=\"Adobe XMP Core 5.4-c005 78.147326, "
244 "2012/08/23-13:03:03\">\n"
245 "<rdf:RDF "
246 "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n"
247 "<rdf:Description rdf:about=\"\"\n"
248 " xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\"\n"
249 " xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n"
250 " xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\"\n"
251 " xmlns:pdf=\"http://ns.adobe.com/pdf/1.3/\"\n"
252 " xmlns:pdfaid=\"http://www.aiim.org/pdfa/ns/id/\">\n"
253 "<pdfaid:part>2</pdfaid:part>\n"
254 "<pdfaid:conformance>B</pdfaid:conformance>\n"
255 "%s"
256 "%s"
257 "%s"
258 "<dc:format>application/pdf</dc:format>\n"
259 "%s"
260 "%s"
261 "%s"
262 "%s"
263 "<xmpMM:DocumentID>uuid:%s</xmpMM:DocumentID>\n"
264 "<xmpMM:InstanceID>uuid:%s</xmpMM:InstanceID>\n"
265 "%s"
266 "%s"
267 "</rdf:Description>\n"
268 "</rdf:RDF>\n"
269 "</x:xmpmeta>\n"
270 "<?xpacket end=\"w\"?>\n";
271
278
279 creationDate =
SkStringPrintf(
"<xmp:CreateDate>%s</xmp:CreateDate>\n",
281 }
287 "<xmp:ModifyDate>%s</xmp:ModifyDate>\n", tmp.
c_str());
288 }
291 "<dc:title><rdf:Alt><rdf:li xml:lang=\"x-default\">",
292 "</rdf:li></rdf:Alt></dc:title>\n");
295 "</rdf:li></rdf:Seq></dc:creator>\n");
296
299 "<dc:description><rdf:Alt><rdf:li xml:lang=\"x-default\">",
300 "</rdf:li></rdf:Alt></dc:description>\n");
303 "</rdf:li></rdf:Bag></dc:subject>\n");
305 "</pdf:Keywords>\n");
306
307
309
311 "</xmp:CreatorTool>\n");
316
317
319 templateString, modificationDate.
c_str(), creationDate.
c_str(),
323
325 dict->insertName("Subtype", "XML");
329}
SkPDFIndirectReference SkPDFStreamOut(std::unique_ptr< SkPDFDict > dict, std::unique_ptr< SkStreamAsset > content, SkPDFDocument *doc, SkPDFSteamCompressionEnabled compress)
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
static std::unique_ptr< SkMemoryStream > MakeCopy(const void *data, size_t length)
const char * c_str() const
void toISO8601(SkString *dst) const