How to Convert a Word Document within BDN to PDF file

Hi All,
Currently, we have word documents stored within the business document navigator (Transaction OAOR) for our Materials.  We want to be able to share these documents with our customers through a Web Interface such as Web Dynpro; however, we need to convert them to a PDF file first.  Currently, we are obtaining the document contents in order to convert the word document to Binary.  A Sample of this code is listed below.  From this point, we are hoping to convert to PDF; however we are uncertain of how to do this.  Is there a standard function module or class that will perform this conversion of a Word document.  Any help will be greatly appreciated.  Thanks.
*Get Information For BDS Form
  gs_doc_signature-prop_name = 'DESCRIPTION'.
  gs_doc_signature-prop_value = 'Description of Document'.
*Create BDS Instance
DATA gr_bds_instance TYPE REF TO cl_bds_document_set.
  IF gr_bds_instance IS INITIAL.
    CREATE OBJECT gr_bds_instance.
  ENDIF.
*get the Document Contents
  CALL METHOD gr_bds_instance->get_info
    EXPORTING
      classname           = gc_docclass  "BOR Object BUS1001
      classtype           = gc_classtype  "BO for Business Object
      object_key          = gv_objkey      "Material Number i.e. 000000000010034717
    IMPORTING
      extended_components = gt_extended
    CHANGING
      components          = gt_doc_components
      signature           = gt_doc_signature
    EXCEPTIONS
      nothing_found       = 1
      error_kpro          = 2
      internal_error      = 3
      parameter_error     = 4
      not_authorized      = 5
      not_allowed         = 6.
*Build the Object ID in order to Convert the Word Document to Binary
  READ TABLE gt_extended INTO gs_extended INDEX 1.
  gv_object_id-class = gs_extended-class.
  gv_object_id-objid = gs_extended-objid.
*Convert the Word Document to Binary Format
  CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT'
    EXPORTING
      object_id                 = gv_object_id  "
  CLIENT                    = SY-MANDT
      raw_mode                  = 'X'
    TABLES
  FILE_ACCESS_INFO          =
      file_content_binary       = gt_binary
*Convert to PDF!?!?!?!?
John

