summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4181016)
raw | patch | inline | side by side (parent: 4181016)
author | theadib <theadib@users.sourceforge.net> | |
Sun, 21 May 2006 00:42:12 +0000 (00:42 +0000) | ||
committer | theadib <theadib@users.sourceforge.net> | |
Sun, 21 May 2006 00:42:12 +0000 (00:42 +0000) |
src/extension/internal/pdf.cpp | patch | blob | history |
index 0a4969a26fb6f67e133eb203a43dbb30fb5a938b..cd9ec7685a2c1be51e2e5df1df1d2801c42c9995 100644 (file)
\r
pdf_file = new PdfFile(_stream);\r
doc_info = pdf_file->begin_document(1.4);\r
-// *doc_info << " /Title(" << "?" << ")\n";\r
+ *doc_info << " /Title(" << doc->name << ")\n";\r
// *doc_info << " /Author(" << "?" << ")\n";\r
// *doc_info << " /Subject(" << "?" << ")\n";\r
// *doc_info << " /Keywords(" << "?" << ")\n";\r
-// *doc_info << " /Creator(" << "?" << ")\n";\r
- *doc_info << " /Producer(" << PACKAGE_STRING << ")\n";\r
-// *doc_info << " /CreationDate(D:YYYYMMDDHHmmSSOHH'mm')\n";\r
+ *doc_info << " /Creator(" << "www.inkscape.org" << ")\n";\r
+ *doc_info << " /Producer(" << "Inkscape " << PACKAGE_STRING << ")\n";\r
+ //the date should be in ISO/IEC 8824\r
+ GDate date;\r
+ GTimeVal ltime;\r
+ glong time_hh, time_mm, time_ss;\r
+ g_date_set_time_t (&date, time (NULL));\r
+ gchar date_str[100], time_str[100];\r
+ g_date_strftime(date_str, 99, "%Y%m%d", &date);\r
+ g_get_current_time(<ime);\r
+ time_hh=(ltime.tv_sec/3600)%24;\r
+ time_mm=(ltime.tv_sec/60)%60;\r
+ time_ss=(ltime.tv_sec)%60;\r
+ g_snprintf(time_str, 99, "%02ld%02ld%02ld", time_hh, time_mm, time_ss); \r
+ *doc_info << " /CreationDate(D:" << date_str << time_str << "Z)\n";\r
+// *doc_info << " /CreationDate(D:" << date_str << time_str << "OHH'mm')\n";\r
\r
/* flush this to test output stream as early as possible */\r
if (fflush(_stream)) {\r