Set document title as PDF property
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2796 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
1f95988b29
commit
667de19147
|
@ -1112,8 +1112,16 @@ TODOS
|
||||||
var res = svgCanvas.getResolution();
|
var res = svgCanvas.getResolution();
|
||||||
var orientation = res.w > res.h ? 'landscape' : 'portrait';
|
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 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, {});
|
svgElementToPdf(data.svg, doc, {});
|
||||||
doc.save(svgCanvas.getDocumentTitle() + '.pdf');
|
doc.save(docTitle + '.pdf');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
c.width = svgCanvas.contentW;
|
c.width = svgCanvas.contentW;
|
||||||
|
|
Loading…
Reference in New Issue