Convert PDF to XSTRING and dysplay in portal(html)

Hi experts :
  I need your help once again. I've read all the post regarding this issue but can't find a solution for my problem.
  Basically, I have to create a PDF from a spool, convert it to xstring and send it to the web via RFC.
  What I do is :
      Convert the spool to PDF using FM CONVERT_OTFSPOOLJOB_2_PDF.
      Convert the PDF tline table into XSTRING using a field symbol and a table of tlines (as described in one of the SDN blogs).
     Then, I send to the web the value reurned from the conversion of the PDF line to XSTRING.
   But, when opening the xstring there is nor PDF file but and error. If I download the PDF tline table, it works and can create the PDF, but nothing from the XSTRING.
   My questions are :
      Do we have to do any conversion on the portal side to convert the XSTRING into PDF?
      is there any possibility of downloading the xstring to my desktop in order to check if I could create the PDF file from it?.
Helpful answer will be rewarded.
Regards,
Carlos.

For the last question, use this code:
FORM write_bin_file
      USING
        i_filename      TYPE string
        i_file_xstring  TYPE xstring.
  TYPES xx(50) TYPE x.
  DATA lt_xstring TYPE TABLE OF xx.
  DATA l_length TYPE i.
  CALL METHOD cl_swf_utl_convert_xstring=>xstring_to_table
    EXPORTING
      i_stream = i_file_xstring
    IMPORTING
      e_table  = lt_xstring
    EXCEPTIONS
      OTHERS   = 3.
  l_length = XSTRLEN( i_file_xstring ).
  CALL METHOD cl_gui_frontend_services=>gui_download
    EXPORTING
      bin_filesize = l_length
      filename     = i_filename
      filetype     = 'BIN'
    CHANGING
      data_tab     = lt_xstring
    EXCEPTIONS
      OTHERS       = 3.
ENDFORM.                    "write_bin_file

