]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document/src/org/simantics/document/DocumentUtils.java
Fonts are now embedded in diagram, wiki, etc PDF exports.
[simantics/platform.git] / bundles / org.simantics.document / src / org / simantics / document / DocumentUtils.java
index e539df2c3aa27cdc0cb276363809d52e125e48ba..16a81f6f33636a772874d20b679637d3cfff7c67 100644 (file)
@@ -28,7 +28,6 @@ import org.simantics.db.common.request.PossibleIndexRoot;
 import org.simantics.db.common.request.ResourceRead;
 import org.simantics.db.common.request.UniqueRead;
 import org.simantics.db.common.request.WriteResultRequest;
-import org.simantics.db.common.utils.Logger;
 import org.simantics.db.exception.DatabaseException;
 import org.simantics.db.layer0.variable.Variable;
 import org.simantics.db.layer0.variable.Variables;
@@ -194,22 +193,15 @@ public class DocumentUtils {
                }
        }       
 
-       public void print(RequestProcessor processor, Resource res, String wiki, String css, DocumentSettings settings, final PdfWriter writer, final Document document) throws DocumentException {
-               try {
-                       Exportable exp = processor.syncRequest(new UniqueRead<Exportable>() {
-
-                               @Override
-                               public Exportable perform(ReadGraph graph) throws DatabaseException {
-                                       return new Exportable(graph, res, wiki, css, settings, true);
-                               }
-                               
-                       });
-                       exp.export(document, writer);
-               } catch (DocumentException e) {
-                       Logger.defaultLogError(e);
-               } catch (DatabaseException e) {
-                       Logger.defaultLogError(e);
-               }
+       public int print(RequestProcessor processor, Resource res, String wiki, String css, DocumentSettings settings, final PdfWriter writer, final Document document)
+                       throws DocumentException, DatabaseException {
+               Exportable exp = processor.syncRequest(new UniqueRead<Exportable>() {
+                       @Override
+                       public Exportable perform(ReadGraph graph) throws DatabaseException {
+                               return new Exportable(graph, res, wiki, css, settings, true);
+                       }
+               });
+               return exp.export(document, writer);
        }
 
     public static String indexRootPath(ReadGraph graph, Variable selection) throws DatabaseException {