]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/pdf/PDFExportPlan.java
Fonts are now embedded in diagram, wiki, etc PDF exports.
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / pdf / PDFExportPlan.java
index 88312f67fe27ba54c1ce539e727af99f31811093..a41715f3bc81e64d4eabb0c44323c523541b7c6c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2017 Association for Decentralized Information Management
  * in Industry THTH ry.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *     VTT Technical Research Centre of Finland - initial API and implementation
+ *     Semantum Oy - (#7084) page numbering
  *******************************************************************************/
 package org.simantics.modeling.ui.pdf;
 
@@ -20,6 +21,7 @@ import java.util.Set;
 
 import org.simantics.db.common.NamedResource;
 import org.simantics.db.management.ISessionContext;
+import org.simantics.export.core.pdf.PageNumbering;
 import org.simantics.modeling.requests.CollectionResult;
 import org.simantics.modeling.requests.Node;
 import org.simantics.project.IProject;
@@ -63,8 +65,26 @@ public class PDFExportPlan {
      * <code>true</code> to attach Wiki page.
      */
     public boolean attachWiki = false;
-    
-    
+
+    /**
+     * Whether or not to add page numbers to the exported PDF. Default value is
+     * {@value #addPageNumbers}.
+     * 
+     * @since 1.28.0
+     */
+    public boolean addPageNumbers = true;
+
+    /**
+     * This is ignored if {@link #addPageNumbers} is <code>false</code>.
+     */
+    public PageNumbering.Position pageNumberPosition = PageNumbering.Position.BOTTOM_RIGHT;
+
+    /**
+     * This is ignored if {@link #addPageNumbers} is <code>false</code>.
+     */
+    public PageNumbering.NumberingFormat pageNumberFormat = PageNumbering.NumberingFormat.PAGE_SLASH_TOTAL_PAGES;
+
+
     public PDFExportPlan(ISessionContext sessionContext, Collection<String> recentLocations) {
         this.sessionContext = sessionContext;
         this.recentLocations = recentLocations;