Problems converting to PDF?

I am converting the report documentation into PDF. It all works fine but the print format from PDF is very very small. I am not using SMARTFORMS but rather calling FM to get the report documentation and then converting into PDF. I am attaching the code below, please run the code and you will understand what i mean when you try to print from the converted PDF file. Please give me some suggestion, solution, or sample code. It will be appreciated.
Thanks
Nahman
*Start of code
ATA: header LIKE thead,
      options LIKE itcpo.
DATA: lines LIKE tline OCCURS 0 WITH HEADER LINE,
       otfdata LIKE  itcoo OCCURS 0 WITH HEADER LINE,
       pdflines LIKE tline OCCURS 0 WITH HEADER LINE,
       doc_itab LIKE  docs OCCURS 0 WITH HEADER LINE,
       binfilesize TYPE i,
       filenm TYPE string.
PARAMETERS: program LIKE trdir-name OBLIGATORY,
            filenam LIKE rlgrap-filename DEFAULT 'c:\temp\pdftest.pdf'.
START-OF-SELECTION.
  CALL FUNCTION 'DOC_OBJECT_GET'
    EXPORTING
      class                  = 'RE'
      name                   = program
     language               = sy-langu
   IMPORTING
     header                 = header
    TABLES
      itf_lines              = lines
   EXCEPTIONS
     object_not_found       = 1
     OTHERS                 = 2
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  options-tdgetotf = 'X'.
  options-tdprogram = 'SAPLSHL2'.
  options-tddest = 'LP01'.
  CALL FUNCTION 'PRINT_TEXT'
    EXPORTING
      application                    = 'TD'
      device                         = 'PRINTER'
      dialog                         = ' '
      header                         = header
      OPTIONS                        = options
    TABLES
      lines                          = lines
      otfdata                        = otfdata
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  REFRESH lines.
  CALL FUNCTION 'CONVERT_OTF'
  EXPORTING
    format                      = 'PDF'
   IMPORTING
     bin_filesize                = binfilesize
     TABLES
       otf                         =  otfdata
       lines                       =  pdflines
  IF sy-subrc <> 0.
  ENDIF.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
   bin_filesize                    = binfilesize
      filename                        = filenm
      filetype                        = 'BIN'
    TABLES
      data_tab                        = pdflines[]
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

Hi,
Check the sample code,
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Regards,
Azaz.

