Renaming the pdf files?

i have not found a way to rename the pdf files I have downloaded. In other apps it is easy to do so, but iBooks does allow just change the files and not other editing. Do you find this important?

What are the names directly after splitting?
1.pdf 2.pdf 3.pdf.....they are names as in sequence but practically there are not in sequence they are just vertically split
how do you get 56 files out of 56 pages if each file has 2 pages?
i got 56 files after splitting vertically.  each side will be splitted into  separate files
what is the naming convention the splitted  files should be renamed to?
any name but the sequence should be proper. if it says 1.pdf then it should point to 1st side
And what does this all have to do with Java?
need to know the programming logic on how we can do it in java.

Similar Messages

  • Can I rename a PDF file based on the metadata? (prefer a bulk rename)

    I had to do a file recovery on a hard drive with a program called TestDisk. It recovered 30GB+ of files but it recovered data by ignoring the partition/partition table. Because of this it uses its own naming structure during the recovery. The names of the files are f_______.XXX. I noticed that when I hover over the PDF files it actually displayed the original file name. I looked in the file proerties and noticed the PDF tab which contained this. Does anyone know if I can rename the file(s) using this data. The summary tab on the file properties is blank but the file name is located under this PDF tab (I didn't even know this existed). I don't know what I'm going to do with the rest of the files but being able to bulk rename 8GB of PDFs would be great!  :-)
    Thanks,
    Sundiata

    ok I'm not into programming and not familiar with Javascript. Does anyone know any websites to maybe assist me with making this batch file or at least provide enough basic Javascript info to get me started and I may be able to figure this out. Or is this Javascript something that is auto. something created during the renaming process creation?
    Thank

  • Name the PDF file with a field name

    Hi,
    I'm new to ES2 and Form creation in LiveCycle, my knowledge in scripts is very less or none i can say, if any one out there could help me out with this i'd be greateful.
    I have created a fillable PDF Form using LivecCycle ES2 and would like to know how to name the PDF file with a field value from the form when " save form " or " submit " button are clicked.
    Thanks in advance.
    Mithun.M.I

    You can save the form with name generated from a field's value, but therefore you will have to install a folder level script first and design a custom save button in your form.
    You cannot do this with the applications save or save as... buttons, and you also cannot rename a file on submit.
    Here's an example form and a folder level script. (Maybe to complicated fdr newbies)
    http://thelivecycle.blogspot.com/search/label/Save

  • Renaming a PDF file.

    In Adobe Reader X...when I rename a pdf file that is on my desktop, and upload it to a report it appears on the report with the previous name.  I want it to appear as I have renamed it.  Please help!

    Yes thank you......It is a real estate 4 page document that I need and have uploaded into my real estate listing, and that I have scanned from the file option to save on my desktop in pdf file. I then rename it by removing the last 5 zeros and pdf from the name I have previously  chosen in the printer Control Center 3. When I rename the file on my desk top it looks OK,  Then I go into the MLS real estate website and upload it after I locate it on my desktop.  It uploads fine and shows the filename at the left of the doc which is OK except the 5 zeros and pdf are there again.   I named the file ...12 Gardenville-pcd pdf.  and want it to appear that way after uploading, but it apears as 12 Gardenville-pcd pdf 00000 pdf. the way it came from the printer to desktop and before I renamed it.
    Sorry I couldn't reply sooner  Also yesterday a gentleman from Adobe Paid tech support (though I didn't have to pay) was able to take care of this problem, and I was able to successfully upload  a renamed doc, but when after I tried  to accomplish it on my own I was not able to succeed in doing so.
    Thanks,
    Joebif.

  • How to rename a pdf file on android 4.0

    how to rename a pdf file on android 4.0

    If you have the latest version of Adobe Reader, you can go to Documents, make sure that the view is set to "Folder View". Navigate to see the file you want to rename, and then you can use the "manage" button to go into a mode to select the file you want to rename, then tap the "rename" icon, which looks like a text cursor.

  • I have Windows 98 and need Acrobat to open up the pdf files for 5.0

    I have the old system, Windows 98 and presently have the free Adobe 5.0 version on my Compaq Presario Computer, and it is a 5242 model desktop.
    I have inadvertanly switched over to Compaq Carbon Copy 32 Version 5.0 but since, have uninstalled it and now, on each of what was the pdf files initially of which I have, of which is at least 16 or more, on each of those files, an error message comes up and says "PROGRAM NOT FOUND," and states the following: "Windows cannot find CCW32EXE. This program is needed for opening the pdf files." And then it has a dialogue box with the computer operational symbol in it as C:\ and then it wants me to locate it. I cannot locate it through the "auto" because, this sytem being so old, doesn't have a magnifying glass or a "search" tool to do this in the "My Computer Icon on the Desktop as the Compaq people wanted me to do. I would have to do this manually. I have already talked to the Compaq people on their chat line and because of this, they said they couldn't help me with this problem and referred me over to you.
    I've tried to find a download for 5.0, though I really don't think I need one since it is currently installed. I believe the proper way to fix this is to just convert the CCW32EXE over to the Acrobat pdf files and have those files opened and should open up all of my 15 or so files altogether at the same time because they all converted over to something else at the same time prior.
    Are you able to help me?
    But I believe to alleviate this problem, if you could just give me the information to be able to open up the pdf files to 5.0 and find out what download I may pursue, it might be able to correct this problem. I already have the 5.0 Acrobat installed, however.

    Hi Aandi,
    I have followed your directions and I have the old system of Windows 98, so I had to go to "programs" and come up to Acrobat 5.0 and once in there, all of the Window there is greyed out, although I can still go to the tool bars above in it. I went to "file" and went to "open" and from there, I received an "open" window with a dialogue box in it and in that dialogue box as I scrolled down, it wants me to put in there, one of the following, "desktop," "my documents," "3 1/2 floppy [A:]," "[C:]," "system _save [D:]," ""[E:," "[F:]," ete; of these which do I pick in the "open" dialogue box? and down at the bottom, is the FILE NAME and what do I put in there? Just below that, it has the FILES OF TYPE which has there Adobe pdf Files, in it's dialogue box. I hit these, but I still get an error message of which basically says, "NOT FOUND, please put in proper file name given." And I don't know actually where it is given.
    So, as you see, I am a novice in all of this and you can contact me at my e mail address which is [email protected]
    and should a reply be needed, I'll come back to the forum for a reply.
    I really need to open up the Adobe 5.0 pdf files. All of the pdf files, simultaneously went over to Compaq Carbon Copy 32 of which I since, uninstalled. But I really need to get back and open the Adobe 5.0 pdf files.
    And I want to thank you for your support and eagerly awaiting your help.
    Thanks,
    Now, I did do one of the following: I went to C: which came to Acobat 3 and I hit that which came to Reader and I hit that which came to the following: ACROBAT which gave me ACTIVE X - BROWSER - FONTS - HELP - OPTIONAL - PLUG-INS

  • While converting spool to PDF, no data is coming in the PDF file.

    Hi All,
    I am submitting a z program ZPR022_INNCOMETAX_REPORT_COPY1 (which has some output display) from Z_ITSLIP_MAIL.  I am creating a job, submitting the above program via JOB  to SAP-SPOOL.
    In program ZPR022_INNCOMETAX_REPORT_COPY1 , I am getting the run time job information and from there I am getting the spool id.  Now I am converting the spool id to a PDF.  This PDF should contain the output of the program ZPR022_INNCOMETAX_REPORT_COPY1.  This output is normal output using Write statement only.  But once the program is executed, I could find no data in the PDF file.  When I check in SM37 and SP02, both the JOB and the SPOOL are created.  What I feel is the program is not picking the spool id at the run time.  Could any one help me in this regard how to proceed.
    Please find the code below.
    Program 1.
    LOOP AT pernr.
      CLEAR p_job.
      p_stim = p_stim + 120.
      CONCATENATE'ITSlip' pernr-low p_job sy-datum INTO p_job SEPARATED BY
    space.
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname   = p_job
          sdlstrtdt = p_sdat
          sdlstrttm = p_stim
        IMPORTING
          jobcount  = l_jobcount.
      SUBMIT ZPR022_INNCOMETAX_REPORT_COPY1
        WITH pnptimr6 = 'X'
        WITH pnpbegda = period-low
        WITH pnpendda = period-high
        WITH pnppernr-low = pernr-low
        WITH pnpabkrs-low = 'IN'
           VIA JOB     p_job
            NUMBER  l_jobcount
           TO SAP-SPOOL WITHOUT SPOOL DYNPRO
               SPOOL PARAMETERS ls_params
               WITH immediately = 'X'
              KEEP IN SPOOL = 'X'
                  AND RETURN.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount  = l_jobcount
          jobname   = p_job
          strtimmed = 'X'
         PRDMINS = 2.
          sdlstrtdt = p_sdat
          sdlstrttm = p_stim.
    ENDLOOP.
    Program 2.
      IF sy-batch EQ 'X'.
        LOOP  AT pnppernr.
          SELECT SINGLE * FROM pa0105
            WHERE pernr EQ pnppernr-low
              AND subty EQ '0010'
              AND endda EQ '99991231'.
          p_email1 = pa0105-usrid_long..
          PERFORM get_job_details.
          PERFORM obtain_spool_id.
          PERFORM convert_spool_to_pdf.
          PERFORM process_email.
         IF sy-sysid = c_dev.
            WAIT UP TO 5 SECONDS.
            SUBMIT rsconn01 WITH mode   = 'INT'
                            WITH output = 'X'
                            AND RETURN.
         ENDIF.
        ENDLOOP.
      ELSE.
        SKIP.
        WRITE:/ 'Program must be executed in background in-order for spool'
                'request to be created.'.
       EXPORT gd_spool_nr TO MEMORY ID 'SPOOLTOPDF'.
      ENDIF.
    ENDFORM.                    " SEND_MAIL
    *&      Form  get_job_details
          text
    -->  p1        text
    <--  p2        text
    FORM get_job_details .
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          eventid                 = gd_eventid
          eventparm               = gd_eventparm
          external_program_active = gd_external_program_active
          jobcount                = gd_jobcount
          jobname                 = gd_jobname
          stepcount               = gd_stepcount
        EXCEPTIONS
          no_runtime_info         = 1
          OTHERS                  = 2.
    ENDFORM.                    " get_job_details
    *&      Form  obtain_spool_id
          text
    -->  p1        text
    <--  p2        text
    FORM obtain_spool_id .
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        MESSAGE s004(zdd) WITH gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.                    " obtain_spool_id
    *&      Form  convert_spool_to_pdf
          text
    -->  p1        text
    <--  p2        text
    FORM convert_spool_to_pdf .
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = gd_spool_nr
          no_dialog                = c_no
          dst_device               = c_device
        IMPORTING
          pdf_bytecount            = gd_bytecount
        TABLES
          pdf                      = it_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.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " convert_spool_to_pdf
    *&      Form  process_email
          text
    -->  p1        text
    <--  p2        text
    FORM process_email .
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    ENDFORM.                    "process_email
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'IT Declaration'.
      CONCATENATE 'ITSLIP' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'IT FORM for this month'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   TABLES it_mess_bod
                                          it_mess_att
                                    USING p_email1
                                          'MindTree Payroll team'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 CHANGING gd_error
                                          gd_reciever.
    ENDFORM.                    " process_email
    *&      Form  send_file_as_email_attachment
          text
         -->P_IT_MESS_BOD  text
         -->P_IT_MESS_ATT  text
         -->P_P_EMAIL  text
         -->P_4422   text
         -->P_4423   text
         -->P_GD_ATTACHMENT_NAME  text
         -->P_GD_ATTACHMENT_DESC  text
         -->P_P_SENDER  text
         -->P_GD_SENDER_TYPE  text
         <--P_GD_ERROR  text
         <--P_GD_RECIEVER  text
    FORM send_file_as_email_attachment TABLES it_message
                                              it_attach
                                        USING p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     CHANGING p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
              t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
              t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
              w_cnt TYPE i,
              w_sent_all(1) TYPE c,
              w_doc_data LIKE sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = 'X'
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = w_sent_all
        TABLES
          packing_list               = t_packing_list
          contents_bin               = t_attachment
          contents_txt               = t_attachment
         contents_txt               = it_message
          receivers                  = t_receivers
        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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    "send_file_as_email_attachment
    Points will be rewarded.
    Regards,
    Balaji

    Hi,
    I think you are retrieving the spool before the entire spool is generated.
    Put the following logic to retrieve spool iD
    CHECK WHETHER STATUS OF JOB IS COMPLETED OR CANCELLED
      WHILE 1 = 1.
    GET THE JOB STEPLIST WHICH HAS THE SPOOL NUMBER
        CALL FUNCTION 'BP_JOB_READ'
          EXPORTING
            job_read_jobcount           = w_jobcount
            job_read_jobname            = w_jobname
            job_read_opcode             = '35'
      JOB_STEP_NUMBER             =
         IMPORTING
           job_read_jobhead            = wa_jobhead
         TABLES
           job_read_steplist           = i_jobsteplist
    CHANGING
      RET                         =
       EXCEPTIONS
         invalid_opcode              = 1
         job_doesnt_exist            = 2
         job_doesnt_have_steps       = 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.
    BEGIN OF INSERTION U179942 E1BK928781
    IF STATUS OF JOB IS COMPLETED(F) OR CANCELLED(A)
    READ THE JOBSTEPLIST & GET THE SPOOL NUMBER
        IF wa_jobhead-status =  c_a OR wa_jobhead-status = c_f.
          READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.
          CHECK wa_jobsteplist-listident <> space.
          w_spool_number = wa_jobsteplist-listident.
          EXIT.
        ENDIF.
      ENDWHILE.
    Best regards,
    Prashant

  • Doesn't open the PDF file (i.e. articles, books pages). It appears a black page. Thanks for help

    Safari doesn't open the PDF file (articles, book page, etc). It appears a black page. Before that it was working perfectly. Thank for your help

    Try this ...
    Open a Finder window then from the menu bar click Go > Go to Folder
    Type or copy paste the following:
    /Library/Internet Plug-Ins
    Click Go.
    If you see the:  AdobePDFViewer plugin (or anything Adobe related) in the Internet Plug-Ins folder, move it to the trash.
    Restart your Mac and try opening a PDF file.

  • How to read the and Write the PDF file give me the solution

    Hi all,
    How to read the and Write the PDF file give me the solution
    My coding is
    import java.io.File;
    import com.asprise.util.pdf.PDFImageWriter;
    import com.asprise.util.pdf.PDFReader;
    import java.io.*;
    import java.io.FileOutputStream;
    public class example {
    // public example() {
         public static void main(String a[])
              try
              PDFReader reader = new PDFReader(new File("C:\\AsprisePDF-DevGuide.pdf"));
                   reader.open(); // open the file.
                   int pages = reader.getNumberOfPages();
                   for(int i=0; i < pages; i++) {
                   String text = reader.extractTextFromPage(i);
                   System.out.println("Page " + i + ": " + text);
    // perform other operations on pages.
    PDFImageWriter writer = new PDFImageWriter(new FileOutputStream("c:\\new11.pdf"));
                   writer.open();
                   writer.addImage("C:\\sam.doc");
                   writer.close();
                   System.out.println("DONE.");
    reader.close();
              catch(Exception e){System.out.println("error:"+e);
              e.printStackTrace();
    I get the pdf content then it returns the string value but ther is no option to write the string to PDF, and we only add a image file to PDF,but i want to know how to wrote the string value to PDF file,
    Please give response immtly
    i am waiting for your reply.
    thanks,
    Suresh.G

    I have some question flow
    How library to use this code.
    I try runing but have not libary.
    Please send me it'library
    Thank you very much!

  • I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    You should be able to just place them in your Books library in iTunes and check to ensure that your Book library is configured to sync to your iPod when you sync your iPod to iTunes.

  • How can I move a pdf file from my pc to my ipad without overwriting all the pdf files in my ipad?

    How can I move a single pdf file from my pc to my ipad without overwriting all the pdf files already in my ipad?

    Email PDF to iPad.

  • Just converted a PDF document to Word, none of the graphics from the PDF file show up in the Word document?

    Just converted a PDF document to Word, none of the graphics from the PDF file show up in the Word document?
    What do I need to do to bring the graphics and exhibits from the PDF file to the Word file?

    Hi jackp52432917,
    How was that PDF file created? Please see  Will Adobe ExportPDF convert both text and form... | Adobe Community
    It could be that the PDF file you're converting was created using a third-party application, and it doesn't contain all the information necessary to ensure a clean conversion. Have you had similar troubles converting other PDF files?
    Best,
    Sara

  • Error opening the PDF file while sending the PDF as an attachment

    Hi All,
      I am sending a PDF as an attachment in the mail. I am using the code pasted on 'Jul 28, 2006 8:59 AM' subject OTF Format of Purchase Order in email unreadable.
      My problem is when I open the attachment in SOST or in the mail, I get the error message "Adobe could not open *.PDF because it is either not a supported file type or because the file type has been corrupted."
      Please let me know if anybody has faced such an issue.
    The code is found below.
    FORM MAIL_OBJECT                                              *
          This routine receives OTF data. OTF data is converted to PDF
          format and send to the Partner's email address
    FORM mail_object TABLES otf_data STRUCTURE itcoo .
      DATA: pdf_size TYPE i,                             " PDF Size
            pdf_itab_size TYPE i,                        " Attachment size
            mailtxt_size TYPE i,                         " Text in mail size
            l_vbeln LIKE vbdka-vbeln.                    " Order Doc
      DATA:
      it_mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,    " Mail Text
      it_pdf TYPE TABLE OF tline WITH HEADER LINE,           " OTF output
      it_mailpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, " Dist details
      it_mailhead LIKE solisti1   OCCURS  1 WITH HEADER LINE," Header data
      it_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,   " Rec List
      it_pdfdata LIKE solix OCCURS 0 WITH HEADER LINE.  " Attachment data
      DATA: it_doc_att LIKE sodocchgi1.                 " Attri of new doc
      DATA: BEGIN OF it_pdfout OCCURS 0,                " PDF in 255 length
               tline TYPE char255,
            END OF it_pdfout.
    Sales doc and Customer
      DATA: BEGIN OF i_vbeln OCCURS 0,
              vbeln LIKE vbpa-vbeln,       " Sales Document
              adrnr LIKE vbpa-adrnr,       " Customer
            END   OF i_vbeln.
    Sender Address no and SMTP address
      DATA: BEGIN OF i_addrs OCCURS 0,
              addrnumber LIKE adr6-smtp_addr,
              smtp_addr  LIKE adr6-smtp_addr,
            END   OF i_addrs.
    Convert OTF to PDF
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          format       = 'PDF'
        IMPORTING
          bin_filesize = pdf_size
        TABLES
          otf          = otf_data
          lines        = it_pdf.
    Make each line 255 characters
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
        TABLES
          content_in  = it_pdf
          content_out = it_pdfout.
    Create the PDF File
      CLEAR it_pdfdata.
      REFRESH it_pdfdata.
    it_pdfdata[] = it_pdfout[].
      LOOP AT it_pdfout.
        MOVE it_pdfout-tline TO it_pdfdata-line.
        APPEND it_pdfdata.
        CLEAR it_pdfdata.
      ENDLOOP.
      DESCRIBE TABLE it_pdfdata LINES pdf_itab_size.
    Text in the mail.
      it_mailtxt-line  = 'ORDER ACKNOWLEDGEMENT'.
      APPEND it_mailtxt.
      it_mailtxt-line  = ' This is a test mail,  Line Number--1'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--2' &
                        ' This is a test mail,  Line Number--2'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--3' &
                        ' This is a test mail,  Line Number--3' &
                        ' This is a test mail,  Line Number--3'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4' &
                        ' This is a test mail,  Line Number--4'.
      APPEND it_mailtxt.
      it_mailtxt-line = ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5' &
                        ' This is a test mail,  Line Number--5'.
      APPEND it_mailtxt.
      DESCRIBE TABLE it_mailtxt LINES mailtxt_size.
    Document Number for Output
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          input  = vbdka-vbeln
        IMPORTING
          output = l_vbeln.
    Attributes of new doc
      CONCATENATE 'Order' space 'Acknowledgement' space l_vbeln
                  INTO it_doc_att-obj_descr SEPARATED BY space.
      it_doc_att-sensitivty = 'F'.
      it_doc_att-doc_size   = mailtxt_size * 255.
    Create Pack to text in mail body.
      CLEAR it_mailpack-transf_bin.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 0.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = mailtxt_size.
      it_mailpack-doc_type     = 'RAW'.
      APPEND it_mailpack.
    Create Pack to PDF Attach.
      it_mailpack-transf_bin   = 'X'.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 1.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = pdf_itab_size.
      it_mailpack-doc_type     = 'PDF'.
      CONCATENATE l_vbeln '.pdf' INTO it_mailpack-obj_name.
      CONCATENATE 'Order Ack' space l_vbeln INTO it_mailpack-obj_descr.
      it_mailpack-doc_size     = pdf_itab_size * 255.
      APPEND it_mailpack.
    *Get email addresses based on Sales document.
      SELECT vbeln adrnr INTO TABLE i_vbeln
             FROM vbpa
             WHERE vbeln = vbdka-vbeln AND
                   parvw = nast-parvw.
      IF NOT i_vbeln[] IS INITIAL.
        SELECT addrnumber smtp_addr INTO TABLE i_addrs
               FROM adr6 FOR ALL ENTRIES IN i_vbeln
               WHERE addrnumber =  i_vbeln-adrnr AND
                     smtp_addr NE space.
      ENDIF.
      IF i_addrs[] IS NOT INITIAL.
        LOOP AT i_addrs.
          it_reclist-receiver   = i_addrs-smtp_addr.
          it_reclist-express    = 'X'.
          it_reclist-rec_type   = 'U'.
          it_reclist-notif_del  = 'X'. " request delivery notification
          it_reclist-notif_ndel = 'X'. " request not delivered notification
          APPEND it_reclist.
          CLEAR: i_addrs.
        ENDLOOP.
      ENDIF.
    Call FM to send email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = it_doc_att
          put_in_outbox              = 'X'
        TABLES
          packing_list               = it_mailpack
          object_header              = it_mailhead
          contents_txt               = it_mailtxt
          contents_hex               = it_pdfdata
          receivers                  = it_reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorizationfiltered= 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.
      ENDIF.
    ENDFORM.                    " MAIL_OBJECT
    Regards,
    Ajith

    Hi Ajith !!
    Please refer this link :
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Here a spool output is converted into PDF and then sent as an email.
    I think instead of using FM to change the width, try the logic mentioned in the link.
    Also instead of FM CONVERT_TO_OTF use :
    1. CONVERT_OTFSPOOLJOB_2_PDF
    I hope this should solve the problem.
    I had referred the same program from the link and it worked absolutely fine. Also check the adobe acrobat version, i guess old version doesnt support SAP, though not very sure.
    Best regards,
    Prashant

  • Can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF

    can we control the PDF file name that is generated by BI Publisher based on the content in the input PDF?

    No, there isn't. The way you're using the file is not recommended. You
    should use a review tracker to avoid getting in the way of one another.

  • Ever since I installed Safari 5.1 I can no longer access the pdf files on my website. I keep on getting an error with Webkit2webprocess.exe telling me that LogTransport2.dill was not found. Please help..

    Ever since I installed Safari 5.1 on my PC (XP) I can no longer access the pdf files on my website. I have no problems with Chrome and  Firefox. I keep on getting a message from WebKit2WebProcess.exe that the LogTransport2.dill was not found. (I HATE PCs...) I tried reinstalling Acrobat 9. I tried reinstalling Safari. I even tried an older version of Safari. Nothing Helped.  Others have tried it on their machine, and it worked fine. But I do not know what is the matter with mine. I suspect the root cause is the missing LogTransport2.dill file. But I do not know how to go about getting it.  Your help is truly appreciated. My website is http://www.hlmartworks.com.

    I have also found the article that provides 3 solutions but none of the solutions worked.

Maybe you are looking for

  • Apex 4 application to be made availabel in Apex 3

    Hello, I am in complete mess right now. We were planning to upgrade our APEX from version 3.2 to 4. The development enivironment was set in Apex 4 and i finished my project believing that by the time my project is ready Proodcution environment will b

  • How to use RGB in GanttBarStyleEdit?

    I use a script based on GanttBarEditSyle to set up standard bar styles.  The problem is that this apears to be limited to the 16 basic pjColor colors.  But if I use the menu, I can assign any RGB color.  Is there any way to change the bar color in VB

  • [SOLVED] Intel x3100 Laptop Video Card: which driver to use?

    I tried the xf86-video-intel package, but when I try to start X, it returns the "no screens found" error, with OR without a xorg.conf. Last edited by trusktr (2010-08-20 19:37:28)

  • Error in Loading Process

    While loading some Datasources in BW DEV  I am getting the following error. Overall Status: Errors Occurred: or Missing Message Requests.(messages): everything OK Extraction(message): Missing Messages Transfer(idocs and TRFC):Errors Occurred Request

  • Uncaught Exception downloading document

    I'm getting 'Uncaught Exception java.lang.ClassCastException' when I try to download a document from a secure website (https), using the blackberry browser on Blackberry Curve 8310. What does this error indicate?  Any ideas for resolving this one? Th