How to save unsaved changes to pdf file?

Hi,
I have a plugin for signature creation and verification created using acrobat sdk 9 and testing in acrobat x. When user initiates a signature creation process, in SigGetSigProperties() callback, i need to save any unsaved changes in the pdf file before i proceed with the signature creation process. To achieve this i added this code to SigGetSigProperties() callback:
// Save unsaved changes to file.
AVDoc avDoc = AVAppGetActiveDoc();
if( avDoc )
PDDoc pdDoc = AVDocGetPDDoc(avDoc);
// save unsaved changes
PDDocSave(pdDoc, PDSaveIncremental, NULL, NULL, NULL/*AVAppGetDocProgressMonitor(NULL)*/, NULL);
But this code generates this error:
Creation of this signature could not be completed.
Unknown error
supported information: CDSHandler-657
and
Creation of this signature could not be completed.
Error at File: ..\sources\DSHandler.cpp , Line: __LINE__
What am i doing wrong here? is this the right approach and is there a better way to achieve this?
thanks and regards,

Hi,
Actually, i need to save the pdf just before signing starts. saving at idle handler will not fullfil our requirements. how can i achieve this?
And keeping in mind the above requirement, when i think about adding a button or menu item, as u suggested, the only thing that comes in my mind is that, i disable the signature creation button and add my own button for signature. When its presses i save the pdf and internally call the acrobat's default signature button to start the signing process. But firstly i dont know if its possible. and secondly, there still remains the scenario where the user clicks an empty field to start the signing process.
what should i do?

