vignesh krishnan

Greenhorn
+ Follow
since Feb 03, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vignesh krishnan

@paul, Thanks for all the help.
14 years ago
@paul, yes, word files contain data structures containing info about the content along with the original content. By plain text, i meant , the file does not contain images or other stuff, just text. The good news is , on fetching some more word attachments from other messages, it turns out that, i was able to get doc files like resumes with proper formatting.Its just doc files other than resumes that showed up with garbage content.
14 years ago
@paul, the word file attachment is in my gmail inbox and it just contains plain text and no other data. My question is how to properly fetch contents of a word file from the inputstream of the Message part? , so that the file does not contain any other garbage data along with the original content. I am using the code below to fetch word attachments.





14 years ago
@paul, i downloaded the word file from gmail and it is valid. my question is how to properly fetch the word contents from the inputstream of the Message part?
14 years ago
@paul, i am able to get the word file attachment from the inputstream, but the generated file contains lots of non-formatted data along with the formatted text.
And microsoft word is not able to open the file stating that it is corrupt (I had to use wordpad). is there any way to generate a formatted file? or does poi support the generation of a formatted file from the inputstream?
14 years ago
@paul, could you provide some details on how to copy the contents of the attachment to a file?, in this case, a word file.
14 years ago
Hey Rob , thanks for the note , I appended the contents of pg and processPart(pt) to StringBuilder and then called toString() as return value.
There are two errors that I encountered on the line : HWPFDocument hwpfDoc = new HWPFDocument(p.getInputStream());

The first error is the one that's now showing up as the exception.
It seems poi is not able to fetch the inputstream of the part.
Is there any alternative method to fetch the inputstream from the word attachment and pass it on to the WordExtractor or any other method to display word attachment contents?.
Thanks for the reply.
14 years ago
I would like to display microsoft word attachment contents to the user, and in the code below, i am trying to display the doc contents with poi but i get the following error:
BASE64Decoder: Error in encoded stream: needed 4 valid base64 characters but only got 3 before EOF, the 10 most recent characters were: "//////////"
Thank you for the reply.


14 years ago
I would like to know if its possible to download attachments such as word files from the inbox and save it as a word document .
Thank you for your help.
14 years ago
I have a jface Treeviewer showing system directories and files and a StyledText on a shell. The goal is to use a bunch of apis such as apache poi, pdfbox, htmlparser to display contents of a file choosen from the Treeviewer on the StyledText.
But somehow, the Treeviewer seems to occupy the entire shell , because of which i am not able to layout the StyledText component alongside Treeviewer. I want to be able to display the tree on the left with the styledtext on the right.
I would really appreciate any suggestion on this matter from you folks.
14 years ago