Smartforms o/p 2 PDF conversion problem , plz see my code

Hi Smartform Guys
1)I m getting error <b>"CONVT_NO_NUMBER "</b>  in converting my Smartform output to PDF.
*Printing of Export Invoice, Packing List,Enclosure to Packing List &  *
*Case Marking in one SMART FORMS Layout                                *
REPORT ZSD_REP_MULTI_PRINT.
TABLES :
    vbak,
    vbap,
    vbpa,
    vbfa,
    VBRK,
    VBRP,
    LIKP,
    LIPS,
    KONV,
    objk,
    tvko,
    ser01,
    sadr,
    equi,
    makt,
    mast,
    t005t,
    kna1,
    t001w,
    T001,
    ADRC,
    sscrfields,
    zpp_plcmi,      "Packing list history For Conf: Item data
    zplh,           "PACKING LIST HISTORY : HEADER DATA
    zpli.           "PACKING LIST HISTORY : ITEM DATA
DATA: FM_NAME  TYPE RS38L_FNAM,
      P_E_DEVTYPE TYPE RSPOPTYPE,
      P_JOB_OUTPUT_INFO TYPE SSFCRESCL OCCURS 2000 WITH HEADER LINE,
      P_OUTPUT_OPTIONS TYPE SSFCOMPOP OCCURS 0 WITH HEADER LINE,
      P_CONTROL_PARAMETERS TYPE SSFCTRLOP OCCURS 0 WITH HEADER LINE ,
      P_DOC  LIKE DOCS OCCURS 2000 WITH HEADER LINE,
      P_LINES LIKE TLINE OCCURS 200,
      P_BIN_FILESIZE TYPE I,
      P_LANGUAGE TYPE SFLANGU,
      P_BIN_FILE TYPE XSTRING.
DATA: T_ITEM   TYPE  ZSD_TABL_LITEM,
      WA_ITEM  TYPE  ZSD_STRUCT_LITEM,
      T_ADRS   LIKE  ZSD_STRUCT_ADRS  OCCURS 0 WITH HEADER LINE,
      MSLINES  LIKE  TLINE OCCURS 1 WITH HEADER LINE,
      TIDNO    LIKE STXL-TDID,
      TNAME    LIKE STXL-TDNAME,
      TOBJT    LIKE STXL-TDOBJECT,
      SSORD    LIKE VBAK-VBELN,
      TOT      LIKE VBAK-NETWR,
      WORD     LIKE SPELL.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS: P_DELNO LIKE  LIKP-VBELN OBLIGATORY,
            P_INVNO LIKE  VBRK-VBELN OBLIGATORY,
            P_DATE  LIKE  SY-DATUM.
SELECTION-SCREEN END   OF BLOCK blk1.
AT SELECTION-SCREEN.
  CLEAR T_ADRS.
  REFRESH T_ITEM.
  T_ADRS-INVNO = P_INVNO.
  T_ADRS-INVDAT = P_DATE.
  SELECT SINGLE VBELV INTO  VBFA-VBELV
                         FROM  VBFA
                         WHERE VBELN = P_DELNO
                           AND VBTYP_N = 'J'  .
  SSORD = VBFA-VBELV.
*Exporter's  Address
  SELECT SINGLE BUKRS_VF INTO  VBAK-BUKRS_VF
                         FROM  VBAK
                         WHERE VBELN = VBFA-VBELV.
  SELECT SINGLE   ADRNR
                  INTO T001-ADRNR
                  FROM T001
                  WHERE BUKRS = VBAK-BUKRS_VF.
  SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
         INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
               T_ADRS-POST_CODE1, ADRC-COUNTRY)
         FROM  ADRC
         WHERE ADDRNUMBER EQ T001-ADRNR.
  SELECT SINGLE LANDX
                INTO T_ADRS-COUNTRY
                FROM T005T
                WHERE     SPRAS = 'EN'
                      AND LAND1 = ADRC-COUNTRY.
**BUYERS NO & DATE
SELECT SINGLE BSTNK BSTDK INTO  (T_ADRS-BSTNK,T_ADRS-BSTDK)
                     FROM  VBAK
                     WHERE VBELN = VBFA-VBELV.
*Consignee Address & Buyer Other Than Consignee
  SELECT SINGLE KUNNR KUNAG INTO (LIKP-KUNNR, LIKP-KUNAG)
                            FROM LIKP WHERE VBELN = P_DELNO.
  IF LIKP-KUNNR = LIKP-KUNAG.
    SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
              INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                    T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                    T_ADRS-CTELF1, KNA1-ADRNR)
              FROM  KNA1
              WHERE KUNNR = LIKP-KUNNR.
    SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                          FROM  ADRC
                          WHERE ADDRNUMBER EQ KNA1-ADRNR.
    SELECT SINGLE LANDX
                INTO T_ADRS-CCOUNTRY
                FROM T005T
                WHERE     SPRAS = 'EN'
                      AND LAND1 = ADRC-COUNTRY.
    T_ADRS-ONAME1   =  T_ADRS-CNAME1 .
    T_ADRS-ONAME2   =  T_ADRS-CNAME2 .
    T_ADRS-OSTREET  =  T_ADRS-CSTREET .
    T_ADRS-OCITY    =  T_ADRS-CCITY.
    T_ADRS-OPCODE   =  T_ADRS-CPCODE .
    T_ADRS-OREGIO   =  T_ADRS-CREGIO.
    T_ADRS-OTELF1   =  T_ADRS-CTELF1 .
    T_ADRS-OCOUNTRY =  T_ADRS-CCOUNTRY.
  ELSE.
    SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
              INTO (T_ADRS-CNAME1, T_ADRS-CNAME2, T_ADRS-CSTREET,
                    T_ADRS-CCITY,  T_ADRS-CPCODE, T_ADRS-CREGIO,
                    T_ADRS-CTELF1, KNA1-ADRNR)
              FROM  KNA1
              WHERE KUNNR = LIKP-KUNNR.
    SELECT SINGLE COUNTRY INTO ADRC-COUNTRY
                          FROM  ADRC
                          WHERE ADDRNUMBER EQ KNA1-ADRNR.
    SELECT SINGLE LANDX
                INTO T_ADRS-CCOUNTRY
                FROM T005T
                WHERE     SPRAS = 'EN'
                      AND LAND1 = ADRC-COUNTRY.
*Buyer Other than Consignee
    SELECT SINGLE NAME1 NAME2 STRAS ORT01 PSTLZ REGIO TELF1 ADRNR
               INTO (T_ADRS-ONAME1, T_ADRS-ONAME2, T_ADRS-OSTREET,
                     T_ADRS-OCITY,  T_ADRS-OPCODE, T_ADRS-OREGIO,
                     T_ADRS-OTELF1, KNA1-ADRNR)
               FROM  KNA1
               WHERE KUNNR = LIKP-KUNAG.
    SELECT SINGLE COUNTRY INTO  ADRC-COUNTRY
                          FROM  ADRC
                          WHERE ADDRNUMBER EQ KNA1-ADRNR.
    SELECT SINGLE LANDX
                INTO T_ADRS-OCOUNTRY
                FROM T005T
                WHERE     SPRAS = 'EN'
                      AND LAND1 = ADRC-COUNTRY.
  ENDIF.