Similar Messages

  • How to save print setup for pdf file so that every user can open and print w/o manually performing?

    Can is there a way to configure the print settings (i.e. paper size, orientation, etc.) and save this setting as part of the pdf file? I would like the users of pdf files to be able to open the file and simply print, without having to manually configure the print settings.

    Not sure if this will help. I got this information from the built-in help under Acrobat 9.
    Advanced
    Lists PDF settings, print dialog presets, and reading options for the document.In the PDF settings for Acrobat, you can set a base Uniform Resource Locator (URL) for web links in the document. Specifying a base URL makes it easy for you to manage web links to other websites. If the URL to the other site changes, you can simply edit the base URL and not have to edit each individual web link that refers to that site. The base URL is not used if a link contains a complete URL address.
    You can also associate a catalog index file (PDX) with the PDF. When the PDF is searched with the Search PDF window, all of the PDFs that are indexed by the specified PDX file are also searched.
    You can include prepress information, such as trapping, for the document. You can define print presets for a document, which prepopulate the Print dialog box with document-specific values. You can also set reading options that determine how the PDF is read by a screen reader or other assistive device.
    Create print presets
    A PDF can contain a set of print presets, a group of document-specific values that is used to set basic print options. By creating a print preset for a document, you can avoid manually setting certain options in the Print dialog box each time you print the document. It’s best to define print settings for a PDF at the time that you create it, but print presets provide a means to add basic print settings to a PDF at any time.
    Choose File > Properties, and click the Advanced tab.
    In the Print Dialog Presets section, set options and click OK.
    The next time you open the Print dialog box, the values will be set to the print preset values. These settings are also used when you print individual documents in a PDF Portfolio.
    Note: To retain a print preset for a PDF, you must save the PDF after creating the print preset.
    Print Dialog Presets
    Page Scaling
    Prepopulates the Page Scaling option in the Print dialog box with the option you choose:
    Default
    Uses the application default setting, which is Shrink To Printable Area.
    None
    Prevents automatic scaling to fit the printable area. This setting is useful for preserving the scale of page content in engineering documents, or for ensuring that documents print at a particular point size to be legal.
    DuplexMode
    For best results, the selected printer should support duplex printing if you select a duplex option.
    Simplex
    Prints on one side of the paper.
    Duplex Flip Long Edge
    Prints on both sides of the paper; the paper flips along the long edge.
    Duplex Flip Short Edge
    Prints on both sides of the paper; the paper flips along the short edge.
    Paper Source By Page Size
    Selects the option by the same name in the Print dialog box. Uses the PDF page size to determine the output tray rather than the page setup option. This option is useful for printing PDFs that contain multiple page sizes on printers that have different-sized output trays.
    Print Page Range
    Prepopulates the Pages box in the Print Range section of the Print dialog box with the page ranges you enter here. This setting is useful in a workflow where documents include both instruction pages and legal pages. For example, if pages 1–2 represent instructions for filling out a form, and pages 3–5 represent the form, you can set up your print job to print multiple copies of only the form.
    Number Of Copies
    Prepopulates the Copies box in the Print dialog box. Choose a number from 2 to 5, or choose Default to use the application default, which is one copy. This limitation prevents multiple unwanted copies from being printed.
    Thanks.

  • How to save classical report as pdf file

    hi all,
    i have created a classical report and now the requirement is to save that report as a pdf .
    is there any FM or any other method to do so?
    regards
    vijay

    Hi Vijay,
    Here is what I did for the same requirement:
    Calling for the PDF File name and path to save the file
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
          window_title         = 'Quote Bom PDF File'
          default_file_name    = l_file_name
          initial_directory    = l_fullpath
          prompt_on_overwrite  = 'X'
        CHANGING
          filename             = l_file
          path                 = l_path
          fullpath             = g_path
          user_action          = l_user
        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.
      IF l_user = 0.
    Please follow the following order for the subroutines which is creating the Spool Number, writing the* 
    statements on to the screen and then create the PDF file*
        PERFORM get_spool_created.
        PERFORM write_lines.
        NEW-PAGE PRINT OFF.
        g_spool_no = sy-spono.
        PERFORM download_as_pdf.
    Spool Number is getting created in this routine*
    FORM get_spool_created .
      DATA: pripar TYPE pri_params,
              arcpar TYPE arc_params,
              lay    TYPE pri_params-paart,
              lines  TYPE pri_params-linct,
              rows   TYPE pri_params-linsz.
      DATA: val(1), val1(1).
      DATA: dest TYPE pri_params-pdest VALUE 'LP01'.
      DATA: name TYPE pri_params-plist VALUE 'Testing'.
      DATA: i_pdf TYPE STANDARD TABLE OF tline.
      DATA: spono TYPE tsp01-rqident.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          destination              = dest
          no_dialog                = 'X'
          immediately              = ' '
        IMPORTING
          out_archive_parameters   = arcpar
          out_parameters           = pripar
          valid                    = val
          valid_for_spool_creation = val1
        EXCEPTIONS
          archive_info_not_found   = 1
          invalid_print_params     = 2
          invalid_archive_params   = 3
          OTHERS                   = 4.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      pripar-linsz = '132'.
      pripar-paart = 'X_65_132'.
      pripar-prdsn = 'LP01'.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          in_archive_parameters    = arcpar
          in_parameters            = pripar
          no_dialog                = 'X'
          list_name                = name
        IMPORTING
          out_archive_parameters   = arcpar
          out_parameters           = pripar
          valid                    = val
          valid_for_spool_creation = val1
        EXCEPTIONS
          archive_info_not_found   = 1
          invalid_print_params     = 2
          invalid_archive_params   = 3
          OTHERS                   = 4.
      IF sy-subrc EQ 0.
        NEW-PAGE NO-TITLE NO-HEADING PRINT ON
        NEW-SECTION
        PARAMETERS pripar
        ARCHIVE PARAMETERS arcpar
        NO DIALOG.
      ELSE.
        WRITE:/ 'Unable to create spool'.
        EXIT.
      ENDIF.
    ENDFORM.                    " GET_SPOOL_CREATED
    Write all your statements in this routine*
    *&      Form  WRITE_LINES
          text
    -->  p1        text
    <--  p2        text
    FORM write_lines .
    CALL THE ROUTINE WHICH WRITES ALL LINES TO THE SCREEN
    ENDFORM.                    " WRITE_LINES
    *Download the file as PDF
    *&      Form  DOWNLOAD_AS_PDF
          text
    -->  p1        text
    <--  p2        text
    FORM download_as_pdf .
      DATA:
              l_no_of_bytes TYPE i,
              l_pdf_spoolid LIKE tsp01-rqident,
              l_jobname     LIKE tbtcjob-jobname,
              l_jobcount    LIKE tbtcjob-jobcount,
              i_pdf         TYPE TABLE OF tline,
              i_cpdf        TYPE TABLE OF tline,
              l_spono       TYPE tsp01_sp0r-rqid_char,
              l_fullpath    TYPE string.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid              = g_spool_no
          no_dialog                = ' '
        IMPORTING
          pdf_bytecount            = l_no_of_bytes
          pdf_spoolid              = l_pdf_spoolid
          btc_jobname              = l_jobname
          btc_jobcount             = l_jobcount
        TABLES
          pdf                      = i_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.
      l_spono = g_spool_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
        EXPORTING
          spoolid = l_spono.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize            = l_no_of_bytes
          filename                = g_path
          filetype                = 'BIN'
        TABLES
          data_tab                = i_pdf
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6.
    ENDFORM.                    " DOWNLOAD_AS_PDF
    Thanks.
    Respond if you need any more help.

  • How to save an image as PDF?

    Hi,
    I need help o how to save an Image as PDF file?? is this possible?

    Under Getting Started in the welcome window click Create PDF
    Open your image
    File>Save As...PDF
    But I am finding that there are limitations on how big the image can be. I am trying to save a 20mb jpeg to pdf in acrobat and having issues. Good luck!

  • How do i change a pdf file to word

    How do i change a pdf file to a word document

    Using Adobe Acrobat you can use Save As -> Microsoft -> Word file

  • I am Required to Save before opening a PDF file in FF 10.0.1. How do I get FF to open the PDF file?

    I am Required to Save before opening a PDF file in FF 10.0.1. How can I get FF to open a PDF as the default?

    Check your add-ons:
    Cmd+Shift+A
    Make sure the Adobe Acrobat NPAPI Plug-in is set to Always Activate.

  • How can I CHANGE A pdf file to word or excell

    how do I change a pdf file to word or excell

    Hi Alfonzo,
    Here is a great 'getting started' guide that may help!
    Let me know!!
    Kindest regards, Stacy

  • How can i change a pdf file type to another file type

    how can i change a pdf file type to another file type

    You can copy the contents and paste it into a Word file. Just don't expect everything to transfer or to retain all of the formatting.

  • How do I change a PDF file to a MSPowerpoint File?

    How do I change a PDF file to a MSpowerpoint file

    Please see my reply to this question here: http://forums.adobe.com/message/5171167#5171167
    Thanks!

  • How can I buy the software to change the pdf file to excell file en costa rica

    How can I buy the software to change the pdf file to excell file???

    Not sure what you are expecting. Scale is just an abstract concept. The overall content and appearance of the drawing doesn't change. If you place the same drawing on teh same page and just change it's supposed scale, you have changed nothing effectively . As far as AI is concerned, all that matters is the size of the content in relation to the page its on. If you want things to appear at specific sizes, you must scale them accordingly on the page and also keep in mind that AI uses inches as its base unit. so essentialyl you need to define the DPI of the drawing.
    Mylenium

  • How to remove existing password in PDF file?

    I am using Acrobat 6.0, and would like to know on how to remove existing password in PDF file.
    When I try to open the PDF and saveas file using another name, it would not work.
    Does anyone have any suggestions?
    Thanks in advance for any suggestions

    File > Properties. Then under Security change Security method to None; enter the Control password when prompted. Then Save As.

  • How to extract text from a PDF file?

    Hello Suners,
    i need to know how to extract text from a pdf file?
    does anyone know what is the character encoding in pdf file, when i use an input stream to read the file it gives encrypted characters not the original text in the file.
    is there any procedures i should do while reading a pdf file,
    File f=new File("D:/File.pdf");
                   FileReader fr=new FileReader(f);
                   BufferedReader br=new BufferedReader(fr);
                   String s=br.readLine();any help will be deeply appreciated.

    jverd wrote:
    First, you set i once, and then loop without ever changing it. So your loop body will execute either 0 times or infinitely many times, writing the same byte every time. Actually, maybe it'll execute once and then throw an ArrayIndexOutOfBoundsException. That's basic java looping, and you're going to need a firm grip on that before you try to do anything as advanced as PDF reading. the case.oops you are absolutely right that was a silly mistake to forget that,
    Second, what do the docs for getPageContent say? Do they say that it simply gives you the text on the page as if the thing were a simple text doc? I'd be surprised if that's the case.getPageContent return array of bytes so the question will be:
    how to get text from this array? i was thinking of :
        private void jButton1_actionPerformed(ActionEvent e) {
            PdfReader read;
            StringBuffer buff=new StringBuffer();
            try {
                read = new PdfReader("d:/getjobid2727.pdf");
                read.getMetaData();
                byte[] data=read.getPageContent(1);
                int i=0;
                while(i>-1){ 
                    buff.append(data);
    i++;
    String str=buff.toString();
    FileOutputStream fos = new FileOutputStream("D:/test.txt");
    Writer out = new OutputStreamWriter(fos, "UTF8");
    out.write(str);
    out.close();
    read.close();
    } catch (Exception f) {
    f.printStackTrace();
    "D:/test.txt"  hasn't been created!! when i ran the program,
    is my steps right?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How come pages won't open PDF files made by Pages?

    How come pages won't open PDF files made by Pages?
    I have files I made with Pages and exported as PDF but I can't open them with pages to edit?
    Also, where are the recent files created by pages located? Can't find those to open either..

    Hi Tom,
    I was delighted when I signed up for Pages. Clunky yes, but it worked. I've been a graphic designer on a Mac for 25 plus years and have logged too many horror stories of "upgrade" wars which cost me massive lost time, data and money forcibly extracted just so I could finish a project.
    When I first used Pages in April of 2012? or there about, I was able to open Word documents exported to .pdf format, emailed to me, which I then dragged into Pages. I could make the changes I needed to make, export as a .pdf, return it back to my client which they could then edit on whatever it was they were using. I'm not a neophyte with this. I've had Original Photoshop as a stand alone, Quark (which locked users out 6 months after I purchased it.) Quark again, Freehand, Pagemaker, Illustrator, Photoshop again, Creative Suite for several upgrades, Acrobat Pro. 2 years ago I lost 6 years of Quicken data and had to and "upgrade" start over. This last go around I  had to "upgrade" my Apple ID - yes I had 2 on purpose, lost my Pandora One and my ability to get into the Tulsa County Library website.
    At this point, I'm retired and feel like what I've paid for in the past should WORK today. I have a 100+ page cookbook in Quark which I was able to export as a .pdf, that I've lost the tags too, Easier to start over. I have artwork that is hundreds of megs in Photoshop. Not the least bit interested in anybody's "cloud".
    Thanks for letting me vent. I'm determined to keep my equipment and software up to date so I can enjoy the skills I've acquired, but I completely cringe at Apple's antics. I truly hate it when I have to respond to some new "tip" or product offer. BooHiss. Happy Turkey Day. Pages is a "turkey" program.
    Best regards, mbd

  • Why can't I "Save as Text" a pdf file received as an email attachment?

    I can "Save as text" a pdf file which I have created in my own computer (that is, it goes into MS notebook that I then can Copy and Save as an MS Word file) but not when I receive a pdf as an email attachment. (The file is saved, but it is empty.) Why would I want to convert my own pdf back to text? Well, in case I no longer have the original Word document I suppose, but the thing is "Save as text" works with my pdf, but not with those I recieve from others. How come? Thanks!

    Is this a scanned PDF? If so, it must first be OCR'd.

  • How can i scan to a pdf file using hp officejet 4500 scan feature

    how can i scan to a pdf file using hp officejet 4500 scan feature.  only give a jpg or bit extension

    pf1tarac wrote: how can i scan to a pdf file using hp officejet 4500 scan feature.  only give a jpg or bit extension
    Hello pf1tarac, I don't believe that is possible. In order to create a PDF file, you would need Adobe Acrobat or some other PDF compatible product to save a scan to the PDF format.
    There are some free PDF programs available.  Here  is a link to one of them.
    Please click the White Kudos star on the left, to say thanks.
    Please mark Accept As Solution if it solves your problem.

Maybe you are looking for

  • Adobe Acrobat Pro Version 8.2 and Version 9.X Forms

    If I created a form in Adobe Acrobat Professional 8.2 why can't I open the form to make changes to the field name in version 9.X. The ability to change names for the fields is greyed out. Please help!!!

  • Import Catalog w/ LR 1.1 - ratings not visible in Bridge?

    Can't find this in any previous posts - so has anybody else seen this? The last two imports using the new feature of "catalogs" in LR 1.1 to transfer files from laptop MacBook Pro to desktop G-5 seemed to go ok until I went to Bridge. One was a catal

  • Show/hide elements in DW CS3

    I've just posted this question and got a reply from John Waller, thanks John, but what I mean is that I don't want to use layers, this has to do with the positioning in a table. I want to add images to a table which is in a layer so I can put margin-

  • Work Order Basic Start Date and Basic Finish Date to be changed

    Hi, Currently the business creates work orders without specifying the work resulting which the start and fish dates on work order are same. Also we have automatic scheduling turned off. In spite of this If I am trying to manual modify the basic start

  • How do I scroll a JTable as the selection cursor moves out-of-view?

    If a row is selected in a JTable, and the user navigates up and down using arrow keys, as the selection moves out of view, the table automatically scrolls. In my app, I am programmatically selecting rows, but if the selection is out of view, the tabl