thuliobuarque / java2word

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

Missing Code/Files #96

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What web framework and version are you using (Struts1, Struts2, Spring,
JBoss Seam)?

Did you download j2w-ejb-2.0.zip or built from the source code?
Yes

Which web server did you deploy your .WAR (Tomcat, JBoss)?

Are you using Maven or Ant?

What is your Operational System?
Windows 7

What steps will reproduce the problem?
1. Trying to compile all in one example provided with the code

Please provide any additional information below.
Hi Leonardo,

I recently downloaded your code though I have experienced some issues:
- Constructors in most classes (e.g Heading1, Paragraph, Heading2 etc) are 
possibly not declared public and hence my compiler (Eclipse Juno) throws the 
error that the constructors are hidden.
- The example "AllInOneExample" uses a class ImageType which is missing both 
from the code and the documentation hence my compiler throws the error that the 
class type is not defined

Any help with these issues would be greatly appreciated - Thank you!

Regards,
Muhammad

Original issue reported on code.google.com by sajawalj...@gmail.com on 5 Jul 2012 at 2:42

GoogleCodeExporter commented 8 years ago
you are not supposed to see any constructor. 
This is how you should add elements to the document:

myDoc.addEle(Paragraph
                .with("This doc has been generated by the unit test testJava2wordAllInOne() in the class DocumentTest2004Test.java.")
                .create());

Take a read at Fluent Interfaces. 

I don't know about ImageType. I can't find it in the code. This is how you add 
images:
myDoc.addEle(Image
                .from_WEB_URL("http://www.google.com/images/logos/ps_logo2.png")
                .setHeight("40").setWidth("80").create());

It is all here: http://java2word.blogspot.com.au/p/all-in-one-example.html

Original comment by leonardo...@gmail.com on 5 Jul 2012 at 11:43