Downloading converted PDF file - output is truncated

Hi -
My requirement is to convert an SAP spool to a PDF file and download it to the presentation server. It is working, however, when I open the PDF file, the output is truncated such that only 132 characters of each line are being displayed (instead of the desired 255). Any ideas? Thanks.

James,
The PDF the table parameter of function module CONVERT_ABAPSPOOLJOB_2_PDF have a data element TLINE which have length of 132, so you need to do something this way
  data : begin of out occurs 0.
       include structure solisti1.
  data : end of out.
  call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
    exporting
      src_spoolid = spoolid
      no_dialog   = 'X'
    tables
      pdf         = pdf_table
    exceptions
      others      = 0.
  clear: pos,
         out,
         len.
  loop at pdf_table.
    pos = 255 - len.
    if pos > 134.    "length of pdf_table
      pos = 134.
    endif.
    out+len = pdf_table(pos).
    len = len + pos.
    if len = 255.    "length of out (contents_bin)
      append out.
      clear: out, len.
      if pos < 134.
        out = pdf_table+pos.
        len = 134 - pos.
      endif.
    endif.
  endloop.
  if len > 0.
    append out.
  endif.

Similar Messages

  • How to download converted PDF file?

    I've recently signed up for converting PDF files to Excel.  I have converted my 1st file.  However, when I click the download icon, nothing happens.  How do I download my converted file into Excel?

    Download: you just download it as you would any other document.
    Convert to Word: either using the ExportPDF online service, or Acrobat.

  • Hi I have downloaded Acrobat XI Pro and when I try to convert pdf file to word the message says 'error can't sign in'

    Hi I have downloaded Acrobat XI Pro and when I try to convert pdf file to word the message says 'error can't sign in'?
    Irenedix

    Hi Irenedix,
    If you are using Acrobat you can try the suggestions mentioned above.
    Are you using the Create PDF service from within Reader to create pdf?
    If yes then please check if you are able to login to: https://cloud.acrobat.com/convertpdf  with your Adobe ID and able to convert the document to pdf.
    If yes then within Reader you can try the following:
    Choose Edit > Preferences (Win)
    Click 'Online Services' or 'Adobe Online Services' on the left-hand side
    Sign out of your Adobe ID and sign back in.
    Regards,
    Rave

  • How to open my file in Gmail after download free trial for converting PDF file to Microsoft Words.

    after download the Free Trial for Converting PDF file to Microsoft Words, I can't open my file in gmail

    One solution would be to generate the report via an servlet which you then call with an af:golink with an target frame set to blank.
    For a sample how to do this check out http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/
    Timo

  • I just downloaded Adobe to convert PDF file.  Failed to convert on the first Document.  What do I do

    I just downloaded Adobe to convert PDF file.  Failed to convert on the first Document.  What do I do

    You need to provide exact info. What system? What document? What settings? what errors?
    Mylenium

  • I need to convert PDF file to Word Document, so it can be edited. But the recognizing text options do not have the language that I need. How I can convert the file in the desired of me language?

    I need to convert PDF file to Word Document, so it can be edited. But the recognizing text options do not have the language that I need. How I can convert the file in the desired of me language?

    The application Acrobat provides no language translation capability.
    If you localize the language for OS, MS Office applications, Acrobat, etc to the desired language try again.
    Alternative: transfer a copy of content into a web based translation service (Bing or Google provides a free service).
    Transfer the output into a word processing program that is localized to the appropriate language.
    Do cleanup.
    Be well...

  • How to download a .pdf file from a JavaMail application?

    hi to all,
    iam unable to download a .pdf file from a mailserver using
    my javamail application.i have downloaded all kind of files except .pdf.
    my code snipnet:
    public static void dumpPart(Part p) throws Exception {
    //     if (p instanceof Message)          dumpEnvelope((Message)p);
              System.out.println("CONTENT-TYPE: " + p.getContentType());
              Object o = p.getContent();
              if (o instanceof String) {
                   System.out.println("This is a String");
                   System.out.println((String)o);
                   } else if (o instanceof Multipart) {
                        System.out.println("This is a Multipart");
                        Multipart mp = (Multipart)o;
                        int count = mp.getCount();
    System.out.println("****************************************");
    System.out.println("count" + count);
    System.out.println("****************************************");
                        for (int i = 0; i < count; i++){
                             System.out.println("CONTENT-TYPE: " + p.getContentType());
                             dumpPart(mp.getBodyPart(i));
                        } else if (o instanceof InputStream) {
                             System.out.println("This is just an input stream");
                             InputStream is = (InputStream)o;
                             String filename=System.currentTimeMillis()+".exe     ";
                             FileOutputStream fos=new FileOutputStream(filename);
                             int c;
                             while ((c = is.read()) != -1)
                                  //System.out.write(c);
                                  fos.write((char)c);
    }//dumpPart
    what's wrong with this code?
    Nagaraju.G

    fos.write((char)c);Converting the byte to a char is unnecessary and probably harmful. Just do this: fos.write(c);

  • Problem with downloading a PDF file from a webserver run on Linux

    Hi,
    I've written a simple functionality that manages file attachments.
    Everything works fine (attaching, downloading, deleting) when the webserver runs on Windows.
    However when I deployed the code to the Resin webserver run on Linux and use the Win browser to connect to the app, the downloading of PDF file doesn't work (uploading and downloading of txt, doc, xls, jpg files is OK).
    The downloaded PDF file is almost twice as big as original (~28KB when original is ~12KB) and it can't be open.
    I guess it is the problem of writing to the output stream of HttpServletResponse but I can't localize the problem.
    Here is the code I use for downloading file:
    private boolean downloadFile(HttpServletResponse response, String filePath,
                   String originalFilename) {
         File file = new File(filePath);
         String contentType = URLConnection
                   .guessContentTypeFromName(originalFilename);
         // If the content type is unknown set the default value.
         if (contentType == null) {
              contentType = "application/octet-stream";
         BufferedInputStream input = null;
         BufferedOutputStream output = null;
         try {
              input = new BufferedInputStream(new FileInputStream(file));
              int contentLength = input.available();
              response.reset();
              response.setContentLength(contentLength);
              response.setContentType(contentType);
              response.setHeader("Content-disposition", "attachment; 
                           filename=\""+ originalFilename + "\"");
                output = new BufferedOutputStream(response.getOutputStream());
              int bufSize = 10000;
              byte[] buf = new byte[bufSize];
              int bytesNo = 0;               
              while ((bytesNo = input.read(buf, 0, bufSize)) != -1) {
                   output.write(buf, 0, bytesNo);
              output.flush();
              input.close();
              output.close();
         } catch (IOException e) {
              log.debug(e.getMessage());
              e.printStackTrace();
    }Can you point any problem?
    Thanks in advance,
    Ala

    matali wrote:
              int bufSize = 10000;
              byte[] buf = new byte[bufSize];
              int bytesNo = 0;               
              while ((bytesNo = input.read(buf, 0, bufSize)) != -1) {
                   output.write(buf, 0, bytesNo);
    This piece is completely wrong and doesn't work for files bigger than 10000 bytes. Replace it by
    byte[] buffer = new byte[10240]; // 10KB exactly.
    int length = 0;
    while ((length = input.read(buffer)) > 0) { // Read next 10KB of input to buffer.
        output.write(buffer, 0, length); // Write specified length of buffer to output.
    }Or just use output.write(input.read()) in a loop of the contentLength as you're alredy using BufferedInputStream/BufferedOutputStream.
    Another thing, the method is declared to return a boolean, but it actually doesn't? I would just let it throw an exception in case of failure instead of returning a boolean and let the calling method handle the exception.

  • I tried to convert PDF file to Excel file and I got an error message no. 404

    I tried to convert PDF file to Excel file and I got an error message no. 404

    My question is related to Reader, which infrmation?
    The version is 10.0 and was downloaded?
    any other details?

  • How to download converted .docx files from Adobe?

    I have converted five .pdf files into .docx files, but when I click on "the download icon" after putting a "check" in the box before the first converted file, nothing happens? 
    Is there a process to use?  I am using a PC using Windows 7 Ultimate Operating System, and my internet browser is IE 9.  I cannot upgrade to IE 10 as it compromises my MSN mail account: Outlook.com.
    I have tried to read all other answers to questions about this same issue, but none address the simple process of downloading a converted .pdf file back onto one's PC.
    Thanks for your help, Thomboy

    The trouble with these kind of situations is that an applet runs on the client. If you want an applet to connect to a specific server (which means the client makes a connection to that server), you basically have to give the entire world access rights to that server. I don't think your friendly local administrator will be too happy with such a prospect.
    What you could do is put a man in the middle. Don't upload to the file server directly, but to for example the web server where the applet was downloaded from, for example by making a servlet available that takes a HTTP file upload. When that upload is complete, send the file from your man in the middle server to the file server using whatever method you like/have available/know how to code. In this situation only your web server needs access to the file server, which is far easier to secure.

  • I am a new first time user of adobe to convert pdf. files to word, etc.  I must add that I am 75 years old and not a computer literate fellow.  I have a fairly large pdf file that I want to convert to word so I can cut ?

    I am a new first time user of adobe to convert pdf. files to word, etc.  I must add that I am 75 years old and not a computer literate fellow.  I have a fairly large pdf file that I want to convert to word so I can cut & paste, etc ?  Any & all help will be appreciated.

    Haakwine you have posted to the Downloading, Installing, Setting Up forum.  Which specific Adobe software or service are you trying to use to convert PDF files?

  • Unable to convert PDF file into word document

    I just signed up with Adobe in order to convert a PDF file into a word document and it continues to fail.  Any suggestions.

    If you have adobe X, simply go to "File" -> "Save-As" and Microsoft Word is an option. Also, there is a download (paid) called Able2Extract that will allow you to convert pdfs to word, excel, etc. but the formatting is often lost. If you get the premium package, you can even convert scanned documents. I've used Adobe X to do the conversion, and it retains headers, footers and all formatting.
    And i personally share you with a article about how to converting PDF files to Word(.doc), you just need to follow the easy guide.
    Hope it can help you a lot.

  • Converting PDF files to Microsoft Word

    I downloaded a PDF file to Microsoft word, but I can't edit it.  Why?

    That suggests that the PDF was not created with PDF Maker that retains the format information. As a result, there is not much you can do with Acrobat if it is not converting properly. You can try to save as HTML or RTF and import those into WORD. Sometimes those conversions will do better, but not real sure.
    You can also use a copy and paste from the PDF with the alt key held down to force the column mode of copy. Unfortunately, with Acrobat there is not much more you can do. There are some 3rd party products that focus on the conversion to WORD and I understand do a much better job for the type of untagged document you likely have. Check with PDF Zone or Planet PDF for the 3rd party solutions. Be aware, they are not cheap either.

  • Safari 3 quits as soon as I download a .pdf file

    I've just downloaded the Beta of Safari 3, running on my 12" Powerbook (10.4.10, 1.25Gb RAM, 1.5GHz processor). Now, whenever I try to download a .pdf file from any site, the browser crashes without warning or error message.
    Three questions:
    1. Anyone else having the same problem?
    2. Anyone got an answer to it?
    and, assuming the answer to (2) is 'no',
    3. How do I re-install the latest version of Safari before the Beta 3?
    Thanks,
    Mark

    Right - apologies for posting the wrong forum for a start... Should have looked around and spotted the Beta forum.
    Secondly, problem now solved:
    Moved the "AdobePDFViewer.plugin" from HD>Library>Internet PlugIns to
    HD>Library>Internet PlugIns>Disabled PlugIns

  • How to download a pdf file in external storage(sd-card) not use a isolated storage wp8

    i have a url for download pdf file return by webservices 
    and i have attach this link in hypertext button this is start a download but in browser . and when i am google for this purpose the give me "
    Background file transfer
    " Process and then code is also using a isolated storage but i want a external storage process Please Help me 
    how to download a pdf file in external storage(sd-card) not use a isolated storage wp8 

    Hello,
    This forum is for discussions and questions regarding profiles and Microsoft's recognition system on the MSDN and TechNet sites. It is not for products/technologies.
    As it's off-topic here, I am moving the question to the
    Where is the forum for... forum.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

Maybe you are looking for

  • X1 and Amazon Prime & Netfix issue

    At least once a week I will select my Amazon Prime or Netflix and will get an error on the tv about not being connected to the network. Usually I have to reboot everything. Most of the time it works the first time but sometimes I have to try a couple

  • Question about specific items I'd like to get off my hard drive

    My little 80 GB iMac hard drive is full, so I'm using the WhatSize application (I love this app!) to find what's taking up all the space. The following things I'm not sure about, so I was wondering if someone could tell me what to do about these: 1)

  • IPhoto Import Questions

    I have about 14,000 pictures on the hard drive and want to import them into iPhoto. Any issues with importing that many? Should I do it in steps? If I decide to stop the import half way through does it commit the changes to the library or is it as if

  • I get an unknown error when I try to open an attachment in Outlook

    I have not been able to open an attachment in my Outlook mail account on my Droid Incredible since November 30th.  Before then, I had no problem.  I have uninstalled and reinstalled Adobe reader and when I check view, I get a message that says "unkno

  • Windows setup could not process the Catalog setting

    Hi, I'm trying to deploy an image of Windows 8 Embedded using WDS (Windows Server 2012) and I find this message in client machine. It appears while boot image is loading... I'm using an *.xml file to make an unattended installation, that I select fro