Similar Messages

  • Problems converting a pdf file to a word document using ExportPDF

    I am having problems converting a pdf file to a word document (.docx) using ExportPDF. It is spends ages trying to upload the PDF file, but fails to do so. Should I just cancel my subscription?

    I suspect that you are asking for help with CreatePDF. If so, you should post in
    http://forums.adobe.com/community/createpdf
    This is the Reader forum...

  • Having a problem converting a PDF file to Words with Adobe's conversion program.

    Having a problem converting a PDF file to Words with Adobe's conversion program.

    See https://forums.adobe.com/docs/DOC-2412
    If you need more help, please ask in https://forums.adobe.com/community/acrobatdotcom/

  • Problems Converting/Export PDF to Microsoft Word

    Help! I am having Problems Converting/Export PDF to Microsoft Word.  I am paying $19.99 per month. what do I do?

    If you are having a problem understanding how to use the software you should post in the forum for the product involved. 
    Here is a link to a page that has links to all Adobe forums...
    Forum links page:
    http://forums.adobe.com/index.jspa

  • Problem converting from pdf to doc (encrypted or corrupt file?)

    Hi everyone.
    I need to convert my resume (pdf) to doc so I can make a couple of edits, and then convert it back to pdf. Problem is, I can't seem to do it. I first tried straight from the program in adobe by saving the file as a doc, but the file formating was way too screwed up when I did that.
    So, I then googled around, and found zamzar.com. I tried that site, but kept getting conversion errors which said "file may be encrypted, password protected, or corrupt". I don't have any passwords or encryptions on it, so I tried downloading other conversion programs, but I kept getting the same types of errors.
    I checkd the "security properties" for the file, and I don't have anything. I also don't know how the file could be corrupt since I don't have any issues viewing it, and when I sent it to my friend via email, he was able to open it, too.
    Ihave recently been using Acrobat 9 pro extended version that I downloaded as a torrent from a reputable person. I just wanted to get a feel for the program, but maybe this is the problem, since any pdf I've saved since I began using it, seems to have that conversion issue, but I figure there has to be a workaround. I really don't know what the issue is, or how I can solve it, and so I'm stumped.
    Any suggestions would be really great.
    Thanks a lot.

    This is a good read for anyone attempting to convert a PDF to a Word document...
    http://www.planetpdf.com/enterprise/article.asp?ContentID=PDF-to-Word_Conversion_-_Why_it_ is_so_hard_to_do&gid=7837&fa

  • Problem converting to PDF - headers disappear

    People, I have been using Acrobat 11 for a year with no problems. I am now creating Word documents using a new template, and when I PDF them their headers disappear in the PDF files. A colleague using Acrobat 9 can convert them to PDF without encountering this problem. Has anyone else had this problem? Can anyone suggest a solution? Thanks in advance.

    Hello,
    Would it be possible for you to share the sample template with me. I will test it at my end.
    Regards,
    Anoop

  • Having a problem converting a PDF document to Word, or RTF

    My Document appears to be images of scanned pages of a book. Document Properties say it was produced using PDF version 1.5; however, Tagged PDF attribute says NO! I have a feeling that images of pages cannot be converted. Would this be true?

    Oops, I think you have to scan an original document, or a book page, and change it to a PDF before you can apply OCR, or vice-versa. My source file is usually a PDF image file, like pictures of book pages, like Google Books. I don't think you can peel off image texts. I think once you have downloaded a PDF containing images of book pages, then you're stuck with increasing text size, and reading it directly. You can't COPY text images, then PASTE to a new document for Saving.

  • I need help converting a pdf file to a word document

    I am having problems converting a pdf file to a word document

    Hi. I am using window 7 I went to get some documents scanned to a flash drive and it was scanned to a PDF. But I am having a hard time uploaded the file. I put my flash drive in to the right of the page it ask me to convert pdf. to a word document.  

  • Converting exported pdf to word

    I am having a problem converting a pdf I received by e-mail to a word document.  I open it with adobe reader then export the pdf to convert to word 2007 or newer.  I do this online and when it comes back it is not any where close to correct.  what am I doing wrong.

    Probably nothing. Conversion back to word depends a lot on the structure of the e-mail and all. To do it with Reader is difficult, but apparently you are using the on-line service. Neither Reader or the on-line service are the focus of this forum, but my guess is that Acrobat may do only slightly better. AA XI has done the best of any version I have ever used, but it often still is not very good.
    I would suggest you ask the author for an original WORD document. That would be a lot easier in the long run. However, it might be that it was produced by WORD Perfect, Open/Libre Office, LaTeX, or a host of other editors and layout programs. In that case, it may be no better.
    Layout is often the first thing to go. If you have equations, expect them to look like garble. Those are issues that Acrobat can just not complete well.

  • I just purchased the ExportPDF. When I try to convert a pdf document to word online, it gives me an error. What is the problem?

    I just purchased the ExportPDF. When I try to convert a pdf document to word online, it gives me an error. What is the problem?

    Hi sampa1,
    Can you please let us know the error message you are getting while converting PDF to Word. Also, please let us know the steps you are following.

  • Good day, I have installed Acrobat DC, and would like to combine 2 files. One is excel allready converted to PDF - No problem. The other one is from Pastel mailed as PDF.

    Good day,
    I have installed Acrobat DC, and would like to combine 2 files. One is excel allready converted to PDF - No problem. The other one is from Pastel mailed as PDF.
    When trying to merge the files, this file ask for a Password. No password was issued from the setup or mail?

    Good day abrieb93050306,
    I can understand your concern, however can you please let me know that are you able to open both the PDF files ( the one you converted form excel to pdf & the other pdf that was mailed to you ) individually without using any password?
    As it asks for the password, it means that the postal mailed PDF is password protected. You can ask for the password from the sender of the postal mail & then try to combine the files.
    Please follow the steps in the provided KB doc.to combine the files : Combine files into single PDF | Adobe Acrobat DC tutorials
    This will probably resolve your issue.
    Let me know if you still experience any issue.
    Regards,
    Aadesh

  • Having problems converting pdf to word. I'm not able to convert the file, what do I need to do?

    having problems converting pdf to word. I'm not able to convert the file, what do I need to do?

    Hi prates77,
    I'm sorry to hear that you're having trouble converting files. Are you receiving the conversion error regardless of the file that you try to convert? Does the error occur whether you use the web interface, or convert via Reader? And an odd question: how many files do you have stored in your Acrobat.com account? We have seen reports of this error when there are a large number of files stored in the root folder of your Acrobat.com account.
    I look forward to hearing back from you.
    Best,
    Sara

  • Problem in converting into PDF

    HI,
    I need to convert data in PDF format but i am facing problem in it.
    i have used 2 methods,
    1. i used job_open,job_submit,job_close,BP_JOB_READ to submit job and CONVERT_ABAPSPOOLJOB_2_PDF to convert into pdf format. it is working fine in this case.
    2. But when i use SUBMIT program with USING SELECTION-SCREEN 'xxxx' WITH selcrit2 IN 'xxxx'.. and then spool which created i used in FM CONVERT_ABAPSPOOLJOB_2_PDF , it is not converting even though same exporting and importing parameters are passed in this as in above.
    Please reply.
    Regards,
    neha

    Hi,
    First check whether the spool request is working fine or not by just execute any PO or sales order or any print view and from the menu give print there by you will get the spool number, make a note of the spool number.
    Go to SE38 and enter the program RSTXPDF4 and execute it will ask for the spool number give the spool number noted earlier and if PDF format is coming means you have some error while configureing the SP01.
    Hope my answer helps you.
    Cheers!!

  • When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I ca

    When I try to convert my .pdf to Word, I get a sidebar that has fields for: the name of my pdf file, the type of file I want to convert to (In my case, Word), and a button that says "Convert".  My problem is that the "convert to" field isn't active.  I can see the words "Microsoft Word" in pale gray, but when I click on the field, nothing happens.

    You have posted in the wrong forum.  Try posting in the forum for the product you are trying to use.
    Here is a link to a page that has links to all Adobe forums... use the drop down list to see all.
    Forum links page:
    https://forums.adobe.com/welcome

  • Problems when converting from pdf to word

    I am a translator and I get most of my work in pdf files. So I convert the pdfs into words to be able to change the text and edit. However, when dcuments are converted from pdf to word I have found they become very unstable and difficult to work with to the point I usually end up not using the coverted file. Is there any place I can go for training about what to do with those documents? Can anyone relate to this problem?
    thanks

    Hi patryba,
    You can access ExportPDF here: Adobe Acrobat.com.
    Please let us know how it goes!
    Best,
    Sara

