Hi,
You have to choice:
- open your template (ie the ODS document you need to fill) with
OpenOffice and define the print ranges
OR
- use setTablePrintRanges (See TableTable.java
(org.jopendocument.model.table) ) of the page you want to print/render
Regards,
Guillaume
Yes, I haven't defined nothing about templates.
But there's any information about templates? because I haven't found
anything in the documentation.
What I've tried is the code of the tutorial:
|
// Load the spreadsheet.
*final *OpenDocument doc = *new *OpenDocument();
doc.loadFrom("template/invoice.ods");
// Show time !
*final *JFrame mainFrame = *new *JFrame("Viewer");
DefaultDocumentPrinter printer = *new *DefaultDocumentPrinter();
ODSViewerPanel viewerPanel = *new *ODSViewerPanel(doc, printer, *true*);
mainFrame.setContentPane(viewerPanel);
mainFrame.pack();
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.setLocation(10, 10);
mainFrame.setVisible(*true*);
|A lot of thanks in advance,
On Sun, Apr 5, 2009 at 7:13 PM, Guillaume Maillard
<[email protected] <mailto:[email protected]>>
wrote:
Hi,
I think you forgot to define the "printable area" in your template.
You can define/force the area in java too.
Regards,
Guillaume
2009/4/5 Joan Pujol <[email protected]
<mailto:[email protected]>>
Hi,
I try to render/print a document using the instructions of
Tutorials:Display and print a spreadsheet but it only displays the
first cell for my created documents.
If I use one of the template document it works ok but for new
generatd
documents it doesn't work. I've tested with very simple
document with
only 3 text cells without formating or with simple documents
created
with SpreedSheet.createEmpty...
What are the requeriments to be able to display/print well the
doc?
Cheers,
--
Joan Jesús Pujol Espinar
http://www.joanpujol.cat
http://lujop.deviantart.com