Similar Messages

  • FM for converting PDF to XSTRING - display R/3 report in Portal as PDF

    Hello SDNers,
    Requirement:
    I am trying to display an R/3 report in Portal as PDF. I am trying to do it with the following logic:
    1. Call a RFC enabled FM from my Webdynpro Java appln.
    2. The FM then submits the Print request for the R/3 report and then gets the spool.
    3. Convert the ABAP spool to PDF (using FM CONVERT_ABAPSPOOLJOB_2_PDF).
    4. Convert the PDF to XSTRING and send it back to the calling Webdynpro appln.
    5. Using the XSTRING regenerate the PDF using some Webdynpro Java APIs.
    The Problem / Question:
    The output of the FM CONVERT_ABAPSPOOLJOB_2_PDF is a table of type "TLINE" which includes TDFORMAT and TDLINE.
    To get the XSTRING I am using the FM "'SCMS_STRING_TO_XSTRING". This FM only uses the "TDLINE" and completely ignores the "TDFORMAT". When I import this XSTRING value into my Webdynpro for Java appln., and assign to the corresponding UI element, my PDF does not show up.
    My FM code is like this:
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid                    = gd_spono
            no_dialog                      = 'X'
    TABLES
       pdf                            = t_pdf
    IF sy-subrc  0.
    ENDIF.
    IF sy-subrc EQ 0.
          LOOP AT t_pdf INTO w_pdf.
            CONCATENATE
              output
              w_pdf-tdformat
              w_pdf-tdline
            INTO output.
          ENDLOOP.
          CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
            EXPORTING
              text   = output
            IMPORTING
              buffer = outputx.
    I doubt if "'SCMS_STRING_TO_XSTRING'" is the right FM to use in my scenario.
    If we had a smartform, we could have used the FM "CONVERT_OTF" , but in our case we do not have a smart form and I am not able to figure out which FM should be used.
    Please suggest if I am doing any thing wrong.
    Thanks for Reading.
    Regards,
    Raj Kumar

    Hi
    check this thread
    spool to pdf conversion
    It looks like you are missing translate in you processing of the table t_pdf. Something like the following line is missing:
    TRANSLATE gd_buffer USING '~ '.
    Loo at the standard program RSTXPDFT4 as well. It converts spool to PDF and then you can download it to your desktop.

  • I have subscribed to convert PDF to Excel and Word, I have followed your instructions and I get an error message all the time.

    I have subscribed to convert PDF file to an Excel or Word . I have followed your instructions to do so but I always get an error message. I have chated with one representative who suggested that I wait 24h before I try it again implying that my subscription is in process. the time span has elapsed and when i try it, I still get the error message. HELP ME or REFUND me the money

    "an error message" really doesn't tell us much.
    [topic moved to ExportPDF forum]

  • I need help in converting PDF to PS and back to PDF

    I am using the ghostScript distiller for PS to PDF file conversions. I need to know if I can make it convert from PDF to PS and back to PDF while optimizing the PDF in the process using the pdfopt.bat. I believe that changes need to be made to idcrefinery.cfg to allow for this conversion (Using an inbound refinery "IBR" to convert certain file types to PDF when checked in through a content server). My need is to be able to optimize PDF files upon checkin to the content server. Any tips, guidance, or ANY help would be greatly appriciated.
    Thank you,
    Roger

    Sounds like a question for GhostScript users, not Acrobat users.

  • Trying to convert pdf to word and keep getting error message saying trouble signing in, but I am already signed in...?????HELP

    I just purchased the adobe so I could convert pdf to word but I keep getting an error message saying trouble signing in, but I am already signed in...what's up?

    Hi sdh138,
    It can take a few hours for your order to process fully, and I do see that your subscription is still "pending" in our order management system. If you're still unable to access the service in a few hours, please let us know.
    Best,
    Sara

  • I wanted the programme which converts pdf to word and received something that allows you to convert it manually. How do I fix it.

    I wanted the programme which converts pdf documents to word and I received something which allows you to convert it manually. How do I fix this.

    Hi,
    In Adobe Export PDF you can do it manually.
    But in Acrobat you can do it automatically by using 'Action Wizard' option.
    Please let us know if you require further assistance.
    Regards,
    Florence

  • Converting PDF to XSTRING for Adobe in WD ABAP Application

    I have a requirement to develop a WD abap application in the portal, where 300 PDF's would exist on our LAN all with the pernr number embedded in the name.  When a user logs onto the portal, it would retrieve the correct PDF for their pernr and display in an adobe form. In the application, I know how I can use the username, to derive the pernr to get the PDF name.
    Right now I can use the upload functionality to upload(with an upload UI element) a particular file and put in a PDF with adobe, However, If I want to point to a particular file  (based on the pernr name) on a secure folder on our LAN, can I do that?
    If I plug in a file name instead of using the upload UI element, I need to figure out how to convert the PDF to an XSTRING so that I can pass that xstring to the adobe form interface.
    Also, is there even a way to assign a file name on a LAN to an upload element in a WD ABAP application or is it necessary to use the dropdown to retrieve the file name from the users desktop in order for it to convert ot a PDF correctly?
    Thanks,
    Pam Laverty

    hi pam,
    I think it's not possible to select the file automatically. use action must be there.
    So use upload ui element, once you click on upload button and select the file, that file data will be in DATASOURCE ATTRIBUTE ( the attribute which is binded to data property of upload ui element ) OF UPLOAD UI element in XSTRING format.
    From there you can pass it to pdf.
    Regards
    srinivas

  • Converting PDFs to forms and FAPs by batch !

    Hi everyone,
    We can convert a PDF into FAPs with the Conversion Wizard available in documaker Studio.
    Just curious to know whether this whole process can be done in a batch (or automation).
    Whenever i upload a PDF, it needs to get converted into FAPs without manual intervention. Do we have any such utility ?
    Your help is greatly appreciated. thanks in advance !
    (Ofcourse, there are functions like AddmultiPageTIFF where we can attach the external file along with the output. However, we need these external file (PDF or TIFF) in FAPs - to save memory space of the outputs)
    regards,
    Navin

    The utility converts a PDF into an image file is that what you require? There is no batch utility for this purpose.
    To convert a PDF into a text based FAP, I'd recommend a tool called SolidPDF or you can use teh included Adobe conversion. SolidPDF does a very good job of retaining the fidelity of the document - especially if it was converted from word or some other text based tool.
    If you are trying to use the PDF in stream (one time dynamic use), I would recommend the ADDMULTIPAGEBITMAP rule instead. An example of this woudl be to include a copy of a signed application in a policy package. You have to stage the PDF where Documaker can pick it up.
    If you are trying to save space in the output, you are better off going with the SOldiPDF conversion process. The comversion of PDF or inclusion of PDF as a bitmap uses the same process which converst teh PDF Into a bitmap, so either of these options will not necessarily save you and space in the print spool.

  • I paid for a year service of the converter PDF to Word and I cannot access it.  Thanks.  Paul Young

    I purchased an acrobat adoce pdf converter to word.  I can't find it in the maze of websites and promotions.  My e-mail is [private information removed] Please help me get reconnected.  Thanks Paul Young

    Hi Paul,
    No problem! Here's the link that you need: Adobe Acrobat.com.
    Please let us know if you need further assistance.
    Best,
    Sara
    p.s. I removed your email address from your post, as this is public forum and it's best not to include your contact information.

  • How to import pdf with hyperlink and and maintain its hyperlink while exporting it as HTML?

    We can import pdf in indesign either using plaacemultiplefile script or using place submenu  under file menu but both of them import pdf as graphic object and lost its all hyperlink. no doubt when i again export its as pdf than hyperlink are there as it is but when i export it as HTML,IDML or other format than than all hyperlink are lost so is there any way to maintain this if no than is there any way to write some new script utilities which will do the same .one solution i think is first convert pdf into docx and than import it as docx indesign import  it as text frame and maintain all hyperlink but in this process pdf file lost its some formating while converting it into docx .

    I probably should've remembered "rtfm" before writing all that.  It seems to me now that I need to create a Master Page for each of the different layouts, then dynamically select the one I want to use at run-time, maybe with a script event ?  The Master Page creation is a bit messy ... the only way I seem to be able to get multiple Master Pages is to open each Word doc, let Livecycle import it, then copy all the content into a new Master Page in my main document.  That is, there doesn't seem to be a way to import a series of Word docs directly into separate Master pages of a single Livecycle form.  I'll continue with the "read" part of "rtfm" ...

  • How convert pdf,xls file format into swf

    Hi friends
                   i am making a tool for wducation site and there i need to convert doc xls and pdf file in swf in runtime and show that in container with cropping and panning functionality.so i do it for doc file format but having no idea how to convert .pdf file format and .xls file format into swf.So please guide me how to do it.
    Thanks And Regards
        Vineet Osho

    QuickTime cannot do this of iteslf: you need to add Flip4Mac:
    http://www.telestream.net/flip4mac-wmv/overview.htm

  • Converting PDF to RAW for display in the portal

    Hi all,
    We have an application that took a pdf and converted it into a raw datastring to pass to the portal for display purposes.
    We have migrated this function to a unicode system and are now struggling to get this to work.
    Code in non-unicode system
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize   = e_filesize
        TABLES
          otf            = lt_otf
          doctab_archive = lt_doctab_archive
          lines          = lt_pdf.
      LOOP AT lt_pdf INTO wa_pdf.
        CLEAR et_pdf.
        MOVE wa_pdf TO et_raw.
        APPEND et_raw.
      ENDLOOP.
    Now in the unicode system.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize   = e_filesize
        TABLES
          otf            = lt_otf
          doctab_archive = lt_doctab_archive
          lines          = lt_pdf.
        FIELD-SYMBOLS: <x_wrk_line> TYPE rmps_raw134,
                       <x_struc> TYPE xstring.
        DATA: buffer1 TYPE xstring,
              conv TYPE REF TO cl_abap_conv_out_ce.
    Convert PDF to RAW Type
      LOOP AT lt_pdf INTO ls_pdf.
        CLEAR et_raw.
        MOVE ls_pdf TO lv_pdf_line.
        ASSIGN buffer1 TO <x_struc> CASTING.
        ASSIGN et_raw-rawline TO <x_wrk_line> CASTING.
        conv = cl_abap_conv_out_ce=>create(
               encoding = 'UTF-8'
        conv->convert( EXPORTING data = lv_pdf_line
                       IMPORTING buffer = buffer1 ).
        <x_wrk_line> = <x_struc>.
        APPEND et_raw.
      ENDLOOP.
    If we simply download the pdf after we have tun the  'CONVERT_OTF_2_PDF' Fm the pdf created is fine.  However when we view the output in the portal of the pdf (as streamed in the raw format) we just get chinese looking (they may well not be any language) characters in the pdf. 
    With a non-unicode R/3 system the pdf was displayed without any issues in the portal.
    Any help appreciated.
    Thanks,
    Paul

    Hi, could you kindly share the complete set of this conversion? i also need similar requirement.
    thx so much.
    regards,
    Rudy.

  • Converting a PDF to XString - 4.6C

    Hi,
    I have an issue working in a 4.6C system where I need to convert a SmartForm to PDF in XString format for display via the portal.
    From 4.7 onwards this is very simple as the CONVERT_OTF function module outputs a field bin_file with exactly what I need.
    However in 4.6C this export parameter doesn't exist.
    Looking into how the 4.7 system builds this field it seems to use the CONCATENATE ... IN BYTE MODE command. The BYTE MODE option is also not available in 4.6C.
    I can't imagine it is not possible to do this in 4.6C, I just don't know where to start.
    Any help would be greatly appreciated.
    Thanks
    Ian

    Hey Joseph,
    Please tell me whether you are able to convert any other PDF file to excel format or not?
    What exact error message do you get?
    Are you trying to convert a scanned PDF document?
    Hope to hear from you.
    Regards,
    Anubha

  • How do I convert a pdf in word and if I did where did it go or get sent to...

    Look I am not looking to discuss anything all I want is to convert the PDF into word.... I thought I did and it even looked like I did ... but I can't find it... just want steps to convert pdf to word document

    Hi Anna,
    If you are using Adobe online service, then you need to:
    Sign up at "https://cloud.acrobat.com/exportpdf" using your Adobe ID credentials.
    Select PDF files to export to Word.
    A pop up will come showing the download option.
    Click on that and download the converted file onto your system.
    You can also click on 'Files' tab to locate the converted files.
    On the other hand, if you are using Adobe Reader, all you need is to sign up and convert the file to word and later download it on your computer.
    Please try and let me know if you still face any problem.
    Regards,
    Anubha

  • 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

Maybe you are looking for

  • Adding a user in Active Directory

    Hi fellows, I am having a serious problem in creating a new user in active directory. i am using LDAP JNDI code. I can delete and update users attributes, but fail to create users. ctx.createSubcontext("newuser,full domain", attributes); when i speci

  • Problem with 2 way SSL for JMS

    Finally, there is some progress on my JMS over SSL (2 way with JNDI). I am able to send/receive JMS messages but there is an exception in Weblogic server log (see attached). Let me summarise all the steps involved: (I have referred this doc http://ja

  • GDS: Material not inserted into repository

    Hi all, When trying to load a material from our ERP system into the GDS repository (via XI and the JavaProxy call), we notice an increased load on the MDM server, but the material does not show up in the repository. Neither in the MDM logs, nor in th

  • Help with dynamic text and and css !

    My second question of the day. I'm trying to build a feature in my app in which the user can hide/reveal bolding and or italics and or underlining. The text is being loaded in from an xml file and I was thinking about styling it with css in order to

  • No RAW files from iPhoto 9

    I have a Canon 5D Mark ll and iLife 09.. At first iPhoto would not accept RAW files; then a friend fixed the situation and it did. Now, once again, iPhoto says the RAW files are unrecognized in that format. The JPEGS download just fine. Any insight a