diff --git a/docs-web/src/main/webapp/src/app/docs/controller/DocumentModalPdf.js b/docs-web/src/main/webapp/src/app/docs/controller/DocumentModalPdf.js
new file mode 100644
index 00000000..81366e25
--- /dev/null
+++ b/docs-web/src/main/webapp/src/app/docs/controller/DocumentModalPdf.js
@@ -0,0 +1,27 @@
+'use strict';
+
+/**
+ * Document modal PDF controller.
+ */
+angular.module('docs').controller('DocumentModalPdf', function ($scope, $window, $stateParams, $modalInstance) {
+ $scope.export = {
+ metadata: false,
+ comments: false,
+ fitimagetopage: false
+ };
+
+ // Export to PDF
+ $scope.exportPdf = function() {
+ $window.open('../api/document/' + $stateParams.id
+ + '/pdf?metadata=' + $scope.export.metadata
+ + '&comments=' + $scope.export.comments
+ + '&fitimagetopage=' + $scope.export.fitimagetopage);
+
+ $modalInstance.close();
+ };
+
+ // Close the modal
+ $scope.close = function () {
+ $modalInstance.close();
+ }
+});
\ No newline at end of file
diff --git a/docs-web/src/main/webapp/src/app/docs/controller/DocumentView.js b/docs-web/src/main/webapp/src/app/docs/controller/DocumentView.js
index c286f38a..1c1ce194 100644
--- a/docs-web/src/main/webapp/src/app/docs/controller/DocumentView.js
+++ b/docs-web/src/main/webapp/src/app/docs/controller/DocumentView.js
@@ -117,4 +117,16 @@ angular.module('docs').controller('DocumentView', function ($scope, $state, $sta
}
});
};
+
+ /**
+ * Export the current document to PDF.
+ */
+ $scope.exportPdf = function() {
+ $modal.open({
+ templateUrl: 'partial/docs/document.pdf.html',
+ controller: 'DocumentModalPdf'
+ });
+
+ return false;
+ };
});
\ No newline at end of file
diff --git a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.eot b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.eot
index 423bd5d3..b93a4953 100644
Binary files a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.eot and b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.eot differ
diff --git a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.svg b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.svg
index 44694887..94fb5490 100644
--- a/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.svg
+++ b/docs-web/src/main/webapp/src/fonts/glyphicons-halflings-regular.svg
@@ -6,224 +6,283 @@
- + + + +
+