text: Pdf file handling
  -0001-11-30 Views:0
  I am trying to read pdf file in String, process the string and then put the string back in a new pdf file. The code I am using is as follows:
  Reading pdf file:
  String readFile() throws Exception
  InputStream istr = getClass().getResourceAsStream("26-1880.pdf");
  StringBuffer buff = new StringBuffer();
  int someByte=0;
  for(int i=0 ; ; i++)
  try
  someByte = istr.read();
  catch(IOException ioe)
  ioe.printStackTrace();
  if(someByte == -1)
  break;
  buff.append((char)someByte);
  return (buff.toString());
  Writing string to pdf:
  void writeFile(String file) throws Exception
  OutputStream ostr = new FileOutputStream(new File("VALoan.pdf"));
  byte[] someByte=file.getBytes();
  ostr.write(someByte);
  ostr.flush();
  ostr.close();
  But the new file that I generate does not become valid pdf file.
  Also right now, I am not even processing the string that I get from a pdf file. I just get and put it back.
  Can anyone find out what could be the problem?
  Thanks,
  -Stan
  I want to process the string that I get from the pdf.What do you mean "process"? What are you planning to do with it?
  And it is NOT a String. If you want a String representation (e.g., just the text, with no layout, font, etc. info), then you'd need to interpret the BYTES first and then build a String from the results.
  I can not process the bytes. So I think, I have to
  convert the bytes into string.Then you need to either learn the PDF spec and write code to interpret those bytes, or you need to find a 3rd party library that does this. You can't just expect to read the bytes into a Java String and have it work.
  PDF file handling through BPEL
  Category:DefaultRelease time:2015-10-11Views:130
  Hi, We are exploring BPEL as an option to handle PDF files generated by Oracle EBS (BI Publisher). Basically we want to achieve following: Pick up PDF files from certain location on UNIX box and then a. Spliting the PDF file into two or more files (d[More]
  Pdf file handling
  Category:DefaultRelease time:-0001-11-30Views:130[More]
  Raise without Handler error when printing pdf files in Outlook
  Category:DefaultRelease time:2015-10-11Views:130
  At work sometimes I'm asked to print emails with tons of attachments, but when I attempt to print the email with the attachments through outlook, anytime there is a PDF attached, I get the "Raise without Handler!" error and also the following wi[More]
  Handle the "No matches were found." when doing a search in Adobe Acrobat PDF file.
  Category:DefaultRelease time:2015-10-11Views:130
  I have written an Excel spread sheet and using visual basic coding in my macro can open an as needed PDF file, search for a paragraph number as copied from the spread sheet, capture the page in the PDF file it is found on and paste the "pagefound&quo[More]
  Acrobat 4.0 possible patch to handle newer .pdf files?
  Category:DefaultRelease time:2015-10-11Views:130
  I am currently at a small printing company that uses a Heidelberg Prosetter and interconnected software programs for platemaking in our pre-press department. We currently have an outdated Heidelberg meta dimension system that I was told will only han[More]
  Unable to make Acrobat X the default handler/opener of PDF files on a Windows 8 laptop with Acrobat Reader also installed.
  Category:DefaultRelease time:2015-10-11Views:130
  I have a user with a Windows 8 Sony Vaio laptop with Microsoft Office 2013 Professional, Acrobat X Standard, and Acrobat Reader installed. Another program on his system requires Acrobat Reader so we cannot just remove that and keep it off the system.[More]
  XMP Standard - Is there a tool for non-professionals to handle PDF files for free?
  Category:DefaultRelease time:2015-10-11Views:130
  I'd like to start organising my various files and I wonder if I could include PDF files into the process (it seems easier with graphics), possibly also some video or audio files in the future. I hope there's a tool, not onle for IT specialists to han[More]
  PDF Preview Handler will not open 1 file
  Category:DefaultRelease time:-0001-11-30Views:130
  Hi, I have Office 2013 and Acrobat XI, the PDF Handler works fine on all my files except one. Through our online ordering, I get a confirmation email with E-Order.pdf with every confirmation, worked for a while and now gives me the "This file cannot[More]
  How to open PDF file generated by some ashx handler using POST parameters in Internet Explorer for W
  Category:DefaultRelease time:-0001-11-30Views:130
  I need to print content of pdf file by JavaScript. To do this used HTML like this: <OBJECT id = "Pdf" data = '' name="Pdf2" WIDTH="300" HEIGHT="300"></OBJECT> <a onclick=[More]
  How to open report.pdf file? getting error message file cannot be previewed pdf preview handler
  Category:DefaultRelease time:2015-10-11Views:130
  how can I open a report.pdf file that shows error: file cannot be previewed because of an error w/ pdf preview handlerHi pfmercerville, If you are running the 64-bit version of Windows 7 (or Vista), you will find that your PDF files do not preview in[More]
  File handles don't close when the pdf is closed?
  Category:DefaultRelease time:2015-10-11Views:130
  Using Acrobat X on Windows 7 Pro in a networked environment. Once I open a PDF file in Acrobat, as long as I have acrobat running, (even after I have closed the file and moved on) I cannot change/move/rename the file. Since I spend a lot of time revi[More]
  - 1 Import/export not working as expected
  - 2 The Neverending VirtualBox + USB Story
  - 3 Status of an Order document
  - 4 Getting a Photo Album off my iPhone
  - 5 Input Form issue
  - 6 Members Only area
  - 7 Office Word in trash
  - 8 It won't charge...
  - 9 Stop the Security Information popup
  - 10 S.O.S! Dreamweaver screwing up Photoshop slices when I try to add rollovers! X_X
  - How do I disable iPhoto from switching to camera on launch?
  - Macbook no longer recognizes my midi keyboard
  - How can I get my Photosmart B8550 to print envelopes from the photo tray?
  - Localization issues
  - Correct procedure to update Embedded Controller Programme - T43
  - Select List (query based LOV) in V. 4.1.1.00.23
  - Can I load windows office into iPad?
  - Invoking Sample Java Graphs thro Oracle Express 6.3.2
  - How can i make a form in access into html format?
  - Dummy house bank for France