summaryrefslogtreecommitdiff
path: root/src/drv
diff options
context:
space:
mode:
Diffstat (limited to 'src/drv')
-rw-r--r--src/drv/cdpdf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/drv/cdpdf.c b/src/drv/cdpdf.c
index 8faa824..a5d91d4 100644
--- a/src/drv/cdpdf.c
+++ b/src/drv/cdpdf.c
@@ -1396,6 +1396,19 @@ static cdAttribute pdf_attrib =
get_pdf_attrib
};
+static char* get_version_attrib(cdCtxCanvas* ctxcanvas)
+{
+ (void)ctxcanvas;
+ return (char*)PDF_get_parameter(ctxcanvas->pdf, "version", 0);
+}
+
+static cdAttribute version_attrib =
+{
+ "PDFLIBVERSION",
+ NULL,
+ get_version_attrib
+};
+
static void cdcreatecanvas(cdCanvas* canvas, void *data)
{
char *line = (char *)data;
@@ -1437,6 +1450,7 @@ static void cdcreatecanvas(cdCanvas* canvas, void *data)
cdRegisterAttribute(canvas, &creator_attrib);
cdRegisterAttribute(canvas, &author_attrib);
cdRegisterAttribute(canvas, &keywords_attrib);
+ cdRegisterAttribute(canvas, &version_attrib);
setpdfdefaultvalues(ctxcanvas);