thuliobuarque / java2word

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

Image.from_FULL_LOCAL_PATHL does not create the image #56

Closed GoogleCodeExporter closed 8 years ago

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

None, as off now, will move towards spring soon

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

No.

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

Are you using Maven or Ant?
Ant

What is your Operational System?
Windows/Linux

What steps will reproduce the problem?
I have created the PrintWriter Object and assigned it a file, just as in your 
example.
1.IDocument myDoc = new Document2004();
  myDoc.setPageOrientationLandscape();// default is Portrait 
myDoc.addEle(Image.from_FULL_LOCAL_PATHL(Utils.getAppRoot()+ 
"\\packages\\images\\morgan_logo.gif").getContent());
String myWord = myDoc.getContent();

           writer.println(myWord);
           writer.close();
2.When the file gets generated, if i Open it up with Microsoft Word 2007, 
  i don't see the image, i see a box with red (x) on it, indicating the Image did not stream correctly. 

Please provide any additional information below.

Original issue reported on code.google.com by notify.p...@gmail.com on 5 Aug 2011 at 3:41

GoogleCodeExporter commented 8 years ago
Can you pls print out this var: Utils.getAppRoot()+ 
"\\packages\\images\\morgan_logo.gif"

See if the path makes sense. 
The image could not be resolved properly. Use the slash appropriated for you 
system. 

Pls let me know how you go with this.

thanks
Leonardo Correa

Original comment by leonardo...@gmail.com on 6 Aug 2011 at 12:49

GoogleCodeExporter commented 8 years ago

Original comment by leonardo...@gmail.com on 2 Feb 2012 at 12:22