- 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);