Maybe you are looking for

  • Bank_account_id in ap_checks_all table in R12

    All, I have a requirement to fetch details from 'ap_bank_accounts_all' and 'ap_checks_all' tables. Till 11i, the field 'bank_account_id' acts as a relation key between these two tables. In R12, the Etrm says the same field is 'No longer used' in 'ap_

  • 6.0.4 Turning off Facebook chat crashes Safari

    I noticed that when I go to Facebook, it has my chat on, which I don't want. So I turn it off. When I do, Safari becomes completely unresponsive, permanently. Anyone else experiencing this? Any tips on how to solve this problem? Thanks!

  • Transaction data upload for a roll out

    Hi all, We are in the process of finalising the transaction data upload list for the FICO module. Can somebody give me a list of tranasction data that needs to be uploaded in the system in aroll out apart from the GL,Customer, Vendor balances in Fina

  • Macbook: Turn off screen while streaming audio

    I want to use my macbook for an input in my audio system. I am going to stream audio, but because I intend to use it in a darkened room, I wish to be able to make the screen shut off. Is there a command to do that or another way to do it? Thanks.

  • Portal Translation Worklist and XML

    We have been using XML files to upload our Portal Content (iViews, Pages, Worksets, Roles, etc...) and have been very successful with this process.  We have run into an issue trying to use an XML file to create a Portal Translation Worklist, because