Hi
Refer this thread [Convert MS Word .doc to PDF;
Regards
Raj

Similar Messages

  • How to convert a word document to a fillable pdf form

    hello -
    how to I convert a word document into a fillable pdf form?

    Hi carolynm68845256
    Please browse this link for detailed instructions regarding your issue: Acrobat Help | Creating and distributing PDF forms
    Let me know if you face any challenges or if you have any other query.
    Regards,
    Rahul

  • How to convert a Word Document to SAP SCript standard text.

    Hi team,
    Does any one know how to convert a word document or text in Word format to standard text.
    So that we can use that standard text in Script output.
    This might be very useful if we need to convert a lot of text into standard text.

    Hi,
    Create the name of the standard text you want in SO10.
    When the editor is called up, select Text -> Upload and then browse for your file(s). Must be saved in RTF format in Word remember.
    Cheers
    Colin.

  • How to convert a word document into the PDF format?

    Please instruct me step by step on how to convert several Word documents into the PDF format?

    If properly installed and updated (depending on the WORD version), you can simply do any of the following:
    1. Open the doc in WORD and select Print, choose the Adobe PDF printer, print.
    2. Open the doc in WORD and go to the Acrobat menu in WORD and select create PDF (this uses PDF Maker).
    3. Open the doc in Acrobat and the conversion should be done based on PDF Maker.

  • How do convert a Word document to a PDF on an iMac running 10.6.8?

    How do I convert a Word Document to a pdf file on my iMac running OS X 10.6.8?

    File- Print-Print PDF- Save as PDF

  • How to convert a word document to pdf

    How do I convert a word document to pdf

    Hi dionel33514362,
    You can use either Adobe PDF Pack or Acrobat to convert Word documents to PDF.
    Adobe PDF Pack is an online service, which allows you to upload files and convert them to PDF via a web interface.
    See Acrobat Help | Create PDFs with Acrobat for information about creating PDF files in Acrobat. If you don't have Acrobat, please feel free to give it a try. You can download the free 30-day trial from the Acrobat link I mentioned above.
    Please let us know if you have additional questions.
    Best,
    Sara

  • How to convert a word document to PDF from a criteria workflow

    Hi,
    How to create a new revision in PDF format from a word document inside a criteria workflow? The inbound refinery converts documents to PDF automatically upon check-in, but I want to make the conversion in a specific step of a workflow.
    Thanks,
    Miguel

    You could write a custom service and execute it within the workflow script using the executeService Idoc function.

  • How to convert a Word document to text or html in an ABAP program

    Hi,
    At my client's site, for the recruitment system, they have the word processing system set to RTF, instead of SAP Script. This means that all the correspondence is in Word format. A standard SAP program takes the word letter, loads word, does the mail merge with the applicant's info and then sends the document to a printer.
    The program name is RPAPRT05. The program creates a document proxy (interface I_OI_DOCUMENT_PROXY) and manipulates the document using the methods of the interface.
    Now what we want to do is to instead of sending the document to a printer, we want to email the document contents to the applicant. But I don't know how to get the content from the Word document into text or html format so that I can make an email from it.
    I know I can send an email with the word document as an attachment, but we'd prefer not to do that.
    I would appreciate any help very much.
    Thanks

    Ok, here's what I ended up doing:
    First of, in order to call FM 'CONVERT_RTF_TO_ITF' you need the RTF document in a table with line length 156. The document is returned from FM 'DP_CREATE_URL' in a table with line length 132. So first I convert the table:
        Transform data table from 132 character lines to
        256 character lines
          LOOP AT data_table INTO dataline.
            IF newrow = 'X'.
            Add row to new table
              APPEND INITIAL LINE TO xdatatab ASSIGNING .
              newrow = space.
            ENDIF.
          Convert the raw line of old table to characters
            ASSIGN dataline TO .
          Check line lengths to determine how to add the
          next line of old table
            newlinelen = STRLEN( newline ).
            ADD addspaces TO newlinelen.
            linepos = linemax - newlinelen.
            IF linepos > datalen.
            Enough space available in new table line for all of old table line
              newline+newlinelen = oldline.
              oldlinelen = STRLEN( oldline ).
              addspaces = datalen - oldlinelen.
              CONTINUE.
            ELSE.
            Fill up new table line
              newline+newlinelen(linepos) = oldline(linepos).
              ASSIGN newline TO .
              newrow = 'X'.
            Save the remainder of old table to the new table line
              IF linepos < datalen.
                oldlinelen = STRLEN( oldline ).
                addspaces = datalen - oldlinelen.
                CLEAR newline.
                newline = oldline+linepos.
              ELSE.
                CLEAR newline.
              ENDIF.
            ENDIF.
          ENDLOOP.
        Write the last line to the table
          IF newrow = 'X'.
            APPEND INITIAL LINE TO xdatatab ASSIGNING .
    Next I call FM 'CONVERT_RTF_TO_ITF' to get the document in SAPScript format:
        Convert the RTF format to SAPScript
          CALL FUNCTION 'CONVERT_RTF_TO_ITF'
            EXPORTING
              header            = dochead
              x_datatab         = xdatatab
              x_size            = xsize
            IMPORTING
              with_tab_e        = withtab
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              missing_size      = 2
              OTHERS            = 4.
    This returns the document still containing the mail merge fields which needs to be filled in:
          LOOP AT itf_table INTO itf_line.
            WHILE itf_line CS '«'.
              startpos = sy-fdpos + 1.
              IF itf_line CS '»'.
                tokenlength = sy-fdpos - startpos.
              ENDIF.
              token = itf_line+startpos(tokenlength).
              REPLACE '_' IN token WITH '-'.
              ASSIGN (token) TO .
              ENDIF.
              MODIFY itf_table FROM itf_line.
            ENDWHILE.
          ENDLOOP.
    And finally I use FM 'CONVERT_ITF_TO_ASCII' to convert the SAPScript to text. I set the line lengths to 60, since that's a good length to format emails to.
        Convert document to 60 char wide ascii document for emailing
          CALL FUNCTION 'CONVERT_ITF_TO_ASCII'
            EXPORTING
              formatwidth       = 60
            IMPORTING
              c_datatab         = asciidoctab
              x_size            = documentsize
            TABLES
              itf_lines         = itf_table
            EXCEPTIONS
              invalid_tabletype = 1
              OTHERS            = 2.
    And then the text document gets passed to FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' as the email body.

  • How can I prevent Word 2013  from opening a PDF file to edit it?

    As per the title - I create training manuals in MS Word and save as PDF for distribution to clients.
    How cna I prevent them from opening and editing them with Word 2013?

    You can restrict editing and printing of a PDF document by setting permissions when you create the initial PDF. This can be done as:
    Open Word document to convert.
    Go to Acrobat tab on Word ribbon -> Select Preferences button.
    On Security tab of the Preferences dialog, tick mark the check box for "Restrict editing and printing of the document. A password will be required in order to change these permission settings."
    Specify a password in "Change Permissions Password" tex box.
    Click OK.
    Input the password again in the confirmation dialog.
    Go to "Create PDF" button.
    The PDF thus created, will have editing restricted. And Word 2013 will not be able to open it.
    Thanks.

  • Convert a Word text box into a PDF file

    Am trying to convert a Word (2007) document that contains several text boxes in it, but they are not being converted into the PDF file.  Some are though, some aren't.
    Any suggestions?

    When you use Adobe Acrobat for the conversion try the forum for Adobe Acrobat.

  • How do I convert a word document into a pdf and then upload it to a web site

    How do I convert a word document into a pdf and then upload it to a web site so people can read it from my
    site with Dreamweaver 4?. How can I do this? Can anyone please help? I'm only a newbie. Thanking you in anticipation.

    First you need to install a means of printing to pdf from word.  I like cutepdf writer ( http://cutepdf.com/Products/CutePDF/writer.asp ).  Once installed you will print the doc in word and under the printer selection you choose pdf.
    Once you have the file you put it in your local site folders and upload it using Dreamweaver.  Be sure to link to it from a page so users can get to it and I would recommend giving the link a target of _black so it will open in a new window (see the properties inspector in DW).

  • Acrobat won't convert Word documents within the Acrobat program

    I am running OS 10.5.2 on my MacBook Pro. I also have Microsoft Office 2004. I just installed Acrobat 8.0 Pro, patched it all up from the downloads on the website and was ready to convert some Word documents that I have to give to my boss. Went through Acrobat and it gives me the following error message:
    "Acrobat could not open 'Dissertation-1.1.doc' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
    To create an Adobe PDF document, go to the source application. Then print the document to Adobe PDF or use the Acrobat toolbar found in Microsoft Office applications."
    The file was not an attachment and I don't think it is damaged (or at least I hope not). I can make the PDF document in Word or any of the other Office apps with the tool bar or the PDF printer with Distiller but eventually I'm going to have to combine everything and just thought it would be easier to work through Adobe.
    Has anyone else had this problem or has come about at a solution for converting within Adobe? I might just be missing something obvious but I would appreciate any help that anyone can give. Thanks!

    It was telling you actually what you needed to do.
    Go into word2004 open the document and to Page setup and choose Adobe Printer. Then go to Print menu and choose print File. Then name the file and select desired location.
    What actually happens is acrobat will create a hidden .ps File and check it. (up to 3 times if needed) before writing the hidden.ps file. The Distiller is open in Background hidden and converts the .ps file to a PDF file the file is checked and retried up to three times if something isn't right. Then The Pdf file is written to disk finally the hidden .ps file is deleted and the pdf file appears.
    If your still using 2004 a little icon may show up in word called pdfmaker. This is a little VBA script that does the equivent of above. however its ver slow and if you have a long document your hair may turn gray before it finishes.
    In Office2008 for Mac VBA is dead and laid out in its coffin with its arrival. so PDFMaker is a useless piece of code. Thankfully going into menu view options unchecking PDFMaker actually does banish it from the screen and does don't try to get reinserted if you banish it.
    By the way because of the new XML Based Code in Office2008 they have a word to PDF Translator built in just go to Save As... and scroll down until you see PDF.

  • How do I access Adobe from Word to convert a word document to pdf?

    How to I access an Adobe command in Word to convert a Word document to pdf?

    Certain versions of Word will have an Adobe PDF menu in the ribbon, which allows you to convert the Word file you're viewing to a PDF directly, maintaining all the links, bookmarks, destinations, etc. in it.
    The other option is to use the PDF Printer and print the Word document to a PDF. This will result in a "flat" copy of the file, without any of the meta-elements described above. Basically the same as printing it out, only you use a virtual printer that generates a PDF file.

  • How do I convert a word document to a pdf document that is protected

    How do I convert a word document to a pdf document that is protected

    Use Acrobat, or possibly CreatePDF.

  • How can I convert a Word Document to a PDF Document. The word document is already on my Pc

    How can I convert a Word Document already on my PC, to a PDF Document

    Using
    Adobe PDF Pack
    Adobe Acrobat
    Microsoft Word 2007+

Maybe you are looking for

  • My MacBook Pro can't get pass booting

    Hi guys, please in need your urgent assistance. My 2010 MacBook Pro (OS X Mavericks) has refused to get pass booting. I can only log in the guest user account which only access safari without any problem but not the main administrative account. On en

  • How to whitelist mail sender?

    My sister's e-mails have been ending up in my junk mail folder quite often of late.  We often share short messages with links, and she's one of the few people whose links are virtually always of interest to me.  Even messages in reply to messages I o

  • .Mac support not interested - what next?

    Hi, I posted a series of posts two weeks ago when experiencing problems with publishing iWeb having taken out a full year's membership of .Mac. Despite a few emails consequently from the .Mac support customer care team, no solution was found. After s

  • App Store graphic render error

    After completing a clean install of Yosemite from Mavericks, I reviewed the applications and opened the chess game. Just after closing the chess game, App Store's window collapsed. (See attached image) Anyone know what can be? Device model: MacBook P

  • Syncing Books via iTunes

    Hey, Lately (actually since I installed iTunes 11.4) whenever I sync my iPhone the books I have are being synced over and over again - every time without even making any changes to anything. Even though it's not a huge number of books, it's getting r