*Other's Ref
  TIDNO = 'Z071'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-OREF = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Buyer's Order No  Ref
  TIDNO = 'Z023'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-BUYER = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Exporter Ref
  TIDNO = 'Z072'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-XPREF = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Pre-Carraige By
  TIDNO = 'Z074'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PCRG = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Place Of reciept by Pre-Carraige
  TIDNO = 'Z073'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PLPCRG = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Vessel/Flight No
  TIDNO = 'Z075'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-VFNO = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Port Of Loading
  TIDNO = 'Z077'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PLOAD = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Port Of Discharge
  TIDNO = 'Z076'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-PDISG = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Final Destination
  TIDNO = 'Z070'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-FDEST = mslines-tdline(25).
    EXIT.
  ENDLOOP.
*Terms Of Delivery & Payment
  TIDNO = 'Z080'.
  TNAME = SSORD.
  TOBJT = 'VBBK'.
  PERFORM FINDTEXT.
  LOOP AT MSLINES.
    T_ADRS-TERMS = mslines-tdline(50).
    EXIT.
  ENDLOOP.
APPEND T_ADRS.
*BODY SECTION FOR LINE ITEMS
  SELECT POSNR KWMENG VRKME WAERK
         INTO  (VBAP-POSNR, VBAP-KWMENG, VBAP-VRKME, VBAP-WAERK)
         FROM  VBAP
         WHERE VBELN = SSORD.
*Mark/Case No
    TIDNO = '0002'.
    CONCATENATE SSORD
                VBAP-POSNR
    INTO        TNAME.
    TOBJT = 'VBBP'.
    PERFORM FINDTEXT.
    LOOP AT MSLINES.
      WA_ITEM-MARKNO = mslines-tdline(40).
      EXIT.
    ENDLOOP.
*Packing Type
    TIDNO = '0003'.
    CONCATENATE SSORD
                VBAP-POSNR
    INTO        TNAME.
    TOBJT = 'VBBP'.
    PERFORM FINDTEXT.
    LOOP AT MSLINES.
      WA_ITEM-PACKTYP = mslines-tdline(40).
      EXIT.
    ENDLOOP.
*Goods Description
    TIDNO = '0001'.
    CONCATENATE SSORD
                VBAP-POSNR
    INTO        TNAME.
    TOBJT = 'VBBP'.
    PERFORM FINDTEXT.
    LOOP AT MSLINES.
      WA_ITEM-PACKTYP = mslines-tdline(40).
      EXIT.
    ENDLOOP.
*Goods Quantity
    WA_ITEM-QTY = VBAP-KWMENG.
    WA_ITEM-VRKME = VBAP-VRKME.
*Goods Rate
    SELECT SINGLE KNUMV INTO VBAK-KNUMV FROM VBAK WHERE VBELN = SSORD.
    SELECT SINGLE KBETR WAERS
                  INTO  (WA_ITEM-RATE, WA_ITEM-WAERS)
                  FROM  KONV
                  WHERE KNUMV = VBAK-KNUMV
                    AND KPOSN = VBAP-POSNR
                    AND KSCHL = 'PR00'.
*Goods Amount
    WA_ITEM-AMOUNT = WA_ITEM-QTY * WA_ITEM-RATE.
    WA_ITEM-WAERK = VBAP-WAERK.
    TOT = TOT + WA_ITEM-AMOUNT.
    APPEND WA_ITEM TO T_ITEM.
  ENDSELECT.
  T_ADRS-TOT = TOT.
  CALL FUNCTION 'SPELL_AMOUNT'
   EXPORTING
     AMOUNT          = TOT
     CURRENCY        = VBAP-WAERK
  FILLER          = ' '
     LANGUAGE        = SY-LANGU
   IMPORTING
     IN_WORDS        = WORD
   EXCEPTIONS
     NOT_FOUND       = 1
     TOO_LARGE       = 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.
TEXT = WORD-WORD.
CONCATENATE TEXT
             'DECIMAL'
              WORD-WORD
     INTO     TEXT
     SEPARATED BY ' '.
  T_ADRS-TOT_WORDS = WORD-WORD.
  APPEND T_ADRS.
START-OF-SELECTION.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      FORMNAME                 = 'Z_SD_REP_MULTI_PRINT'
  VARIANT                  = ' '
  DIRECT_CALL              = ' '
   IMPORTING
      FM_NAME                  = FM_NAME
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.
  P_LANGUAGE = 'EN'.
  CALL   FUNCTION 'SSF_GET_DEVICE_TYPE'
    EXPORTING
      I_LANGUAGE    = P_LANGUAGE
      I_APPLICATION = 'SAPDEFAULT'
    IMPORTING
      E_DEVTYPE     = P_E_DEVTYPE.
  P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
  P_OUTPUT_OPTIONS-XSF = SPACE.
  P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
  P_OUTPUT_OPTIONS-XDF = SPACE.
  P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
  P_OUTPUT_OPTIONS-TDDEST = 'LOCL'.
  APPEND P_OUTPUT_OPTIONS.
  P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
  P_CONTROL_PARAMETERS-GETOTF = 'X'.
  P_CONTROL_PARAMETERS-NO_CLOSE = SPACE.
  APPEND  P_CONTROL_PARAMETERS.
  CALL FUNCTION FM_NAME
   EXPORTING
  ARCHIVE_INDEX              =
  ARCHIVE_INDEX_TAB          =
  ARCHIVE_PARAMETERS         =
    CONTROL_PARAMETERS         = P_CONTROL_PARAMETERS
  MAIL_APPL_OBJ              =
  MAIL_RECIPIENT             =
  MAIL_SENDER                =
    OUTPUT_OPTIONS             = P_OUTPUT_OPTIONS
    USER_SETTINGS              = 'X'
  IMPORTING
  DOCUMENT_OUTPUT_INFO       =
    JOB_OUTPUT_INFO            = P_JOB_OUTPUT_INFO
  JOB_OUTPUT_OPTIONS         =
  TABLES
    T_ADRS                     = T_ADRS
    T_ITEM                     = T_ITEM
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.
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
  EXPORTING
    USE_OTF_MC_CMD               = 'X'
  ARCHIVE_INDEX                =
IMPORTING
   BIN_FILESIZE                 = P_BIN_FILESIZE
  TABLES
    OTF                          = P_JOB_OUTPUT_INFO-OTFDATA
    DOCTAB_ARCHIVE               = P_DOC
    LINES                        = P_LINES
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.
BREAK-POINT.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
   BIN_FILESIZE                  = P_BIN_FILESIZE
  CODEPAGE                      = ' '
   FILENAME                      = 'C:\TEMP.PDF'
   FILETYPE                      = 'BIN'
   MODE                          = ''
  WK1_N_FORMAT                  = ' '
  WK1_N_SIZE                    = ' '
  WK1_T_FORMAT                  = ' '
  WK1_T_SIZE                    = ' '
  COL_SELECT                    = ' '
  COL_SELECTMASK                = ' '
  NO_AUTH_CHECK                 = ' '
