bellakhalAmir / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Table with multiple rows #418

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
1.0.4 - ubuntu 13.10

Please provide any additional information below.

Hi.

I am testing xdocreport and a case I did was create a table with multiple rows. 
When the table pass to other page, the upper border of table don't is shown in 
the pdf.
How can I show the upper border?

Thanks!

CODE:

public static void main(String[] args) {
        // TODO Auto-generated method stub
        final InputStream in = Teste.class.getResourceAsStream("/invoiceTemplate.odt");
        try {
            final IXDocReport report = XDocReportRegistry.getRegistry().loadReport(
                    in, TemplateEngineKind.Velocity);

            final IContext context = report.createContext();

            // Register developers list
            List<Developer> developers = new ArrayList<Developer>();
            developers.add(new Developer("Leclercq", "Pascal", "pascal.leclercq@gmail.com"));
            developers.add(new Developer("Leclercq2", "Pascal2", "pascal2.leclercq2@gmail.com"));
            context.put("developers", developers);

            FieldsMetadata metadata = new FieldsMetadata();
            metadata.addFieldAsList("developers.Name");
            metadata.addFieldAsList("developers.LastName");
            metadata.addFieldAsList("developers.Mail");
            report.setFieldsMetadata(metadata);

            // 3) Generate report by merging Java model with the ODT,
             // and then converting to PDF
             final OutputStream out =
             new FileOutputStream(new File("mergedInvoice.pdf"));

             final Options options = Options.getTo(ConverterTypeTo.PDF)
             .via(ConverterTypeVia.ODFDOM);
             report.convert(context, options, out);

        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (XDocReportException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }

Original issue reported on code.google.com by giulianodb@gmail.com on 9 Jul 2014 at 1:05

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Your problem is about odt->pdf converter or docx->pdf converter? Your Java code 
uses ODT although your attached doc is docx?

> When the table pass to other page, the upper border of table don't is shown 
in the pdf.

Your attached docx has not upper border too, no?

Regard's Angelo

Original comment by angelo.z...@gmail.com on 9 Jul 2014 at 6:48