Query on processing a PDF file using Java mapping

Hi All,
i am trying to process a XML and PDF file using Java mapping, it is successful in XML but unable to do for PDF.
below is the code i am using... can any one guide me how to process PDF's..
byte byte1 = 0;     
java.io.ByteArrayOutputStream bos = (ByteArrayOutputStream)outputstream;
while((byte1=(byte)inputstream.read())!=-1){
bos.write(byte1);
bos.close(); 
Thank You,
Madhav

Hi Madhav,
I think instead of going with JAVA mapping you can write a custom adapter module for it.
Ref:  /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
Also check : Re: PI 7.1 : Taking a input PDF file and mapping it to a hexBinary attribute
/people/shabarish.vijayakumar/blog/2009/05/17/trouble-writing-out-a-pdf-in-xipi
Thanks,
Edited by: Hareenkumar on Dec 21, 2010 11:12 AM

Similar Messages

  • How to read pdf files using java.io package classes

    Dear All,
    I have a certain requirement that i should read and write PDF files at runtime. With normal java file IO reading is not working. Can any one suggest me how to proceed probably with sample code block
    Thanks in advance.

    hi I also have the pbm. to read pdf file using JAVA
    can any body help meWhy is it so difficult to read the thread you posted in? They say: java.io is pointless, use iText. So why don't you?
    or also I want to read a binary encoded data into
    ascii,
    can anybody give me a hint how to do it.Depends on what you mean with "binary encoding". ASCII's binary encoding, too, basically.

  • How to print PDF files using java print API

    Hi,
    I was goign throw lot of discusion and reading lot of forums related to print pdf files using java api. but nothing seems to be working for me. Can any one tell me how to print pdf files using java api.
    Thanks in advance

    Mike,
    Can't seem to get hold of the example described in your reply below. If you could let us have the URL to get then it would be great.
    My GUI application creates a pdf document which I need to print. I want to achieve this using the standard Java class PrinterJob (no 3rd party APIs I'm afraid, commercial restraints etc ..). I had a stab at it using the following code. When executed I get the pretty printer dialog then when I click ok to print, nothing happens!
    boolean showPrintDialog=true;
    PrinterJob printJob = PrinterJob.getPrinterJob ();
    printJob.setJobName ("Contract.pdf");
    try {
    if (showPrintDialog) {
    if (printJob.printDialog()) {
    printJob.print();
    else
    printJob.print ();
    } catch (Exception PrintException) {
                   PrintException.printStackTrace();
    Thank you and a happy new year.
    Cheers,
    Chris

  • Reading/writing PDF files using JAVA

    how to read/write a PDF file using java,
    while i read a pdf file using BUfferedReader class it gives a list of char. which is not readable.
    how to convert those files to readable format.?
    is there any special class for doin that.?
    plz explain..?

    is there any special class for doin that.?Yes, I'm sure Google knows a few libraries that ca do that.

  • Printing PDF files using java

    Is there a class or utility that already does this?
    Thx in advance.

    Do you want to create PDF files using Java? If so, there is a library available at http://www.lowagie.com/iText/docs.html Check out this site. There are many more similar PDFGEnerator tools that you can use..

  • Reading PDF file Using java.

    I tried to read the pdf file using FileInputStream. but it gives the Juncked charectars.
    How can i read(means content) the pdf file using Java.

    I just found the "Multivalent" library, it is free and will do exactly what you want: http://www.cs.berkeley.edu/~phelps/Multivalent/
    Check out the source of the tools/ExtractText.java file
    Ed

  • How to enable commenting into pdf files using java?

    Hi All,
    Is there any way available to enable comments into pdf files through java. I have a Adobe Reader 9 and also I want put some comments into pdf file, but the reader is not allowed to place a comment into pdf file before enabling the Comments into pdf. After enabling the comments in pdf file then only we can place the comments and we can the pdf file with comments.
    Is there any way available to enable comments into pdf file to view acrobat reader.
    Thanks in advance.

    The end user who uses the web application has Acrobat installed in their mahcine needs it only for the purpose of enabling comments in pdf. If this task of enabling comments in pdf is done through my application there is no need for acrobat in such user's machine which was requested as a cost cuttnig measure.
    For this purpose, i need to know about how to enable comments in pdf through java api.
    I have used itext java api for other pdf related manipulation in java. But it does not have feature as per the requirement posted above. Can any body suggest relevant java api to achieve the task requested?
    Tahnks in Advance.

  • Can I create MS-Word files or PDF files using java

    We are developnig a web based application for banks and in this at some point we need to provide reports to the Banks for downloading and printing . Now I do not want to make simple .txt files ,I wan to use some sophsticated file format which look nice.
    So is it possible for the server to create files in say .doc format or in say PDF format etc which the banks may download and print.
    I am using java servlets and jsp as front end and java classes in middle tier and oracle is my database.

    Please try this code:
    import god.java.pdf.*;
    PDFWriter pw=new PDFWriter(new OutputFile(new String("sample.pdf")));
    pw.print("This is your text.");
    pw.close();

  • I want to Edit PDF file using java(urgent)

    if any body helps me i shall be thankful to him.
    its urgent i hav to complete my assignment.

    http://www.geocities.com/marcoschmidt.geo/java-libraries-pdf.html
    http://www.firehouseinternational.com/usersite/uniforms/uniformsproduct.asp?categoryid=8787&productid=13454&page=1

  • HOW DO I MODIFY EXISTING PDF FILES USING JAVA

    I HAVE CHECKED SOME OF THE THIRD PARTY SOFTWARE, HAS ANYONE DONE THIS BEFORE, IF SO PLEASE HELP

    ...which ones?

  • Laserjet p2055dn is slow printing pdf files using mac

    My Mac is very slow printing pdf files on my hp laserjet p2055dn.  I have noticed fixes for this problem for people using Windows.  Is there a Mac solution?

    Do you want to create PDF files using Java? If so, there is a library available at http://www.lowagie.com/iText/docs.html Check out this site. There are many more similar PDFGEnerator tools that you can use..

  • Creating a PDF by using Java

    Is it possible to create a PDF file using Java
    Is there any API/class there exists in java
    Can any one help me
    Hope some intelligent peoples are there to help me
    make a reply to me at
    [email protected]

    There's:
    http://www.lowagie.com/iText/
    If you're working with xml, maybe this one:
    http://xml.apache.org/fop/index.html
    regards.

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • Compare two pdf files using adobe acrobat through command line

    Does anyone know how to compare two pdf files using adobe acrobat through command line. I want to do this via command line because we want to compare hundreds of file every day through some automated windows tasks.
    If command line option is not available in acrobat, then is it feasible to make use of acrobat javascript API to do this task?
    Any kind of help will be greatly.

    Command-line: Not possible.
    JavaScript: Possible, but very limited. Basically the only thing you can do is simulate clicking the Compare Documents button. The rest has to be done manually.
    However, it *might* be possible to automate this process a bit more using a plugin. Ask over at the Acrobat SDK forum for more information...

  • Deleting PDF files using Adobe Acrobat Standard XI

    I can't delete PDF files I created myself. I get the error message I don't have access to edit, see snapshot above. I am the administrator of my own laptop. Browsing this forum helps me to locate the same query as mine but no exact answers/steps of how to bloody delete the damn files. *sorry, bit annoyed of the run-around links & not found pages* Any help would be appreciated. Thank you in advance.

    I want to just delete closed PDF files. And I know how to delete using Del button or Right Click > Delete. The problem is I get error message saying the file I want to delete, can't be deleted.
    I tried a number of combinations with Preview enabled & disabled, but still won't let me delete the files. I haven't tried exiting/closing Acrobat AFTER disabling Preview THEN deleting the PDF files, will try this. But if this is how I'm supposed to delete files in Adobe XI from now on, come on, seriously?! I work with a lot of PDF files. I shouldn't have to close down the application (Acrobat) just to delete the closed PDF files using my File Explorer view. It's like having to exit Word each time I want to delete closed .docx files.
    Will try & advise.

Maybe you are looking for

  • How do I save and restore Session?

    Is it possible to have a user leave the site for a period of time, say 2 or 3 days, and when they come back, restore their last session and all the session variables? I have an idea of building a database and writing them all to the db on each page l

  • Understanding templates in Adobe Business Catalyst

    Hey all, I'm trying to understand templates in adobe bc. Here's my problem. I created a generic template. This template is exactly the same for the home page or interior page with the exception of the home page having a hero on it. Here's what i did.

  • Configuration of condition types

    Hi all, pls explain the configuration steps for condition types, thanks in advance

  • Why is iPhoto 11 so slow?

    iPhoto 11 (9.1.5) is really slow and unresponsive...hanging up other programs, and generally behaving poorly.  Anyone have any insight as to why it's so slow?

  • IR change filter and group dyamically

    Hi there, I have an interactive report, and I want to use different filters and groups based on the user that is logged on, anybody know how I can do this, i.e. set the filters and groups dynamically, thanks... Anil