IMPORTING
    FILELENGTH                    = P_BIN_FILESIZE
  TABLES
    DATA_TAB                      = P_LINES
  FIELDNAMES                    =
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
  NO_AUTHORITY                  = 10
  OTHERS                        = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
    BIN_FILESIZE = P_BIN_FILESIZE
    FILENAME = 'C:\Documents and Settings\pvipin\Desktop\sd.pdf'
    FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH =
*TABLES
   DATA_TAB = P_LINES.
FIELDNAMES =
**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 .
IF SY-SUBRC <> 0.
     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*&      Form  FINDTEXT
      text
FORM FINDTEXT.
  REFRESH mslines.
  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      client                  = sy-mandt
      id                      = tidno
      language                = sy-langu
      name                    = tname
      object                  = tobjt
    TABLES
      lines                   = mslines
    EXCEPTIONS
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      OTHERS                  = 8.
  DELETE mslines WHERE tdline IS INITIAL.
ENDFORM.                    "FINDTEXTThnx in Advnce
Moni
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman
Message was edited by: md monirujjaman

Hello,
I think the following statement is causing problem.
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
either give:
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA[].
or
directly pass P_JOB_OUTPUT_INFO-OTFDATA into FM parameter.
This is because you are filling only header into P_OTF and NOT the Contents of internal table by the statement
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
let me know whether it works.
Regards, Murugesh AS
have alook at this thread:
Re: SX_OBJECT_CONVERT_OTF_PDF
this may help you
Message was edited by: Murugesh Arcot
Message was edited by: Murugesh Arcot

