Set document title as PDF property

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2796 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Brett Zamir 2014-04-08 08:18:47 +00:00
parent 1f95988b29
commit 667de19147
1 changed files with 9 additions and 1 deletions

View File

@ -1112,8 +1112,16 @@ TODOS
var res = svgCanvas.getResolution();
var orientation = res.w > res.h ? 'landscape' : 'portrait';
var doc = new jsPDF(orientation, 'pt', [res.w, res.h]); // Todo: Give options to use predefined jsPDF formats like "a4", etc. from pull-down (with option to keep customizable)
var docTitle = svgCanvas.getDocumentTitle();
doc.setProperties({
title: docTitle/*,
subject: '',
author: '',
keywords: '',
creator: ''*/
});
svgElementToPdf(data.svg, doc, {});
doc.save(svgCanvas.getDocumentTitle() + '.pdf');
doc.save(docTitle + '.pdf');
return;
}
c.width = svgCanvas.contentW;