Reading PDF contents to Context

Hi,
  How to read PDF contents in to context?
Thanks
   Vinod V

Hi,
I have created a blog on uploading PDF Data to the View context.
Reward if helpful.
[/people/shruti.rathour/blog/2008/02/07/uploading-sap-interactive-form-on-the-abap-webdynpro-view]
Thanks.

Similar Messages

  • Does acrobat has any option to read pdf content objects(stamps, layers, images etc) without using pl

    Does acrobat has any option to read pdf content objects(stamps, layers, images etc) without using plug-in in c#.net ?
    My requirement is read a pdf file and extract all the page objects(stampls, layers and images) along with its coordinates. Is it possible to get without using plug-ins in c#.net ?
    Please hlep me.

    These are very different things.
    JavaScript has some access to layers (called OCG). Layers are just names and have no coordinates to retrieve.
    Stamps may be annotations; there is some minimal access to these too I think. It may be hard to identify what is, and is not, a stamp even with a plug-in.
    Images are part of the actual page contents, and are only accessible to plug-ins.

  • Reading PDF contents in BizTalk server 2013

    Can BizTalk Server 2013 read PDF file contents? Or any third party tool can be plugged in BizTalk to achieve this.
    Any help would be highly appreciated. 

    BizTalk as an “engine” can only read XML nothing else.
    If you want to do some processing in BizTalk based on the PDF content, then PDF needs to be converted into XML. As of now there no out-of-box support to handle PDF file contents. By using a custom component (custom pipeline component) you got to covert the
    PDF into XML file and produced XML files can be processed in BizTalk as usual. To get started for PDF pipeline component, read this codeplex pipeline component which in turn uses
    itextsharp libarary.
    http://pdf2xmlbiztalk.codeplex.com/
    Or you can create your own custom decode pipeline component which converts the PDF to XML. Most of the custom component use 3<sup>rd</sup> part library
    (there are many available).
    Or when mean - “Can BizTalk
    Server 2013 read PDF file contents” to route the PDF just using the pass-thru shall pass the BizTalk PDF as steam of byte through message box. You can also use
    Orchestration to route the PDF message by following the suggestion mentioned here.,.
    Processing PDFs (or anything else!) in BizTalk Orchestrations
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • My clients are having difficulty reading PDF contents

    When I upload PDF on my site Apple Repair Club - Midtown Manhattan, NY - (800) 521-6181, my clients can not read using Adobe PDF Reader. I am having difficulty in posting web instructions on posts or pages. Now, I'm using plain text posting rather than PDF. The purpose of PDF files directory in posts is that I can manage 100s of them in a single page and this is quite easy to browse and download when necessary. Not being able to view PDF on site pages or posts is an inherited domain or hosting issue or the issue of PDF reader - I'm kind of not sure about it. When I talk to the hosting provider, I'm assured that it should not be the issue at the hosting end. When I upload contents, I can view from Safari 7.1.3, Chrome 41.0.2272.89 and Firefox 36.0.3. I'm a Mac user and have not tested from IE. When clients browse, they are thrown error that the contents are corrupted or not available. I have not investigated clients' browser versions though. Is this because of the non-supported browsers? Or an issue seen somewhere else as well? I didn't find trending concerns on such issues on the forum. Any instructions or advise is highly appreciated.

    I was able to subscribe in iTunes and download the episodes perfectly well. However the connection is quite slow. It took over two minute to download each episode - they are only around 8Mb each so it should only have taken a few seconds.
    Similarly when I checked the feed in Firefox there was a delay of some seconds before it loaded. My own connection is 100Mb/s so it's not me!
    It looks as if the GoDaddy server may be rather slow to respond sometimes - either that or something in the connection from there - and possibly it's sometimes slow enough to time out iTunes.

  • Want to upload PDF file in UI, read the content of PDF and Store in SAP DB

    Hi Experts,
    I have a new requirement in SAPUI5. I want to upload an PDF file using FileUploader component. Now how to validate this thing only for PDF file. User can only upload PDF file.
    Next I want to read the content of this PDF file and want to save data in SAP table. For this requirement, how to read the content of that file? After reading how to save the content in SAP table?
    To achieve this, how to design the ODATA service?
    Any kind of suggestion would be acceptable gratefully.
    Thanks in advance...
    Regards,
    Arindam Samanta.

    Hi Peter,
    Thanks once again for your kind response.
    I am getting the value in SLUG parameter and I can get the value in slug.
    Now I am getting errors from front end side, saying -
    1.   
    sResponse;
    "<pre style="word-wrap: break-word; white-space: pre-wrap;">CSRF token validation failed</pre>"
    2.POST http://------/CTC_MIBL_17072014/proxy/sap/opu/odata/sap/ZGW_CTC_VEHICLE_SRV/AS_CTC_MIBL_SET 403 (Forbidden)
    - Method 'AS_CTC_MIBL_SET_GET_ENTITYSET' not implemented in data provider class.
    Below is my code -
    // For File up-loader
    oFileUploader1 = new sap.ui.commons.FileUploader("upload",{
                    name : "test1",
                    uploadOnChange : false,
                    width : "250px",
                    uploadUrl : uploadURI,
                    uploadComplete: function (oEvent) {
                                     var sResponse = oEvent.getParameter("response");
                                     if (sResponse) {
                                       //  oUploadDialog.close();
                                         sap.ui.commons.MessageBox.show("Return Code: " + sResponse, "Response", "Response");
    // On Submit click
    oFileUploader1.insertParameter(new sap.ui.commons.FileUploaderParameter({name: "slug",
       value: oFileUploader1.getValue() }));
      oFileUploader1.insertParameter(new sap.ui.commons.FileUploaderParameter({name: "x-csrf-token",
       value: header_xcsrf_token }));
      oFileUploader1.upload();
    Could you please give some idea regarding my above mentioned issues?
    Thanks In advanced.
    Regards,
    Arindam Samanta.

  • Does Acrobat Pro read the content in pdf file and transforms it?

    Does Acrobat Pro read the content in pdf file and transforms it to xls file without the need for much changes or manual work?

    Acrobat X (Standard and Pro) will save tabular data to XLS or XLSX format, provided it can recognize the table as being a table. If the PDF has missing or incorrect structure tags, Acrobat will try to guess the table layout by the position of text and lines on the page - this works well for basic formatting but if the table has complex styling, spanned cells etc. it can lead to problems.
    Acrobat X will even attempt to export a table within a scanned document, by applying OCR during the export stage - though again this relies on the table being visually identified.
    See http://www.adobe.com/products/acrobatpro/pdf-to-word-excel-converter.html and this article on how to extract one table from a larger document.

  • Reading PDF from mail in java WebDynpro

    Hello all,
       I have a mail in my inbox with a PDF attachment. I am able to view the adobe form in view using the binary array, but what i want is to read the contents to view context elements and then display them to view. How can i do that?
      Points waiting for the right ans.
    Thanks
       Vinod V

    Hello shruti,
      You have done a great work in SDN Blog and i have followed that.
    one more way to solve this problem:
    WDInteractiveFormHelper.transferPDFDataIntoContext( byte[] pdfSource, IWDNode targetNode);
    use: extracts data from a PDF document and copies the values into the Web Dynpro Context.
    Thanks,
        Vinod V

  • Read PDF Formatted Spool and write PDF File to Application Server

    Hi Experts,
    After ECC 6.0, HR-W2 and W2C Form Spools are getting generated in PDF format.
    We have a requirement wherein we want to read the PDF Spool Programatically and write the PDF file to Application server (Using OPEN DATASET and CLOSE DATASET)
    PARAMETERS : p_spono LIKE tsp01-rqident.
    DATA: pdf_data type FPCONTENT.
    types: lt_pdf_table(1000) type x.
    data:  l_pdf_data type standard table of lt_pdf_table,
           l_pdf_line type lt_pdf_table,
           l_offset type i,
           l_len type i,
           p_file(100) VALUE '\sapout\DVH\pdf2.pdf'.
    *Read the spool content
    CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
        EXPORTING
             i_spoolid = p_spono
             i_partnum = '1'
        IMPORTING
               e_pdf = pdf_data
    *         e_pdf_file = file
        EXCEPTIONS
             ads_error = 1
             usage_error = 2
             system_error = 3
             internal_error = 4
        OTHERS = 5.
    * Modify the spool  contents to prepare internal table
      l_len = xstrlen( pdf_data ).
      while l_len >= 1000.
        l_pdf_line = pdf_data+l_offset(1000).
        append l_pdf_line to l_pdf_data.
        add 1000 to l_offset.
        subtract 1000 from l_len.
      endwhile.
      if l_len > 0.
        l_pdf_line = pdf_data+l_offset(l_len).
        append l_pdf_line to l_pdf_data.
      endif.
    * GUI DOWNLOAD Works Fine
    * Now pdf contents is ready , lets store in local PC
    *CALL FUNCTION 'GUI_DOWNLOAD'
    *  EXPORTING
    *   filename                        = 'C:\Documents and Settings\Desktop\shital.pdf'
    *   filetype                        = 'BIN'
    *  TABLES
    *    data_tab                        = l_pdf_data.
    OPEN DATASET p_file FOR OUTPUT IN BINARY MODE.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error opening file:'(Z03) p_file.
    ENDIF.
    LOOP AT l_pdf_data INTO l_pdf_line.
      TRANSFER l_pdf_line TO p_file.
    ENDLOOP.
    CLOSE DATASET p_file.
    IF sy-subrc <> 0.
      MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
              ' Error closing file:'(Z04) p_file.
    ENDIF.
    Currently as you can see I have commented out GUI_DOWNLOAD Function Module, But it works perfect when I try to Download file to Local Desktop.
    But when I try to pass the same Contents to Application server file and then try to open it by downloading file then it opens BLANK pdf file.
    As per requirements I should be able to write the file correctly on Application server and If I dowload it from there it should open PDF file correctly.
    Let me know if you require further details about the issue.
    Regards
    Shital
    Edited by: shital phadake on Apr 8, 2009 9:39 PM

    Thanks Selçuk for your reply and taking time for understanding the Issue,
    I went thru Functionality of the program you suggested but dont think it matches my requirement.
    Regards
    Shital

  • Firefox is stumbling when pages with PDF content come up. how can i get my old version3.5.6 back?

    Question
    firefox is stumbling when pages with PDF content come up. how can i get my old version3.5.6 back?

    Thanks for your response Cor el, I'll try that the next time it happens, it's completely random. One moment it functions normally then suddenly it changes its mind.
    Restarting my pc usually brings it back to normal until next time.
    One thing I've noticed, but not 100% sure there's a connection here.....I edit my websites online and log into cpanel which opens new pages in separate tabs, as it should do. It seems that this problem occurs when I'm logged into cpanel...if i'm logged in then open a new tab for regular browsing of other sites then all links on those sites also open in new tabs.
    Ican't say for sure if it's always only happened when logged into cpanel, but certainly on the last 3 occasions.
    At the moment it's behaving normally so much I can do to check your suggestions, but will try them the next time it occurs.
    One other thing I forgot to mention too....since i've had the new firefox, I've noticed that when I log into yahoo and post comments, I often find myself having to log on for each new post. Everything was fine with old firefox and there have been no other changes to my pc .

  • Issue in reading the contents of the file

    Hi all,
            How to read the contents of a text file and assign it to a single context variable and sent it to database I am using File upload control to upload the file. Up to my thing file upload control will give us the path of the file. We need to get the url and read it from it. If i am wrong please correct me and give suggestion to solve this.
    Thanks in advance.

    On UPLOAD click do this:
      public void onActionLoadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionLoadFile(ServerEvent)
         WDWebResourceType FileType = null;
         String FileName = new String();
              //get attribute info for context attribute 'FileUpload'
              IWDAttributeInfo attributeInfo =
                   wdContext.getNodeInfo().getAttribute(
                        IPrivateEmailView.IContextElement.FILE_UPLOAD);
              //get modifiable binary type from the attribute info,requires type cast.
              IWDModifiableBinaryType binaryType =
                   (IWDModifiableBinaryType) attributeInfo.getModifiableSimpleType();
              IPrivateEmailView.IContextElement element =
                   wdContext.currentContextElement();
              //if a file in the 'FileResource' attribute exists
              if (element.getFileUpload() != null) {
                   try {
                        String mimeType = binaryType.getMimeType().toString();
                        byte[] file = element.getFileUpload();
                        //get the size of the uploaded file
                        element.setFileSize(this.getFileSize(file));
                        //get the extension of the uploaded file
                        element.setFileExtension(binaryType.getMimeType().getFileExtension());
                        //NOTE: context attribute 'FileName' must not be set
                        //because the FileUpload-UI-element property 'fileName'
                        //is bound to it. Consequently the fileName is automatically
                        //written to the context after file upload.
                        //report success message
                        wdComponentAPI.getMessageManager().reportMessage(
                        IMessageEmailComp.SF_UPLOAD,
                             new Object[] { binaryType.getFileName()},
                             false);
                        FileType = binaryType.getMimeType();
                        FileName = binaryType.getFileName();
                   } catch (Exception e) {
                        throw new WDRuntimeException(e);
              //if no file in the 'FileResource' attribute exists
              else {
                   //report error message
                   IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                   msgMgr.reportContextAttributeMessage(
                        element,
                        attributeInfo,
                        IMessageEmailComp.NO_FILE,
                        new Object[] { "" },
                        true);
              //clear the FileResource context value attribute
              //element.setFileUpload(null);
              String URL;
              URL = this.CreateAndGetPathFileUpload(
                                  wdContext.currentContextElement().getFileUpload(),
                                                      FileName);
    //          if (URL.length() == 1){
    //               //ERROR
         wdContext.currentContextElement().setPATHFileUploaded(URL);
        //@@end
      private String CreateAndGetPathFileUpload(byte[] FileUpload, String FileName){
           String URL = new String();
         try {
              FileOutputStream fos = new FileOutputStream(FileName);
              fos.write(FileUpload);
              fos.close();
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         File fl = new File(FileName);
         URL = fl.getAbsolutePath();
           return URL;
    Forgot the method that give you the URL file.
    Message was edited by: Roberto Tagliento

  • "This is an Adobe Illustrator file that was save without PDf content."

    I have a client that has been working on a file in AI CS, never left his machine, but when he went to open it today he gets a message that says this file "was generated by a newer version of Illustrator. Would you like to import this file? Some data loss may occur".
    And when we click the "Import" button, we then get:
    "This is an Adobe® Illustrator® file that was saved without PDF content. To place or open this file in other applications, it should be re-saved from Adobe Illustrator with the "Create PDF Compatible File" options turned on. This option is in the Illustrator Native Format Options dialog box, which appears when saving an Adobe Illustrator file using the Save As command."
    However, even though this was created in AI CS, all other machine and all other versions of AI (even CS3, 3.3, 2, etc..) we get the same exact error message. How it can be newer than CS 3.3 when it was created in CS is strange to begin with.
    I assume this is some sort of corruption, but was wondering if there were any cures. It seems our backups have backed up this file in it's current state (corrupt), which is a huge issue at this point.
    Thank you very much for any help!

    I have sometimes had this trouble since I updated Acrobat.
    "This is an Adobe® Illustrator® file that was saved without PDF content ..."
    Not sure what's wrong - it seems to happen even though the Illy file is saved with PDF content and everything embedded.
    Another thing: When viewing pdfs under Advanced>Print Production>Output Preview I repeatedly get an RGB simulation preview even though I know that the file is CMYK. So I have to choose a CMYK simulation preview and then things look o.k.
    Is there any way to stop the RGB preview coming up? I note that Convert Colours messes things up completely, so it's only the preview that's wrong.
    Any ideas, Wade?

  • PDF content disposition on IE

    Hi,
    I am having difficulties in displaying PDF content from JSP. Obviously URL ends with mypdffile.jsp. From the JSP, I set attributes as follows. It works as intended on Firefox. Not on IE;
    response.setContentType("application/pdf;charset=UTF-8");
    response.setHeader("Content-Disposition", "inline;filename=\"Document.pdf\""); Any suggestions how I can fix this mess?

    On IE, it shows nothing! I can see that it reads something then nothing shows up. It is meant to display inside the viewing frame without creating external frames. If I change to "Content-disposition: attachment; filename=ddd.pdf", it comes out with PDF view frame. If you move the frame, you see lots of dirty traces on Windows frame!
    It may IE is not handling extension well.Or size information may be required.
    JSP is convenient to write changeable reports. PDF is generated using iText.
    Regards.

  • Reading PDF files in java

    Hi,
    can any one help me on how to read pdf files in java using itext. I have written some piece of code but it is of no use. It is giving some garbage.
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import com.lowagie.text.pdf.PdfReader;
    public class PdfAccess
    public static void main(String[] args)
    try {
    String pdfFile = args[0];
    PdfReader reader = new PdfReader(pdfFile);
    int pageCount = reader.getNumberOfPages();
    System.out.println(pageCount);
    String content = " ";
    for(int i=1;i<=pageCount;i++) {
    byte[] pageContent = reader.getPageContent(i);
    content = content+(pageContent.toString());
    System.out.println(content.trim());
    } catch(Exception e) { }
    can any one help me on how to get contents of the file. Are there examples avalilable??

    * Try this by PDFBOX , it will execute well as per ur request..........
        public void getPdfText(String fileName) throws IOException {
            StringWriter sw = new StringWriter();
            PDDocument doc = null;
            try {
                doc = PDDocument.load(fileName);
                PDFTextStripper stripper = new PDFTextStripper();
                stripper.setStartPage(1);
                stripper.setEndPage(Integer.MAX_VALUE);
                stripper.writeText(doc, sw);
                OutputStream out=new FileOutputStream(new File("d://PDFText.txt"));
                PrintStream write=new PrintStream(out,true,"UTF-8");
                write.print(sw.toString());
                //System.out.println(sw.toString());
            } finally {
                if (doc != null) {
                    doc.close();
    Can..Can...If we Try...!

  • Acrobat Reader won't read pdfs: "file path not valid"

    I thought that my PlayBook would be the perfect device to read pdfs in the Adobe Reader. The only problem is when I download a pdf from the internet, or copy a pdf from my computer, and click on the file icon from within the Reader, all I get is a cryptic error message that reads "The file path is not valid". No hints at what to do.
    At first I thought it was a problem with the file. But every file suffers from the same ill fate. Do you have any suggestions?

    Article ID: KB26744
    Unable to open any PDF documents on BlackBerry PlayBook
    Type: Support Content
    Last Modified: 06-17-2011
    Product(s) Affected:
        BlackBerry® PlayBook™
    Overview
    When attempting to open locally saved or attached Adobe® PDF document the following error is returned:
    The file path is not valid
    Environment
        BlackBerry® PlayBook™ tablet
    Cause
    The error is returned due to application permissions to of the Adobe® Reader application on the BlackBerry® Playbook™. The 'files' option within Adobe Reader application is set to 'Denied'.
    Resolution
    Edit the application permissions file access rights for the Adobe Reader application.
    1.  On BlackBerry Playbook open Options
    2.  Select Security -> Application Permissions
    3.  Select Adobe Reader application
    4.  Edit file permissions setting to allow the application to access files stored on BlackBerry PlayBook
    5.  Save settings by selecting Back button after making changes
    rabbitupnorth:
    This solution works! Problem solved.

  • Displaying PDF content in Android Air app - how?

    Hi, I'm fairly new to developing Air apps for mobile devices. I'm looking to have my app display PDF files and can't find a dfinitive way of doing it. I've read that using the StageWebView would be the way to do it.
    Here's the relevant part of my code (PDF path changed):
    if (StageWebView.isSupported)
    currentState = "normal";
    webView.stage = stage;
    webView.viewPort = new Rectangle(20, 100, 450, 450);
    webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE,onURLChange);
    webView.loadURL("http://path.to.my.pdf");
    addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
    else {
    currentState = "unsupported";
    lblSupport.text = "StageWebView feature not supported";
    Its working up until the point of actually displaying the PDF content, I get nothing (blank screen).
    I'm using Flash Builder 4.5 / Air 2.6 and debugging on a Motorola Xoom tablet. Adobe Reader is installed on the device.
    Any help with this would be greatly appreciated.

    Solved.
    For some reason I couldn't access the HTMLLoader object outside of the function that initialised it, despite the fact that I was listening for EVENT_COMPLETE.
    Basically, to get round this bug, just put all the initialise and load code in the same function and you should be laughing.

Maybe you are looking for

  • Looking for a photo Carousel/Slide

    I have 2 months looking for this and can't make it work and also can't found any control that 100% works The idea is simple, I have some photos and want to display it. Also the user must be able to zoom My latest attempt was with ScrollViewer and Fli

  • Account assignment for movement type 221

    Hi, Instead of using account suggested by GBB-VBR for movement type 221 we want to use account entered by user in transaction as an offset to inventory account. However SAP keeps on hitting account determined automatically (from GBB-VBR) and ignores

  • One of my usb port in my macbook pro is not working.

    Is there anyway i could fix this?

  • Regular expression help to solve sys_refcursor for a record

    In reference to my thread Question on sys_refcursor with record type , I thought it can be solved differently. That is: I have a string like '8:1706,1194,1817~1:1217,1613,1215,1250' I need to do some manipulation using regular expressions and acheive

  • Not working for me. :(

    I'm getting no photos when completing the tutorial / walk through and a strange message when viewing my code / xhtml page in either firefox or ie. "component returned failure code..." This would be a perfect feature for me to use and I'm really wanti