Similar Messages

  • SAX problem(plz see the code given)

    hi all,
    i am using SAX parser for validating my xml file against the dtd,i am getting some errors that i am not able to make out.cud u plz help me.i am sending u my files.
    ------------------------java file------------------------------------
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class Echo extends DefaultHandler
    public static void main(String argv[]){
    if (argv.length != 1) {
    System.err.println("Usage: cmd filename");
    System.exit(1);
    // Use an instance of ourselves as the SAX event handler
    //DefaultHandler handler=new DefaultHandler();
    Echo handler=new Echo();
    // Use the default (non-validating) parser
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setValidating(true);
    try {
    // Set up output stream
    out = new OutputStreamWriter(System.out, "UTF8");
    // Parse the input
    SAXParser saxParser = factory.newSAXParser();
    saxParser.parse( new File(argv[0]), handler );
    catch (SAXParseException spe) {
    // Error generated by the parser
    System.out.println("\n** Parsing error"
    + ", line " + spe.getLineNumber()
    + ", uri " + spe.getSystemId());
    System.out.println(" " + spe.getMessage() );
    }catch (Throwable t){
    t.printStackTrace();
    System.exit(0);
    static private Writer out;
    public void startDocument()
    throws SAXException{
    emit("<?xml version='1.0' encoding='UTF-8'?>");
    nl();
    public void endDocument()
    throws SAXException{
    try {
    nl();
    out.flush();
    }catch (IOException e) {
    throw new SAXException("I/O error", e);
    public void startElement(String namespaceURI,
    String sName, // simple name (localName)
    String qName, // qualified name
    Attributes attrs)
    throws SAXException
    String eName = sName; // element name
    if ("".equals(eName)) eName = qName; // namespaceAware = false
    emit("<"+eName);
    if (attrs != null) {
    for (int i = 0; i < attrs.getLength(); i++) {
    String aName = attrs.getLocalName(i); // Attr name
    if ("".equals(aName)) aName = attrs.getQName(i);
    emit(" ");
    emit(aName+"=\""+attrs.getValue(i)+"\"");
    emit(">");
    public void endElement(String namespaceURI,
    String sName, // simple name
    String qName // qualified name
    throws SAXException
    emit("</"+qName+">");
    public void characters(char buf[], int offset, int len)
    throws SAXException
    String s = new String(buf, offset, len);
    emit(s);
    public void ignorableWhitespace(char buf[], int offset, int Len)
    throws SAXException
    nl();
    //emit("IGNORABLE");
    private void emit(String s)
    throws SAXException
    try {
    out.write(s);
    out.flush();
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    private void nl()
    throws SAXException
    String lineEnd = System.getProperty("line.separator");
    try {
    out.write(lineEnd);
    } catch (IOException e) {
    throw new SAXException("I/O error", e);
    public void error(SAXParseException e)
    throws SAXParseException
    throw e;
    public void warning(SAXParseException e)throws SAXParseException{
    System.out.println("WARNING : Line Number:- "+e.getLineNumber());
    System.out.println("WARNING : Column Number:- "+e.getColumnNumber());
    System.out.println("WARNING : System ID:- "+e.getSystemId());
    System.out.println("WARNING : Public Number:- "+e.getPublicId());
    --------------------------xml file------------------------------------
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE slideshow SYSTEM "echo.dtd">
    <!-- A SAMPLE set of slides -->
    <slideshow
    title="Sample Slide Show"
    date="Date of publication"
    author="Yours Truly"
    >
    <![CDATA[Digram : frobmorten <------------ fuznaten
    | <3> ^
    | <1> | <1> = fozzle
    V | <2> = framboze
    Staten+ <3> = frenzle
    <2>
    ]]>
    <!-- TITLE SLIDE -->
    <slide type="all">
    <image src="my.gif" alt="this is my pic" type="image/gif"/>
    <title>Wake up to WonderWidgets!</title>
    </slide>
    <!-- OVERVIEW -->
    <slide type="all">
    <title>Overview</title>
    <item>WonderWidgets are great</item>
    <item/>
    <item>Who buys WonderWidgets</item>
    </slide>
    <slide type="all">
    <title>Overview</title>
    <item>Who buys WonderWidgets</item>
    </slide>
    </slideshow>
    -----------------------------dtd file---------------------------------
    <!ELEMENT slideshow (slide+)>
    <!ATTLIST slideshow
    title CDATA #IMPLIED
    date CDATA #IMPLIED
    author CDATA #IMPLIED
    >
    <!ELEMENT slide (image?,title, item*)>
    <!ATTLIST slide type CDATA #IMPLIED>
    <!ELEMENT title (#PCDATA)>
    <!ELEMENT item (#PCDATA | item)* >
    <!ELEMENT image EMPTY>
    <!ATTLIST image
    alt CDATA #IMPLIED
    src CDATA #REQUIRED
    type CDATA "image/gif"
    >
    -----------------------ERROR I AM GETTING IS--------------------------
    <?xml version='1.0' encoding='UTF-8'?>
    <slideshow title="Sample Slide Show" date="Date of publication" author="Yours Tr
    uly">
    Digram : frobmorten <------------ fuznaten
    | <3> ^
    | <1> | <1> = fozzle
    V | <2> = framboze
    Staten+ <3> = frenzle
    <2>
    <slide type="all">
    <image src="my.gif" alt="this is my pic" type="image/gif"></image>
    <title>Wake up to WonderWidgets!</title>
    </slide>
    <slide type="all">
    <title>Overview</title>
    <item>WonderWidgets are great</item>
    <item></item>
    <item>Who buys WonderWidgets</item>
    </slide>
    <slide type="all">
    <title>Overview</title>
    <item>Who buys WonderWidgets</item>
    </slide>
    org.xml.sax.SAXException: The content of element type "slideshow" must m
    atch "(slide)+".
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
    ava:979)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at Echo.main(Echo.java:28)
    with my lot efforts i am not able to make out where i am wrong,plz do have a look on the codes.
    thanx in advance
    best regards
    anshul

    Hi i have consulted the XML spec and it is not possible to have a CDATA section as element content. A element declaration can have only content that is empty, ANY (i.e. can include any other declared elements in DTD), mixed (i.e. can contain PCDATA or child elements, or child elements. An element cannot include any character data which CDATA represents. i.e it is not valid to do <!ELEMENT slideshow CDATA>
    The CDATA can only be used with an attribute declaration. Regard CDATA as a type definition for any attribute variables.
    So what do i suggest. You could declare a separate element which has an attribute for the CDATA section
    <!ELEMENT input (Name)>
    <!ATTLIST input instructions CDATA #REQUIRED>
    hope this helps.

  • PDF Conversion problem

    Hi ABAPers
    While sending smartform as a mail attachment(PDF Format) i am facing problem.
    While opening the PDF attachment in SOST (T-code), It shows a error pop up.(I.e., Conversion Problem in PDF). Some pages are getting opened as a blank page and some are not getting opened.
    What may be the prolem.
    Please help Me out ............
    But it works properly in IDES version.
    In IDES i have ADOBE 5.0 Version, In Live server it is ADOBE 6.0 ,7.0.

    Hi,
    Thanks for your feedback
    There is no problem in the coding , is there any thing we have to do in configuration level regarding PDF ?????
    *& Report  ZVNPAML
    REPORT  zvnpaml.
    TABLES: somlrec90.
    DATA: it_zvnpa  TYPE TABLE OF zvnpa,
          it_zvnpa1 TYPE TABLE OF zvnpa,
          wa_zvnpa  TYPE zvnpa,
          it_head   TYPE TABLE OF zvnpa,
          it_head1  TYPE TABLE OF zvnpa,
          wa_head   TYPE zvnpa,
          wa_head1  TYPE zvnpa,
          fmname    TYPE rs38l_fnam,
          tot       TYPE zvnpa-wrshb,
          otfout    TYPE ssfcrescl,
         outopt   type SSFCRESOP,
          pdftab    TYPE TABLE OF tline WITH HEADER LINE,
          datab     TYPE TABLE OF itcoo WITH HEADER LINE,
          conpar    TYPE ssfctrlop,
          mailrec   TYPE swotobjid,
          outopt    TYPE ssfcompop,
          jobopt    TYPE ssfcresop,
          jobout    TYPE ssfcrescl,
          w_return  TYPE ssfcrescl,
          it_otf    TYPE itcoo OCCURS 0 WITH HEADER LINE,
          binsz     LIKE sood-objlen,
          i_tline   TYPE TABLE OF tline WITH HEADER LINE,
          wa_buffer TYPE string,"To convert from 132 to 255
          i_record  LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    DATA: wa_doc_data   TYPE sodocchgi1,
          it_pack       TYPE TABLE OF sopcklsti1,
          wa_pack       TYPE sopcklsti1,
          it_mailhead   TYPE TABLE OF solisti1,   " OCCURS 1 WITH HEADER LINE,
          wa_mailhead   TYPE solisti1,
          it_mailbody   TYPE TABLE OF solisti1,      "  OCCURS 0 WITH HEADER LINE,
          wa_mailbody   TYPE solisti1,
          it_receiverid TYPE TABLE OF somlrec90,  " OCCURS 10 WITH HEADER LINE.
          wa_receiverid TYPE somlrec90,
          it_attach     LIKE solisti1 OCCURS 0 WITH HEADER LINE,
         wa_attach     TYPE solisti1,
          lncnt         TYPE i.
    DATA: lv_spool TYPE tsp01-rqident,
          wa_line  TYPE tsp01-rqident,
          it_pdf_output TYPE TABLE OF tline.
    SELECTION-SCREEN BEGIN OF BLOCK vendor WITH FRAME TITLE text-w03.
    *PARAMETERS: pa_lifnr TYPE lfa1-lifnr,
               pa_bukrs TYPE zvnpa-bukrs,
    PARAMETERS:     pa_augdt TYPE zvnpa-augdt.
    SELECT-OPTIONS: pa_mail FOR somlrec90-receiver NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK vendor.
    SELECT * FROM zvnpa INTO CORRESPONDING FIELDS OF TABLE it_zvnpa1
                        WHERE augdt =  pa_augdt
                        AND   bukrs =  '2000'
                        AND   flag  <> 'X'.
                                                 konto = pa_lifnr AND
                                                 bukrs = pa_bukrs AND
    IF it_zvnpa1 IS NOT INITIAL.
      SORT it_zvnpa1 BY konto.
      LOOP AT it_zvnpa1 INTO wa_zvnpa.
        APPEND wa_zvnpa TO it_zvnpa.
        CLEAR: wa_zvnpa.
        AT END OF konto.
          SORT it_zvnpa BY ttref augbl wrshb shkzg.
    *it_head[] = it_zvnpa[].
          LOOP AT it_zvnpa INTO wa_zvnpa WHERE shkzg = 'S'.
            APPEND wa_zvnpa TO it_head1.
            CLEAR: wa_zvnpa.
          ENDLOOP.
    *delete adjacent duplicates from it_head comparing ttref.
          SORT it_head1 BY ttref augbl wrshb shkzg.
           LOOP AT it_head1 INTO wa_head1.
            tot = tot + wa_head1-wrshb.
            wa_head = wa_head1.
            AT END OF ttref.
              wa_head-wrshb = tot.
              APPEND wa_head TO it_head.
              CLEAR: wa_head,tot.
            ENDAT.
            CLEAR: wa_head1.
          ENDLOOP.
          SORT it_head BY ttref augbl wrshb shkzg.
          CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING
              formname = 'ZVNPASF'
            IMPORTING
              fm_name  = fmname.
          conpar-no_dialog = 'X'.
          conpar-getotf    = 'X'.
          outopt-tddest    = 'LOCL'.
          outopt-urlcall   = fmname.
          outopt-tdnoprev  = 'X'.
         outopt-tdnewid   = 'X'.
          CALL FUNCTION fmname
           EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
              control_parameters         = conpar
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
              output_options             = outopt
              user_settings              = ' '
            IMPORTING
      DOCUMENT_OUTPUT_INFO       =
              job_output_info            = w_return
      JOB_OUTPUT_OPTIONS         =
            TABLES
              it_zvnpa                   = it_zvnpa
              it_head                    = it_head.
         READ TABLE w_return-spoolids INTO wa_line INDEX 1.
         IF sy-subrc = 0.
           lv_spool = wa_line.
           CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
               src_spoolid              = lv_spool
               no_dialog                = ' '
               dst_device               = 'LOCL'
             TABLES
               pdf                      = it_pdf_output
             EXCEPTIONS
               err_no_otf_spooljob      = 1
               err_no_spooljob          = 2
               err_no_permission        = 3
               err_conv_not_possible    = 4
               err_bad_dstdevice        = 5
               user_cancelled           = 6
               err_spoolerror           = 7
               err_temseerror           = 8
               err_btcjob_open_failed   = 9
               err_btcjob_submit_failed = 10
               err_btcjob_close_failed  = 11.
          it_otf[] = w_return-otfdata[].
          IF it_otf[] IS NOT INITIAL.
            CALL FUNCTION 'CONVERT_OTF'
              EXPORTING
                format        = 'PDF'
                max_linewidth = 132
              IMPORTING
                bin_filesize  = binsz
              TABLES
                otf           = it_otf
                lines         = i_tline.
            LOOP AT i_tline.
              TRANSLATE i_tline USING ' ~'.
              CONCATENATE wa_buffer i_tline INTO wa_buffer.
            ENDLOOP.
            TRANSLATE wa_buffer USING '~ '.
            DO.
              i_record = wa_buffer.
              APPEND i_record.
              SHIFT wa_buffer LEFT BY 255 PLACES.
              IF wa_buffer IS INITIAL.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
          IF i_record[] IS NOT INITIAL.
            it_attach[] = i_record[].
           CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
            EXPORTING
              LINE_WIDTH_SRC                    = '132'
              LINE_WIDTH_DST                    = '255'
              TRANSFER_BIN                      = ' '
             TABLES
               content_in                        = i_tline[]
               content_out                       = IT_ATTACH[]
            EXCEPTIONS
              ERR_LINE_WIDTH_SRC_TOO_LONG       = 1
              ERR_LINE_WIDTH_DST_TOO_LONG       = 2
              ERR_CONV_FAILED                   = 3
              OTHERS                            = 4
           IF sy-subrc <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
           ENDIF.
           it_attach[] = w_return-otfdata[].
           IF it_pdf_output[] IS NOT INITIAL.
             it_attach[] = it_pdf_output[].
            wa_mailbody-line = 'Dear Sir / Madam,'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Please be informed that we have remitted the payment towards your outstanding bills as per the attachment:'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Best Regards,'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Mary. G '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Finance department'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Intimate Fashions (I) Pvt Ltd'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = ' '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'Please do not print this email unless it is absolutely necessary.  Become environment friendly.'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'E-MAIL DISCLAIMER.'.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'If you are not the addressee of this mail, please delete this. Intimate Fashions does not accept any liability on the improper usage of this mail. It may also be legally '.
            APPEND wa_mailbody TO it_mailbody.
            wa_mailbody-line = 'privileged. Internet communications cannot be guaranteed to be timely, secure or virus free'.
            APPEND wa_mailbody TO it_mailbody.
            DESCRIBE  TABLE it_mailbody LINES lncnt.
            wa_doc_data-obj_descr  = 'Remittance details - Brunet'.
            wa_doc_data-expiry_dat = sy-datum + 10.
            wa_doc_data-obj_name   = 'TRIAL'.
            wa_doc_data-sensitivty = 'F'.
            wa_doc_data-doc_size   = lncnt * 255.
            CLEAR wa_pack.
            CLEAR wa_pack-transf_bin.
            wa_pack-doc_type   = 'RAW'.
             wa_pack-transf_bin = ' '.
            wa_pack-head_start = 1.
            wa_pack-head_num   = 0.
            wa_pack-body_start = 1.
            wa_pack-body_num   = lncnt.
             wa_pack-doc_size   = lncnt * 255.
            APPEND wa_pack TO it_pack.
            CLEAR: lncnt,wa_pack.
            DESCRIBE  TABLE it_attach LINES lncnt.
            wa_pack-transf_bin = 'X'.
            wa_pack-head_start = 1.
            wa_pack-head_num   = 1.
            wa_pack-body_start = 1.
            wa_pack-body_num   = lncnt.
            wa_pack-doc_type   = 'PDF'.
            wa_pack-obj_name   = 'VNPA'.
            CONCATENATE 'Vendor Payment Advice' '.PDF' INTO wa_pack-obj_descr.
             wa_pack-obj_descr  = 'Vendor Payment Advice'.
            READ TABLE it_attach INDEX lncnt.      "INTO WA_ATTACH
             wa_pack-doc_size   = ( lncnt - 1 ) * 255 + STRLEN( it_attach ).
            wa_pack-doc_size   = lncnt * 255.
            APPEND wa_pack TO it_pack.
            CLEAR: lncnt,wa_pack.
            wa_mailhead = 'Vendor Payment Advice'.
            APPEND wa_mailhead TO it_mailhead.
            CLEAR: wa_mailhead.
            LOOP AT pa_mail.
              wa_receiverid-receiver = pa_mail-low.
              wa_receiverid-rec_type = 'U'.
              APPEND wa_receiverid TO it_receiverid.
              CLEAR:wa_receiverid.
            ENDLOOP.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           wa_receiverid-receiver = 'xxxxx'.    "(I have given mail id here )
           wa_receiverid-rec_type = 'U'.
           APPEND wa_receiverid TO it_receiverid.
           CLEAR:wa_receiverid,lncnt.
            CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
              EXPORTING
                document_data                    = wa_doc_data
                put_in_outbox                    = 'X'
                commit_work                      = 'X'
           IMPORTING
              SENT_TO_ALL                      =
              NEW_OBJECT_ID                    =
              TABLES
                packing_list                     = it_pack
                object_header                    = it_mailhead
                contents_bin                     = it_attach[]
                contents_txt                     = it_mailbody
                 CONTENTS_HEX                     = it_attach
              OBJECT_PARA                      =
              OBJECT_PARB                      =
                receivers                        = it_receiverid
             EXCEPTIONS
               too_many_receivers               = 1
               document_not_sent                = 2
               document_type_not_exist          = 3
               operation_no_authorization       = 4
               parameter_error                  = 5
               x_error                          = 6
               enqueue_error                    = 7
               OTHERS                           = 8.
             IF sy-subrc = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
              LOOP AT it_zvnpa INTO wa_zvnpa.
                wa_zvnpa-flag = 'X'.
                MODIFY it_zvnpa FROM wa_zvnpa TRANSPORTING flag.
              ENDLOOP.
              MODIFY zvnpa FROM TABLE it_zvnpa.
            ENDIF.
          ENDIF.
          CLEAR: wa_zvnpa,it_zvnpa,it_otf,it_otf[],w_return,lncnt,
                 wa_doc_data,
                 wa_head,it_head,it_head1,
                 i_record,i_record[],
                 i_tline,i_tline[],
                 it_pack,
                 wa_pack,
                 it_mailhead,
                 wa_mailhead,
                 it_mailbody,
                 wa_mailbody,
                 it_receiverid,
                 wa_receiverid,
                 it_attach.
        ENDAT.
      ENDLOOP.
    ENDIF.

  • HTML to PDF conversion - problems with page-breaks and bookmarks

    Hello,
    My company is currently considering updating your software (from Acrobat 9 Pro to Acrobat XI Pro) and I’ve been assigned to research its features and make sure that it is a right fit for our goals. Basically we want to automate the whole process as much as possible and we want to create PDF directly from HTML. We’re providing a lot of content in HTML and we need a fast way to transfer it into PDF format. There are however some guidelines:
    We want page-breaks in is this kind of documents, and thus - your app needs to be able to interpret HTML and put them where we want to;
    We need to have bookmarks in there. Converter must be able to make them based on headlines from HTML source or afterwards, directly in PDF by using some auto-bookmarks feature;
    There has to be table of content generated, based on HTML Link Tags if possible. Here’s sample of TOC structure that we have currently:
    <A NAME="redirect">sample_text</A>
    <A HREF="#redirect">sample_text</A>
    Of course we can modify HTML in any way you want us to. The important thing for us is to make it work in PDF without the need to make a lot of manual changes after conversion.
    I’ve been messing with Acrobat 9 Pro and reading some documentation that you have provided and I’m convinced that point 3 is not a problem. I’m aware that Acrobat 9 Pro is not having any difficulties with links in document and they work fine in PDF format that has been created from HTML.
    Page-breaks on the other hand are bothering me. Your app is apparently ignoring every HTML code that the Internet is advising me to use to force page-break where I want. Honestly - I’ve tested like ten ways to make them and not even one was working. That’s why I’m asking for your help.
    Another problematic subject for me is the bookmarks creation. I know that they are not a problem if I’m doing DOC to PDF conversion. Then I’m able to decide what header should be used as a curtain level of bookmarks and everything is working great at the end. However - with direct HTML to PDF conversion - I really don’t know how to generate bookmarks that are based on the source of the input document. Is there any way to make fully working 2 level bookmark tree in this case? Here’s an example of the structure we want at the end:
    header1
    header2
    header2
    header1
    header1
    header2
    Could you please help me in finding the solutions? Just like I’ve mentioned - we can modify input HTML in any way, but in the end we would like to achieve our goals as quickly as possible.
    Please excuse my English.
    I am looking forward to your response,
    Lucas

    Frankly - we would like to avoid using Word. We are using it currently but there are long-term plans of improving whole conversion process, eliminate any mid-steps and automate as much as possible even though conversion is not going to be done unattended on a server. Thank you for your response, but I hope that maybe someone else would have any idea?

  • Scanner to pdf conversion problem

    For some unknown reason I recently started having problems with Adobe Acrobat X Pro (version 10.1.4) in converting via the scanner to pdf conversion basic text documents. It used to take a minute or two to convert a basic text document, now it is taking almost a half hour for a basic text one page conversion. Any ideas?

    Sorry for the inconvenience caused while scanning. We are actively trying to fix the issue and need help from users like you in narrowing down the fix. I’d request you to do the following when you run into this issue:
    • Please send me a private message or e-mail me at [email protected] immediately and I will get back to you within one business day for next steps
    • Please take a back-up or copy of any folders or files (e.g. App Data), in case you choose to delete them as a workaround

  • PDF conversion problem after password change

    I am in a loop: having changed password, Adobe insists on new subscription to PDF conversion before converting a document, but will not accept my submission because I already have a subscription with 4 months still to run before renewal. How do I sort this idiot out?

    Which subscription service did you purchase?  Adobe PDF Pack or ExportPDF?
    Could you make sure that you are signed in before converting documents?
    Go to the home screen of Adobe Reader for iOS.
    Tap My Account in the lower left corner.
    Tap the blue Sign In button.
    Sign in with your Adobe ID and new password.
    (Tap/click the image above to enlarge)
    Additionally, please take a look at this FAQ page for account information.
    Adobe ID | Sign in | Change email, password, or account information
    Please let us know if you need further assistance.

  • Converting output list to pdf ... plz chk the code....

    hi
        can any one execute the following code n tell me y its not workin...
    actually the file is getting downloaded and it opens by excel but not with the pdf.
    REPORT  z_output_pdf.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA:wa_ekpo TYPE t_ekpo,
    p_repid LIKE sy-repid,
        it_ekpo TYPE STANDARD TABLE OF t_ekpo.
    DATA : lv_repid TYPE sy-repid,
            lv_uname TYPE sy-uname.
    data:
      mstr_print_parms like pri_params,
      mc_valid(1)      type c,
      mi_bytecount     type i,
      mi_length        type i.
    data:
      mtab_pdf    like tline occurs 0 with header line,
      mc_filename like rlgrap-filename.
    lv_repid = sy-repid.
    lv_uname = sy-uname.
    SELECT ebeln matnr
    FROM ekpo
    INTO TABLE it_ekpo.
    LOOP AT it_ekpo INTO wa_ekpo.
      WRITE :/ wa_ekpo-ebeln, wa_ekpo-matnr.
    ENDLOOP.
    DATA: print_parameters TYPE pri_params,
            valid_flag(1) TYPE c,
            mi_rqident    LIKE tsp01-rqident.
    DATA:  p_linsz TYPE sy-linsz VALUE 132, " Line size
      p_paart TYPE sy-paart VALUE 'X_65_132'.  " Paper Format
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      IMPORTING
        out_parameters       = print_parameters
        valid                = valid_flag
      EXCEPTIONS
        invalid_print_params = 2
        OTHERS               = 4.
    *-- Explicitly set line width, and output format so that
    *-- the PDF conversion comes out OK
    print_parameters-linsz = p_linsz.
    print_parameters-paart = p_paart.
        print_parameters-pdest = 'LOCL'.
    *SUBMIT (lv_repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                    SPOOL PARAMETERS print_parameters
                    VIA SELECTION-SCREEN
                    AND RETURN.
    *IF sy-subrc  <> 0.
    WRITE :' error'.
    *ENDIF.
    *-- Find out what the spool number is that was just created
    PERFORM get_spool_number USING lv_repid
               lv_uname
      CHANGING mi_rqident.
    *-- Convert Spool to PDF
      call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
        exporting
          src_spoolid = mi_rqident
          no_dialog  = space
          dst_device = print_parameters-pdest
        importing
          pdf_bytecount                  = mi_bytecount
        tables
          pdf        = mtab_pdf
        exceptions
          err_no_abap_spooljob           = 1
          err_no_spooljob                = 2
          err_no_permission              = 3
          err_conv_not_possible          = 4
          err_bad_destdevice             = 5
          user_cancelled                 = 6
          err_spoolerror                 = 7
          err_temseerror                 = 8
          err_btcjob_open_failed         = 9
          err_btcjob_submit_failed       = 10
          err_btcjob_close_failed        = 11
          others     = 12.
    call function 'DOWNLOAD'
         exporting
              bin_filesize            = mi_bytecount
              filename                = mc_filename
             filetype                = 'BIN'
         importing
              act_filename            = mc_filename
         tables
              data_tab                = it_ekpo.
      write :' ============'.
          FORM get_spool_number *
          Get the most recent spool created by user/report              *
    -->  F_REPID               *
    -->  F_UNAME               *
    -->  F_RQIDENT             *
    FORM get_spool_number USING f_repid
         f_uname
                    CHANGING f_rqident.
      DATA:
        lc_rq2name LIKE tsp01-rq2name.
      CONCATENATE f_repid+0(8)
                  f_uname+0(3)
        INTO lc_rq2name SEPARATED BY '_'.
      DATA : ls_tsp01 TYPE tsp01,
            lt_tsp01 TYPE TABLE OF tsp01.
      SELECT * FROM tsp01
      INTO TABLE lt_tsp01
      WHERE  rq2name = lc_rq2name
      ORDER BY rqcretime DESCENDING.
      LOOP AT lt_tsp01 INTO ls_tsp01.
        f_rqident = ls_tsp01-rqident.
        EXIT.
      ENDLOOP.
    SELECT * FROM tsp01 WHERE  rq2name = lc_rq2name
    ORDER BY rqcretime DESCENDING.
       f_rqident = tsp01-rqident.
       EXIT.
    ENDSELECT.
      IF sy-subrc NE 0.
        CLEAR f_rqident.
      ENDIF.
    ENDFORM." get_spool_number
    plz chk n tell me where its goin wrong....
    Message was edited by:
            neha gupta

    Hi neha,
    i do it in this way:
    REPORT ZGRO_ITAB_PDF_SPOOL.
    DATA: BEGIN OF ITAB OCCURS 0,
             TEXT(72),
          END   OF ITAB.
    Länge der PDF-Datei in Byte
    DATA: PDF_FILESIZE TYPE I.
    DATA: BIN_FILESIZE TYPE I.
    Druckparameter mit Gültigkeit
    DATA: PARAMS      LIKE PRI_PARAMS,
          VALID       TYPE C.
    Spoolnummer
    DATA: SPOOL_NR     LIKE TSP01-RQIDENT,
          SPOOL_NR_DEL LIKE TSP01_SP0R-RQID_CHAR.
    PDF Ausgabetabelle
    DATA: BEGIN OF PDF_OUTPUT OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA: END   OF PDF_OUTPUT.
    DATA: PROGRAM(128) TYPE C.
    DATA: DATEI TYPE STRING VALUE 'D:TESTPDF.PDF'.
    DATA: APPL  TYPE STRING.
    START-OF-SELECTION.
    Druckparameter besorgen (hier für LOCA)
    Line-size sollte entsprechende der Ausgabe gesetzt werden
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          DESTINATION    = 'LOCA'
          LINE_SIZE      = 080
          IMMEDIATELY    = ' '
          NO_DIALOG      = 'X'
        IMPORTING
          OUT_PARAMETERS = PARAMS
          VALID          = VALID.
      CHECK VALID <> SPACE.
    Versorgen der internen Tabelle
      READ REPORT 'ZGRO_ITAB_PDF_SPOOL' INTO ITAB.
    Ausgabe der internen Tabelle mit den Druckparametern.
      NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG NO-TITLE NO-HEADING.
      LOOP AT ITAB.
        WRITE:/ ITAB.
      ENDLOOP.
      NEW-PAGE PRINT OFF.
    Spoolnummer besorgen
      SPOOL_NR = SY-SPONO.
    Konvertierung der Ausgabe nach PDF
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          SRC_SPOOLID              = SPOOL_NR
        IMPORTING
          PDF_BYTECOUNT            = PDF_FILESIZE
        TABLES
          PDF                      = PDF_OUTPUT
        EXCEPTIONS
          ERR_NO_ABAP_SPOOLJOB     = 1
          ERR_NO_SPOOLJOB          = 2
          ERR_NO_PERMISSION        = 3
          ERR_CONV_NOT_POSSIBLE    = 4
          ERR_BAD_DESTDEVICE       = 5
          USER_CANCELLED           = 6
          ERR_SPOOLERROR           = 7
          ERR_TEMSEERROR           = 8
          ERR_BTCJOB_OPEN_FAILED   = 9
          ERR_BTCJOB_SUBMIT_FAILED = 10
          ERR_BTCJOB_CLOSE_FAILED  = 11
          OTHERS                   = 12.
      CHECK SY-SUBRC = 0.
      SPOOL_NR_DEL = SPOOL_NR.
    Spool wieder löschen
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
        EXPORTING
          SPOOLID = SPOOL_NR_DEL.
      BIN_FILESIZE = PDF_FILESIZE.
    Download der Spools
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
          BIN_FILESIZE = BIN_FILESIZE
          FILENAME     = DATEI
          FILETYPE     = 'BIN'
        CHANGING
          DATA_TAB     = PDF_OUTPUT[].
    Programmpfad auf PC für PDF ermitteln
      CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
        EXPORTING
          DOCTYPE           = 'PDF'
        IMPORTING
          PATHNAME          = PROGRAM
        EXCEPTIONS
          PATH_NOT_FOUND    = 1
          PROGRAM_NOT_FOUND = 2
          NO_BATCH          = 3
          X_ERROR           = 4
          OTHERS            = 5.
    PDF ausführen
      APPL = PROGRAM.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
        EXPORTING
          PARAMETER   = DATEI
          APPLICATION = APPL.
    Programmende                                                        *
    Regards, Dieter

  • Smartforms to PDF conversion problem

    Hi experts,
    I have a fix that requires to send an email with a smartform as a pdf attachment. i was able to send the email with attachment but as i open the pdf file an error <b>''There was an error while opening a document. The file is damaged and file could not be repaired.'</b> or <b>'Adobe could not open *.pdf because it is either not supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).</b>
    I already debug my program and what i saw from my OTFDATA that is being returned by the smartform are <b>chinese characters and boxes</b> instead of hashes,alpa characters and etc (please note that my SF does not use any chinese script). I think that the error is due this.
    Has anyone encountered this type of problem? Please help.
    Also please note that this fix is migrated from a non-unicode dev box to a unicode system dev box
    Thanks in advance.

    hi tanmoy,
    i have installed the foxit reader and yet the error is still there. I believe that the error is coming from the otfdata that my smartform is generating.
    As an added information. My program is a Copy from another development box (BOX NA). When i run the program in BOX NA the code works fine and an email is sent to me, but on the dev box i am working right now it does not work fine.
    The program in the dev box is a the migrated version of the program in BOX NA.

  • HTML to PDF conversion problem

    Using Adobe Acrobat Pro X, I am having a problem converting HTML to interactive PDF, all of the HTML does not convert to the PDF.  My HTML code creates "tabbed" data when displayed via a browser.
    I have had success with converting one very LARGE tabbed, HTML file to PDF, but most will only convert the data on the 1st "tab".  Not sure what makes the other files different.  Please can anyone help?
    Thanks,
    Shalayne

    Shgreen3,
    Moving this to Acrobat forum, since this doesn't relate to our CreatePDF service.
    Dave

  • Word to PDF conversion problems

    When I create a PDF from a Word document, several files are generated (instead of one) before and after landscape pages within a large document.   How can I avoid this so that only one PDF is generated?  I get an error saying that the footers are outside the printable area, however, I don't have any problems physically printing the document and the print preview looks fine.

    One way would be to use Apple's way (instead of Microsoft's way) of creating a PDF file from Microsoft Word.
    Try creating it this way:
    While in Microsoft Word, when ready to create a PDF, go to File > Print and instead of printing, click the "PDF" button in the lower left, then click "Save as PDF" from the resulting dropdown.

  • PDF conversion problem with AutoVue 2D Professional 20.2.2. on Windows 2012R2

    I recently installed AutoVue 2D Professional 20.2.2. (30 day trial) on Windows 2012R2 terminal server as a customer demo.
    When trying to export a drawing to PDF (Menu: File/Convert), immediately after pressing OK I receive the following error message:
    Print driver host for applications
    Print driver host for applications has stopped working
    Windows can check online for a solution to the problem.
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: splwow64.exe
      Application Version: 6.3.9600.16384
      Application Timestamp: 5215f01d
      Fault Module Name: GDI32.dll
      Fault Module Version: 6.3.9600.17246
      Fault Module Timestamp: 53dc692a
      Exception Code: c0000005
      Exception Offset: 00000000000a922a
      OS Version: 6.3.9600.2.0.0.16.7
      Locale ID: 1033
      Additional Information 1: b450
      Additional Information 2: b4507c1c540710cc27a93518f693c849
      Additional Information 3: 4bdb
      Additional Information 4: 4bdb1ca1e3287a14667b2f708d05ca86
    When doing a web search for similar errors I find some particular versions of Adobe Reader and some HP printer drivers which caused this problem in the past.
    The advice of Adobe and HP was to update their software.
    This leads me to the opinion that this could rather be a problem of AutoVUE than Windows Server 2012.
    Has anyone else seen this behaviour?
    Does anyone know how to fix this error?
    Any help appreciated.
    Martin

    2012 Is not a certified platform for AutoVue, please read the documentation and install AutoVue on a certified platform
    If you require more information on specific support for a new platform, please contact your sales representative for a timeline for the official support ie update version of the broken functionality
    2012 modified the way drivers are to be implemented and previous versions are no longer compatible.

  • Acrobat 7.0 Pro Excel to pdf conversion problem

    I have a multiple page excel document with specific data on specific pages, basically making slides within excel.  When it prints to a printer, all is well and each page prints as it should.  However, when I convert it to pdf for distribution, it seems like the pages shrink and I get data from page 3 on the bottom of page 2, data from page 4 on the bottom of page 3, and so on until a few pages later, I have a page with the bottom half of one slide, and the top half of another.  Has anyone ever ran into this problem, or can anyone help find a solution?  Thanks!!
    Eric

    Two parts of AA 7 will not install on Win 7 (32 or 64-bit): the Adobe PDF printer and AcroTray.exe. You can install a separate color PS printer (either one from Adobe or possibly one for an HP color PS printer), change the name to Adobe PDF and change the port to FILE. That should do the job, but you will ALWAYS have an extra step in the creation of a PDF. You will have to print to the printer and a PS file will be created (probably with a PRN extension). You then have to open that file in Distiller to create a PDF. From my brief testing, this process will work and the rest of Acrobat and Distiller seem to work (though I did not test extensively). If this is unacceptable to you, then purchase AA XI (upgrade not available from AA 7).

  • Swf to pdf conversion problem

    Don't really know if this is the best forum for this, but....
    I have a few flash files (swf) which play perfectly well in
    Flash Player, in the browser, anywhere you like!
    I've recently been trying to convert these (with Pro 8) to
    pdf files, and the process seems to complete successfully.
    These new pdf files open and run well on my own PC, but after
    sending a few to another PC, the viewer gets the following warning
    - "'cannot play media clip because there is no player available
    that can play the media while satisfying the authors intention as
    well as your security settings'."
    I've checked the settings inside Multimedia, Multi Trust and
    Trust Manager but cannot see anything wrong.
    Can anyone help out with suggestions, please?!
    Thanks in advance....

    Upload the PDF files somewhere and we'll take a look for you.
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    "This has been one of the most impressive and thoroughly
    pleasant
    experiences of customer support I have ever come across -
    astounding!"
    Director - hedgeapple

  • MS Word 2007 to PDF Conversion problem links & bookmarks

    I have a 200 page MS Word 2007 document in which I added hyperlinks to jump to embedded bookmarks within the document.  I choose Save As --> PDF to convert the document.  Once the document is converted, some of my links work perfect (I can click on any part of the underlined word) and half of the links only allow me to click on the white space preceding the link and the previous word.  Further, words that start a line of text always work.  Words that are within a paragraph force me to use the white space to the left of the word.
    Please reference the example below:
    The first "Nick" below would work perfectly (i.e. I could click on any part of the word) and it would jump to the bookmark.
    The second reference to "Nick" will only be clickable in the space between "that" and "Nick" on the second line.
    The first "Sally" in line one will "look linked" but I am only able to click on the blank space between "that" and "Sally".
    The second "Sally" will work at anypoint in the word because it starts a line.
    Ely will only be clickable between the "." and "Ely".
    I have tried to save the document in every possible combination of settings.
    Thanks for the help.
    EXAMPLE: I would like to click on a persons name and have it jump to the end of the document where I have placed the biographies.
    Nick is going to the store because he believes that Sally will be there
    when he is back.  Ely thinks that Nick is really not a good person, but
    Sally thinks otherwise.

    Are you using "Adobe PDF" or "PDF or XPS?" I sounds like "Adobe PDF," but trying to be sure. Have you updated your Acrobat to the latest version? If not, try that.

  • ALV to PDF conversion problem

    Hi Gurus,
    I have 17 fields in ALV output ,which is to be converted into PDF report,
    in normal layout it is converting only 5 fields into pdf (truncating rest of the fields )
    while in landscape layout data is splliting into 2 lines ,and as a result pdf is not coming properly.
    is there any way of doing this ,so that all fields can come in single line of PDF without truncating the data.
    Please Respond,
    Points will be rewarded ,
    Regards
    Talwinder

    Hi
    try by using this FM 'CONVERT_OTF'
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    IMPORTING
    bin_filesize = bin_filesize
    BIN_FILE =
    TABLES
    otf = tab_otf_final
    lines = pdf_tab
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    err_bad_otf = 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.
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
    WINDOW_TITLE =
    DEFAULT_EXTENSION =
    DEFAULT_FILE_NAME =
    FILE_FILTER =
    INITIAL_DIRECTORY =
    WITH_ENCODING =
    PROMPT_ON_OVERWRITE = 'X'
    CHANGING
    filename = FILE_NAME
    path = FILE_PATH
    fullpath = FULL_PATH
    USER_ACTION =
    FILE_ENCODING =
    EXCEPTIONS
    CNTL_ERROR = 1
    ERROR_NO_GUI = 2
    NOT_SUPPORTED_BY_GUI = 3
    others = 4
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ************downloading the converted PDF data to your local PC*******
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = bin_filesize
    filename = FULL_PATH
    filetype = 'BIN'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = ' '
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    IMPORTING
    filelength = file_size
    TABLES
    data_tab = pdf_tab
    FIELDNAMES =
    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
    IF sy-subrc 0.
    ENDIF.

Maybe you are looking for