Smartform ,  PDF error

Hi, experts
I  want to send the Smartform to mail as PDF attachment.
I found  the program in code gallery., it name was 'ZTEST_NREDDY_PDF_MAIL'  .
I wrote my program .it was send the Smartform to mail as PDF attachment
but when open the pdf file it gave me error.
error : 'An unrecognized token '654.15Td' was found.
Please help me out.
Thanks&Regards,
Ayşenur

Hi,
Please refer this program which is as per your requirement.
conversion of smartform to pdf souce code its urgent pls
Best regards,
Prashant

Similar Messages

  • Smartform, PDF Error, Unrecognized Token

    Hi all,
    I have used smarform to send the output of Order Confirmation in PDF format to customer's external mail id. The program is working fine and sending mail to customer's mail id. But the problem is when I am trying to open the PDF file, I am getting the error. The error says ''An unrecognized token 'xxx.xx' was found", where xxx.xx is some number.
    I have searched the forum, got some link to resolve that but didnt get the success. To send the mail, I have used the program which is generally used to send the mail. Like me some more users are looking for the solution for this error.
    Using SAP4.7.
    Helpful Ans will be rewarded
    Thanks in Adv.
    Jigar

    Look this: problem opening pdf file
    SX_OBJECT_CONVERT_OTF_PDF     Please use this function module to solve the problem......
    Use this in following way....
    Please note the following:
    1. Get the FM name of the SSF:
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'SSF'"Name of the SSF
    IMPORTING
    fm_name = fmname "Variable
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    2. Get the Output of the Form....
    DATA :l_t_job_output TYPE ssfcrescl OCCURS 0 WITH HEADER LINE.
    DATA :l_t_out LIKE ssfcompop OCCURS 0 WITH HEADER LINE.
    DATA :l_t_control LIKE ssfctrlop OCCURS 0 WITH HEADER LINE.
    l_t_out-tddest = 'LOCL'.
    APPEND l_t_out.
    l_t_control-no_dialog = 'X'.
    l_t_control-getotf = 'X'.
    l_t_control-no_close = space.
    APPEND l_t_control.
    CALL FUNCTION fmname
    EXPORTING
    control_parameters = l_t_control
    output_options = l_t_out
    IMPORTING
    job_output_info = l_t_job_output
    TABLES
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    3. Convert the OTF to PDF format...
    DATA :l_t_pdfdata_tab LIKE tline OCCURS 200.
    CALL FUNCTION 'CONVERT_OTF_2_PDF'
    EXPORTING
    use_otf_mc_cmd = 'X'
    IMPORTING
    bin_filesize = l_filesize_deck "Variable
    TABLES
    otf = l_t_job_output-otfdata
    doctab_archive = l_t_docs " Variable
    lines = l_t_pdfdata_tab
    EXCEPTIONS
    err_conv_not_possible = 1
    err_otf_mc_noendmarker = 2
    OTHERS = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    4. Download the PDF data...
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    bin_filesize = l_filesize "Variable
    filename = 'C:\temp.pdf'
    filetype = 'BIN"
    mode = ' '
    IMPORTING
    filelength = l_filesize "Variable
    TABLES
    data_tab = l_t_pdfdata_tab
    EXCEPTIONS
    file_open_error = 1
    file_write_error = 2
    invalid_filesize = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    gui_refuse_filetransfer = 8
    customer_error = 9
    OTHERS = 10.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    5. View the Doc...
    CALL FUNCTION 'WS_EXECUTE'
    EXPORTING
    document = 'X'
    cd = 'C:\'
    program = 'C:\temp.pdf'
    EXCEPTIONS
    frontend_error = 1
    no_batch = 2
    prog_not_found = 3
    illegal_option = 4
    gui_refuse_execute = 5
    OTHERS = 6.
    Note: The Exceptions in any FM are to be uncommented to catch the errer. Else SAP may trigger a dump.
    call function 'SX_OBJECT_CONVERT_OTF_PDF'
    exporting
    format_src = 'OTF'
    format_dst = 'PDF'
    devtype = 'PRINTER'
    FUNCPARA =
    len_in = '1234'
    IMPORTING
    LEN_OUT =
    tables
    content_in = objbin
    content_out = objpdf
    EXCEPTIONS
    ERR_CONV_FAILED = 1
    OTHERS = 2.

  • Error send a smartform PDF by Email to Vendor

    Hi Expert,
    Please help me.........................
    I want to send a PO (Smartform) as Email to Vendor.
    In SAPScript the PO send by Email is working fine, but in Smartforms it is not working.
    Normally, I will use via Smartforms the Program = YBAA_FM06P, FORM routine = ENTRY_NEU, PDF/Smartform Form = ZYBAA_MMPO1.
    A communication strategy has communication type as INT has been defined.
    This communication strategy has been set as default in the output type ZNEU. The transmission medium has been set to 5 (External Send) and the partner function as VN (Vendor).
    The e-mail address of the vendor has also been maintained.
    In transaction MN04, i have also made an entry for output type ZNEU and set the document type as NB.
    But message output do not create.
    How to send a smartform PDF by Email to vendor?
    Thanks,

    Hi,
    I can convert the PO output in to PDF from SOST I can sent it to external vendor using the Mail triggering configuration settings but meassage output do not create.
    Please tell me how can I do.
    Thank,

  • PDF Error in Performance Management

    Hi
    When launching the Performance Management link from Manager Self Service (Role) --> Talent Management --> Performance Management I am getting the PDF error. Seems the page is trying to open the form in PDF, instead I want it to be displayed in html itself.
    For Travel Expense form I have changed the URL parameter "sap.xss.tra.UsePdf=true" for the resource EMPLOYEE_TRAVEL_TRIPFORM_SRV05.
    What is the PCD Object and the resource key for the corresponding Performance Management iView.
    Thanks,
    Murthy

    Did you get this error in the initial landing page?
    Please detail out the error. And for the pcd location, it depends on the role you created unless you are using standard objects.
    This iview should have a webdynpro application.

  • File does not begin with '%pdf' error with adobe reader 10.1.5 onwards

      In our web application we are using activePDF toolkit (3rd party component) to fill up carrier forms on the fly which are PDF files.
    The output file processed by the above library works fine when opened with adobe reader 8, 9 and10 on end user’s browser (IE); however, it gives below error when opening with adobe reader 11.
    Till now, we have tried different settings at IIS level, Internet explorer e.t.c. suggested on different internet posts. However, we are still facing the problem.
    While analyzing this we have come across following link
    http://helpx.adobe.com/acrobat/kb/pdf-error-1015-11001-update.html
    According to this adobe 10.1.5 onward file should only start with "%pdf". If file start with other than this we get file corrupted message.
    Before we can communicate this message to client we want to confirm this for experts. Please let me know my assumption is right?

    Rahti - i'm having the same issue but I not familiar with the steps outlined in the Adobe link below
    http://helpx.adobe.com/acrobat/kb/pdf-error-1015-11001-update.html
    Would you be able to help with how I can navigate to this on my PC to correct it for me.
    Thanks.

  • Failed to open pdf error on every document

    Today I came and started placing pdf documents in Indesign CS3 like I always do, and suddenly I start getting "failed to open pdf" errors on every pdf file I try and place. I have tried all the suggested tactics of selecting show import options, changing the crop to bounding box, etc. Nothing working.
    I also tried to open the pdf in acrobat and export into a different format or optimize it using the pdf optimizer, but when I do that I get gobbly **** text on the pdf. See screenshots
    The only workaround that works is to save as a raster image. But this is incredibly time consuming. I also tried importing these same files into Indesign cs 4 and I get the same errors. I am wondering if this is a system wide issue. Any ideas or suggestions?
    I noticed all these pdf were created using cs4 and above. Not sure if this helps.

    Hold the Shift key as you click Place or turn on Show Import Options in the Place dialogue.
    I get this from time to time. Here’s what I think happens: You placed a PDF with Import Options showing so you could select a different crop method, like bleed. This becomes the new default import option for PDF files. But if you import a file with no bleed data InDesign gives an error message instead of either jumping to import options or telling you the default crop options are unavailable for this file. I would call it a bug. I have encountered it from at least version 4 (aka CS2).

  • %pdf error in downloading pdf from Function module

    Hi,
    I am trying to download pdf from a LinkToaction UI element.
    I recieve %pdf" error when trying to download using below code. from backend perspective ABAPer said they are able to download PDF from ABAP program. Lokks like I am doing some mistake somewhere in below code.
    From the backend, pdf is coming in  a table in the form of SOLI-Text Line (TLine - SO_TEXT255)
    In webdynpro I am tried to take each line from that table and attched to a IWDResource as below.
    Please correct me if anything wrong here to get out of %pdf" error.
    IModel_Pdf_FileNode Model = wdContext.nodeModel_Pdf_File();
    IPDFElement pdf = wdContext.nodePDF().currentPDFElement();
    if (Model != null && Model.size() > 0)
    ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
    try {
       for (int i = 0; i < Model.size(); i++){
          IModel_Pdf_FileElement Element =
                                                 Model.getModel_Pdf_FileElementAt(i);
         baos.write(Element.getLine().getBytes());
        IWDResource resource =WDResourceFactory.createCachedResource(
              baos.toByteArray(),
              "Test",
              WDWebResourceType.PDF);
        pdf.setBinaryResource(resource);
    Thanks
    Praveen

    Thanks for the sample. I use version NWDS7.0 and I don't find IContent type in my NWDS after re-organizing import statements.
    currently I use below code to get the PDF on click of LinkToaction UI element (After I set the pdf from backend above part of the code).
    {code
    IWDResource pdfResource = wdContext.nodePDF().currentPDFElement().getBinaryResource();
                   String pdfURL = pdfResource.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal());
              IWDWindow window =
              wdComponentAPI.getWindowManager()
              .createNonModalExternalWindow(pdfURL , "Test");
              window.show();
    {code}
    Currently above code giving %pdf" error when clicking LTU UI elemnt.
    Please suggest How I need to adjust your sample in my case.
    Thanks
    Praveen

  • PDF Error 109

    Attempting to print from an Adobe PDF results in printing only "PDF Error 109: trailer missing or invalid" on a single page.  The remainder of the document does not print.
    This problem is intermittent, some files print OK some don't.
    Anyone ever encounter this?

    Thank you

  • Financial Reporting Studio - pdf error

    I have one FRS report that will not produce a pdf when running as a view in Workspace or when running as a batched report. All my other reports are working fine. This reports does preview/print in the Reporting Studio and works in HTML on Workspace. It also ran correctly in the past. Currently when opening in pdf format on Workspace it begins to run then displays a window with this message:
    "Website cannot display the page"
    When running in a batch the batch errors out with this message:
    Executed "FOP/Income Statement Summary - RDD" successfully
    Status for various save options for "FOP/Income Statement Summary - RDD"
    Error while saving as PDF
    Error unmarshaling return header; nested exception is:
    java.io.EOFException
    I can run the other reports in batch and they save correctly to the same place that this report should be going. So it not a permission issue to the directory where is should be saving the file.
    Thanks in advance

    Have you checked the logs? When I first saw the subject, I thought it was due to lack of Ghostscript installed on the FR Studio server, but looks like it is not the case.
    Also a long shot, but does it happen in other machines?

  • Adding bar codes to printer device for smartforms pdf conversion?

    Hello friends,
    I would like to send a smartform as a pdf to an email recipient. The smartform shows some bar codes. The send process workes fine. But the bar codes doesn't appear on the pdf correctly. Therefore I would like to add bar codes to the printer device type in transaction SE73.
    Does somebody know the device type for smartforms pdf conversion? Or how can I add bar codes to smartforms pdf conversion process?
    greetings
    daniel

    Hello Denial,
    Try these links, this might solve ur problem
    http://www.tec-it.com//documentation/TBarCodeSAPLPD_EN.htm
    http://www.mecsw.com/info/appnote/app_024.html
    if you need any more information send me at [email protected]
    Thanks & Best Regards
    Ankur Jain

  • On a Mac ios10.10, using online service Export PDF, error message appears,"An error occurred while trying to access service."

    Can you advise steps I might take now?  On a Mac ios10.10, using online service Export PDF, error message appears,"An error occurred while trying to access service."

    Hi Ringdoc,
    Please see this document: "Error occurred when trying to access this service" when logging on to Acrobat.com
    Let us know how it goes!
    Best,
    Sara

  • Hello, i've win7 64bit and can use my adobe acrobat 7.0.0.2004121400. but it is not possible to print a pdf - error 20225 at the installation of acrobat. any ideas how to solve this problem? I've tryed some instructions from internet concerning this 20225

    hello, i've win7 64bit and can use my adobe acrobat 7.0.0.2004121400. but it is not possible to print a pdf - error 20225 at the installation of acrobat. any ideas how to solve this problem? I've tryed some instructions from internet concerning this 20225 error, but without success. thanks a lot and best regards

    BS heißt "Bull___****". *lol* "Betriebssystem" heißt imemr noch "operating system". GoLive wirste wohl gar nicht zum laufen kriegen. ohnehin würde man es nicht mehr verwenden, weil es noch nicht mal CSS2 voll unterstützt geschweige denn HTML 5 und andere moderne Webstandards. Wenn überhaupt, dann findeste vielleicht noch 'ne OEM CD von Strato oder 1und1 bei eBay. Die haben das damals mit jedem neuen Hostingvertrag rausgehauen. Aber wie gesagt, es ist den Aufwand nicht wert. Illustrator sollte sich durchaus installieren lassen. Eventuell einfach nochmal die Installer im Win XP Kompatibilitätsmodus laufen lassen...
    Mylenium

  • Bad PDF; could not read page structure. Bad PDF; error in processing fonts: unsupported Type2 font

    I created a "form" in MS Word using a table with blanks for where the fill-in fields are supposed to go. I converted the file to PDF, and then I tried to use the PDF Forms maker with the automatic field detection feature (Acrobat 8 Pro) but I keep getting the error "Bad PDF; could not read page structure. <Bad PDF; error in processing fonts: unsupported Type2 font> [1]" What could be causing this? Is there something I need to do in Word to make the field recognition work? The field recognition has worked with other PDFs that I have not created in Word. I'd rather not have to create each individual field myself, if I don't need to. I thought this was a great feature when I have used it on other PDFs, but I need to figure out what I'm doing wrong on forms I am creating myself in Word.<br /><br />I am using a MacBook with Leopard, all updates installed, Office:MAC 2008 and Adobe Acrobat 8 Professional.<br /><br />Thank you in advance!

    I got where you were going with this, so I printed with the Adobe 8.0 printer and then I was able to use the auto field detection. THANKS!!

  • Smartform : PDF to Base64 encoding

    Hi .
    I am new to ABAP & Smartform.I have a requirement to convert smartform PDF to Base 64.I've tried the methods provided in the related SDN threads.But while decoding , junk characters are coming.Please find my code below :
    Convert SF output to PDF format
    *convert the smartform to .pdf file
          DATA : I_DOC TYPE TABLE OF DOCS,
                       WA_DOC TYPE DOCS,
                       L_PDF_STRING TYPE XSTRING.
          I_OTFDATA[] = ST_JOB_OUTPUT_INFO-OTFDATA[].
          CALL FUNCTION 'CONVERT_OTF'
            EXPORTING
              FORMAT                = 'PDF'
              MAX_LINEWIDTH         = 132
            IMPORTING
              BIN_FILESIZE          = V_BIN_FILESIZE
              BIN_FILE              = L_PDF_STRING
            TABLES
              OTF                   = I_OTFDATA
              LINES                 = I_LINES.
    Convert Table i_bin to base64 encoding
      DATA : I_BASE64  TYPE STANDARD TABLE OF SOLISTI1,
             WA_BASE64 TYPE SOLISTI1,
             WA_LINES  TYPE TLINE.
      DATA: LV_OUTPUT(255) TYPE C,
            LV_INPUT(132) TYPE C,
            LV_X(255) TYPE X,
            LV_I TYPE I.
      DATA: CONV TYPE REF TO CL_ABAP_CONV_OUT_CE.
      LOOP AT I_LINES INTO WA_LINES.
        LV_INPUT = WA_LINES-TDLINE.
        LV_I = STRLEN( LV_INPUT ).
       CONDENSE lv_input.
        IF LV_I > 0.
          TRY.
              CALL METHOD CL_ABAP_CONV_OUT_CE=>CREATE
                EXPORTING
                  ENCODING    = 'UTF-8'
                  ENDIAN      = 'L'
                  replacement = '#'
                  ignore_cerr = ABAP_FALSE
                RECEIVING
                  CONV        = CONV .
            CATCH CX_PARAMETER_INVALID_RANGE .
            CATCH CX_SY_CODEPAGE_CONVERTER_INIT .
          ENDTRY.
                  CALL METHOD CONV->WRITE
                EXPORTING
                  N      = LV_I
                  DATA   = LV_INPUT
                view   =
              IMPORTING
                len    =
              LV_X = CONV->GET_BUFFER( ).
          CALL FUNCTION 'HTTP_BASE64_ENCODE'
            EXPORTING
              INPUT        = LV_X
              INPUT_LENGTH = LV_I
            IMPORTING
              OUTPUT       = LV_OUTPUT.
        Append to Table
          WA_BASE64-LINE = LV_OUTPUT.
          APPEND WA_BASE64 TO I_BASE64.
          CLEAR : LV_OUTPUT, LV_X, LV_I, WA_BASE64, WA_LINES.
        ENDIF.
      ENDLOOP.
    Thanks,
    Jayita Ganguly

    Hi,
    Jayita2011 wrote:
    LV_X = WA_PDF-TDLINE.
    As WA_PDF-TDLINE is type C, and LV_X is type X, it does a conversion BUT it is not what you expect: LV_X = 'RMjlùIOJM%8RUZ3T', it will set LV_X = all zeroes as 'RM...' does not start with an hexadecimal string (and so base 64 would return AAAAAA). See the ABAP doc for more info.
    Moreover, base 64 encoding must be done with the whole byte stream (more precisely you must not split it outside chunks of 3 bytes, as this encoding converts 3 bytes into 4 characters, converting 2 bytes makes no sense for example, except at the end of the stream).
    I advise you to use CL_HTTP_UTILITY=>ENCODE_BASE64 which converts a string which is casted as bytes. Before, you must concatenate the lines into a string, either using CONCATENATE LINES OF lt_char INTO l_target RESPECTING BLANKS, or SWA_STRING_FROM_TABLE (keep_trailing_spaces='X') depending on your release. Don't forget to shorten the string at exactly the number of representative characters (LV_I in your example).
    BR
    Sandra

  • SMARTFORM GUI_DOWNLOAD PDF error opening Adobe document

    When attempting to open Adobe document from Smartform converted to pdf using CONVERT_OTF and GUI_DOWNLOAD I get error.  The abap completed each step with no errors and oddly the final pdf file created to PC was either 10 or 15 Mb even.  The 15Mb version when downloaded to network is 17.867 Mb downloaded in background so it is obvious something is wrong.
    It should be
    Note 1107236 regarding size is not applicable as we are at SAP BASIS SP19 and this is not applicable.
    Step 1.      
            CALL FUNCTION 'CONVERT_OTF'
              EXPORTING
                FORMAT                = 'PDF'
              IMPORTING
                BIN_FILESIZE          = PDF_SIZE
                BIN_FILE              = PDF_DATA
              TABLES
                OTF                   = LT_OTFDATA[]
                LINES                 = L_DUMMY
              EXCEPTIONS
                ERR_MAX_LINEWIDTH     = 1
                ERR_FORMAT            = 2
                ERR_CONV_NOT_POSSIBLE = 3
                OTHERS                = 4.
    Step2. 
    Binary download table
            LV_VAR = PDF_SIZE DIV 1024.
            LV_VAR = LV_VAR + 1.
            DO LV_VAR TIMES.
              LV_VAR_FIRST = LV_VAR_FIRST + 1024.
              IF LV_VAR_FIRST LE PDF_SIZE.
                LV_VAR_FIRST = LV_VAR_FIRST - 1024.
                MOVE PDF_DATA+LV_VAR_FIRST(1024) TO LINE_BIN-DATA.
              ELSE.
                LV_VAR_FIRST = LV_VAR_FIRST - 1024.
                LV_VAR_LAST  = PDF_SIZE - LV_VAR_FIRST.
                MOVE PDF_DATA+LV_VAR_FIRST(LV_VAR_LAST) TO LINE_BIN-DATA.
              ENDIF.
              LV_VAR_FIRST = LV_VAR_FIRST + 1024.
              APPEND LINE_BIN TO DATA_TAB_BIN.
            ENDDO.
    Step 3.
                 CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                FILENAME                = FNAME
                FILETYPE                = 'BIN'       " BIN
                CODEPAGE                = ZCODEPAGE   " issue 12869 02/10/2009 - 4110 is RU
              IMPORTING
                FILELENGTH              = LENGTH
              TABLES
                DATA_TAB                = DATA_TAB_BIN
              EXCEPTIONS
                FILE_WRITE_ERROR        = 1
                NO_BATCH                = 2
                GUI_REFUSE_FILETRANSFER = 3
                INVALID_TYPE            = 4
                NO_AUTHORITY            = 5
                UNKNOWN_ERROR           = 6
                HEADER_NOT_ALLOWED      = 7
                SEPARATOR_NOT_ALLOWED   = 8
                FILESIZE_NOT_ALLOWED    = 9
                HEADER_TOO_LONG         = 10
                DP_ERROR_CREATE         = 11
                DP_ERROR_SEND           = 12
                DP_ERROR_WRITE          = 13
                UNKNOWN_DP_ERROR        = 14
                ACCESS_DENIED           = 15
                DP_OUT_OF_MEMORY        = 16
                DISK_FULL               = 17
                DP_TIMEOUT              = 18
                FILE_NOT_FOUND          = 19
                DATAPROVIDER_EXCEPTION  = 20
                CONTROL_FLUSH_ERROR     = 21
                OTHERS                  = 22.

    bin_filesize            = PDF_SIZE must be added as parm to function GUI_DOWNLOAD.

Maybe you are looking for

  • Drawing preloader line with AS?

    Hello I have the following AS (2) in a preloader (which works - in the sense that it loads the next page): The preloader should have a coloured line which runs from left to right about 0.25px thick. Whenever I have tried to draw the line using a penc

  • How can i retrieve my ip address.i lost all my receipts and my box.someone stole it

    how can i retrieve my stolen ipad 2?i lost everything that proves that it is mine.all iknow is the apple address.i want to know the ip adress and everything about it

  • SCCM collection query to create ESX host machines

    Hello Everyone I am looking SCCM collection query to create  ESX host collection. Any one can share the query to create EST host machines collection please

  • Why did you screw up Helveticas???

    I just had my computer at work upgraded to Leopard. The biggest problem we will have is going to be with fonts. Everyone has the complete family of Helveticas that we need to use in our everyday work. But now, half of our Helveticas are unavailable,

  • IPSEC EIGRP NTP issues

    Fellow networkers, I am having difficulty setting up my tunnel correctly and synching time. I am hoping I could get some ideas or even a solution. Thank you much. I have two 3945s connected to each other. One 3945 (Enc1) is connected to our router an