Inserting embeded PDF to database

Hi,
I have created a pdf file(a Form) that I would like to put on my website where I could enter the data inside the form's fields, and then save the pdf file to a database(mysql).
If it can be done, how would I go about doing it?
What I have tried so far is to embed the pdf on the page; added a server behaviour(Insert Record) to add the file to the database with a column('Form') of type blob.
But that doesn't work. I get: 'Form' does not get a value

Flav, PHP is the tool you want to use for this task.
I can embed or iframe the pdf, but none of the database field types can recognize the file for insertion.
This is a very bad idea. You're better off building a PHP form to handle the records.
Could a simple php form include all individual fields(such as name, ordr#,etc..) and save that as one file instead of individually?
What do you mean by this - there is no file in database. They're only records. Individual records allow for more flexibility in data collation which is good for you in the long run even if you're not anticipating it now.
You can export and manipulate your data from MySQL Database in many ways - which is not possible from a PDF file.
There's another way - if you do not want to use a database, you can write the data captured from your PHP form into an XML file or a Plain TXT file on your server - however I wont recommend this method for security reasons.

Similar Messages

  • Inserting/Embedding PDF documents to an SAP Adobe Form

    Hi all,
    We have a requirement to insert/embed an external PDF documents to an SAP Adobe Form.
    Please provide pointers in this regard.
    Thanks,
    Sandhya

    Tim, a change like this is really simple.
    Formcalc and javascript are pretty similar - when I started developing AIF a year ago, I knew nothing about either of them... not that I know a whole lot now...
    The Help in Livecycle designer is actually quite helpful when it comes to scripting. Also, there's a google group you can join where you can email questions for help.
    You would just call the form like you normall do. The code is placed INSIDE your form "under" your field. There is a script editor built in to Adobe - Click Pallettes -> Script Editor to see it.
    there are many events on which to place code - you will need to find an event that triggers early - such as Form:Ready etc...
    Here's an example I have with 2 radiobuttons and a text box. If my 'yes' radiobutton is chosen, I make my input box visible
    if ( yes.rawValue eq "1" ) then
    data.Page2.grp2.func.rb.ifyes.presence  = "visible"
    endif
    Same concept if my 'No' button is chosen
    if ( no.rawValue eq "2" ) then
    data.Page2.grp2.func.rb.ifyes.presence  = "hidden"
    endif
    Both of these scripts are in the "click" event of the radiobutton.
    Lastly, here's a link to a great resource on Scripting
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    Scripting, on a moderate to small scale, will make your life a bit easier. Don't try to do too much, otherwise you'll find AIF may be the wrong tool for what you're trying to do.

  • Insert/Embedding PDF documents to SAP Adobe forms

    Hi all,
    We have a requirement to insert/embed an external PDF documents to an SAP Adobe Form.
    Please provide pointers in this regard.
    Thanks,
    Sandhya

    I would think the common sense approach would be to upgrade to ECC 6 first then migrate your forms.
    This seems to be just another step in the upgrade process.
    We went from 4.7 to ECC 6, but only had Smartforms and SAPScripts. We wound up just re-creating the forms directly in Adobe.

  • Error while trying to Insert a pdf file in database

    Hi All,
    I have sent this problem to Informix. By any chance if you had faced the same problem and found the solution, pls send mail to [email protected]
    Thanks
    Babu
    Hi there,
    I tried to insert a pdf file in to Informix database. I followed the guidelines
    given in the "InformixJDBC Driver
    Programmer's Guide". Actually my program works if i use
    PreparedStatement.setBytes method. But why
    PreparedStatement.setBinaryStream method is not working????.
    Here is the code snippet.....
    Connection conn = null;
    PreparedStatement ps = null;
    try
    File ff = new File("C:\\test.pdf");
    InputStream value = null;
    FileInputStream fileinp = new FileInputStream(ff);
    value = (InputStream) value;
    int len = (int) ff.length();
    System.out.println("len: " + len);
    conn = connect();
    String sql = "INSERT INTO dbep04m@inf10004:pg_wip_t (c_db,n_object,u_img) VALUES (\"2\",?,?)";
    if (conn != null)
    long stTime = System.currentTimeMillis();
    ps = conn.prepareStatement(sql);
    for (int ii=1;ii<=10000;ii++)
    ps.setInt(1,ii);
    ps.setBinaryStream(2,value,len);
    int rtVal = ps.executeUpdate();
    //System.out.println("return value" + rtVal);
    ps.close();
    conn.close();
    long endTime = System.currentTimeMillis();
    System.out.println("Total time taken for this run: " + (endTime-stTime)/(1000) + " seconds");
    catch (FileNotFoundException ex)
    ex.printStackTrace();
    catch (IOException ex)
    ex.printStackTrace();
    catch (SQLException ex)
    ex.printStackTrace();
    finally
    try
    if (ps != null)
    ps.close();
    if (conn != null)
    conn.close();
    catch (SQLException ex)
    ex.printStackTrace();
    I am getting the following error message.......
    java.sql.SQLException: Insufficient Blob data
    at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java)
    at com.informix.jdbc.IfxSqli.sendStreamBlob(IfxSqli.java, Compiled Code)
    at com.informix.jdbc.IfxSqli.sendBlob(IfxSqli.java, Compiled Code)
    at com.informix.jdbc.IfxSqli.sendBind(IfxSqli.java, Compiled Code)
    at com.informix.jdbc.IfxSqli.sendExecute(IfxSqli.java)
    at com.informix.jdbc.IfxSqli.sendCommand(IfxSqli.java)
    at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java)
    at com.informix.jdbc.IfxResultSet.executeUpdate(IfxResultSet.java)
    at com.informix.jdbc.IfxStatement.executeUpdateImpl(IfxStatement.java)
    at com.informix.jdbc.IfxPreparedStatement.executeUpdate(IfxPreparedStatement.java)
    at com.aexp.eaim.iu.isp.testcase.InsertBlob.insertUsingSql(InsertBlob.java, Compiled Code)
    at com.aexp.eaim.iu.isp.testcase.InsertBlob.main(InsertBlob.java:194)
    Here is the example given in the "Informix JDBC Driver Programmer's Guide". In the line maked bold, the blob size was hard coded as 10. Then
    why you are trying to find the file length???.
    try
    stmt = conn.createStatement();
    stmt.executeUpdate("create table tab1(col1 byte)");
    catch ( SQLException e)
    System.out.println("Failed to create table ..." + e.getMessage());
    System.out.println("Trying to insert data using Prepare Statement ...");
    try
    pstmt = conn.prepareStatement("insert into tab1 values (?)");
    catch (SQLException e)
    System.out.println("Failed to Insert into tab:" + e.toString());
    File file = new File("data.dat");
    int fileLength = (int) file.length();
    InputStream value = null;
    FileInputStream fileinp = null;
    int row = 0;
    String str = null;
    int rc = 0;
    ResultSet rs = null;
    System.out.println("Inserting data ...\n");
    try
    fileinp = new FileInputStream(file);
    value = (InputStream)fileinp;
    catch (Exception e) {}
    try
    pstmt.setBinaryStream(1,value,10); //set 1st column
    catch (SQLException e)
    System.out.println("Unable to set parameter");
    set_execute();
    public static void set_execute()
    try
    pstmt.executeUpdate();
    catch (SQLException e)
    System.out.println("Failed to Insert into tab:" + e.toString());
    e.printStackTrace();
    Best Regards
    Babu

    sorry!!!. There is an error in the code
    old code :
    value = (InputStream) value ;
    should be code :
    value = (InputStream) fileinp;

  • IWeb • How Do I Make Links in an Embedded PDF Document Open in New Page?

    On this page http://ostyn-newman.com/Gov_Downloads.html I have a PDF document that is embedded.  I tried an IFrame, but everything seemed to work better for me with the "Embed" code.  I am open to changing this if it would be better.  Here's my problem.  I can get the PDF document to display fine, but when I click on the links in the PDF document, the destination page opens in the embedded window.  I want the links to open the destination in a new window.
    I created the part of the document with most of the links (Pages 8.5 - 56) in Numbers and cut and pasted the table into a Pages document to create the completed document on our site.  I exported the docuemnt from Pages as a PDF file which is what you see.  There is also a link to download the file on the same page which works just fine.
    I have tried to insert the target="_blank" code but have not been able to get it to open the destination pages in a new window.  I am inserting the code by using the Insert/Widget/HTML Snippet Feature in IWeb.  Here is the code I am using.
    <embed src=
    "http://ostyn-newman.com/Media/GS27F0026XTextfile.pdf"
    style="width:850px; height:1000px;
    border-width:0px;
    border-color:#FFCC66;
    border-style:solid;"
    scrolling="auto" >
    </embed>
    I am not a coder and have just used Google to find the code to cut and paste and have played around with it to get to the place I am.  If anybody can tweak the code I have or offer some totally new code for me to insert that will get this to work would be greatly appreciated.
    Please keep in mind that most of the people who visit and use this page are government employees and are almost exclusivey using Explorer. 

    Thank you Jeff,
    I tried your original suggestion and now my inserted html widget reads
    <embed src=
    "http://ostyn-newman.com/Media/GS27F0026XTextfile.pdf"
    style="width:850px; height:1000px;
    border-width:0px;
    border-color:#FFCC66;
    border-style:solid;"
    scrolling="auto" target="_blank">
    </embed>
    It is live on my site.  You can see that the embedded document still opens the destination links in the embedded window.
    As for your other two suggestions, thank you as well.  I am aware of those techniques and did not use them because that is not how I want the other PDF links on the page to behave.  The catalog and autocad blocks downloads in the box at the top should simply download (or behave however the client's browser is configured to handle downloaded PDF documents or zip files.)  I don't intend to force those to open a new window.  I could also have our client click on a link to the PDF document and open it in a new page (like in your second suggestion) but I was hoping to embed the PDF and have it automatically viewable on our Download • Terms • Prices Page with all of the PDF search functions intact as well as the links be active.  My only complaint at this point is that the links in the embedded PDF document open the destination page in the embed window instead of a new window.  I only want to force a new window because the destination window doesn't behave properly when it opens in my embed window and it is difficult to figure out how to go back to the my PDF document when a destination window gets opened in the embed window.  The code you sent didn't do the trick.  Or maybe I didn't get it exactly right.  That is why I included it above.  Thanks for trying though.  I appreciate the effort.
    I would be willing to bypass the imbed/iFrame route altogether if I could just somehow drop the Pages document into the IWeb page and retain the search and link features, but I've not been able to figure out how to do that.  When I was exploring how to directly drop a Pages document into an IWeb page is when I stumbled on the method of embedding a PDF document into an IWeb page to retain the important search and link features.

  • How to insert a pdf or jpeg image into a blob column of a table

    How to insert a pdf or jpeg image into a blob column of a table

    Hi,
    Try This
    Loading an image into a BLOB column and displaying it via OAS
    The steps are as follows:
    Step 1.
    Create a table to store the blobs:
    create table blobs
    ( id varchar2(255),
    blob_col blob
    Step 2.
    Create a logical directory in the database to the physical file system:
    create or replace directory MY_FILES as 'c:\images';
    Step 3.
    Create a procedure to load the blobs from the file system using the logical
    directory. The gif "aria.gif" must exist in c:\images.
    create or replace procedure insert_img as
    f_lob bfile;
    b_lob blob;
    begin
    insert into blobs values ( 'MyGif', empty_blob() )
    return blob_col into b_lob;
    f_lob := bfilename( 'MY_FILES', 'aria.gif' );
    dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
    dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
    dbms_lob.fileclose(f_lob);
    commit;
    end;
    Step 4.
    Create a procedure that is called via Oracle Application Server to display the
    image.
    create or replace procedure get_img as
    vblob blob;
    buffer raw(32000);
    buffer_size integer := 32000;
    offset integer := 1;
    length number;
    begin
    owa_util.mime_header('image/gif');
    select blob_col into vblob from blobs where id = 'MyGif';
    length := dbms_lob.getlength(vblob);
    while offset < length loop
    dbms_lob.read(vblob, buffer_size, offset, buffer);
    htp.prn(utl_raw.cast_to_varchar2(buffer));
    offset := offset + buffer_size;
    end loop;
    exception
    when others then
    htp.p(sqlerrm);
    end;
    Step 5.
    Use the PL/SQL cartridge to call the get_img procedure
    OR
    Create that procedure as a function and invoke it within your PL/SQL code to
    place the images appropriately on your HTML page via the PL/SQL toolkit.
    from a html form
    1. Create an HTML form where the image field will be <input type="file">. You also
    need the file MIME type .
    2. Create a procedure receiving the form parameters. The file field will be a Varchar2
    parameter, because you receive the image path not the image itself.
    3. Insert the image file into table using "Create directory NAME as IMAGE_PATH" and
    then use "Insert into TABLE (consecutive, BLOB_OBJECT, MIME_OBJECT) values (sequence.nextval,
    EMPTY_BLOB(), 'GIF' or 'JPEG') returning BLOB_OBJECT, consecutive into variable_blob,
    variable_consecutive.
    4. Load the file into table using:
    dbms_lob.loadfromfile(variable_blob, variable_file_name, dbms_lob.getlength(variable_file_name));
    dbms_lob.fileclose(variable_file_name);
    commit.
    Regards,
    Simma........

  • How to keep embedded PDF's in an MS Word 2010 document during export to PDF with PDFmaker

    Hi,
    I am preparing in MS Word 2010 a Software Manual with embedded PDF's
    When I double click in MS Word on the inserted PDF, Acrobat opens the embedded PDF (these are A0 CAD Drawings).
    I want this functionality also after I have converted the MS Word file to a PDF with the PDFMaker add-in (Acrobat X Pro)
    Is this possible?
    Greetzzz,
    Gerben

    No. PDF files cannot be embedded within the pages of other PDF files.
    What you could do is attach the other files after the PDF has been created, then manually link to those attachments in Acrobat.

  • Cannot open embedded pdf files with Adobe Reader X

    When trying to open pdf files embedded as an object within MS Word or Excel (Office 2007) it comes up with the following message:
    "The program used to create this object is AcroExch. That program is not installed on your computer. To edit this object, you must install a program that can open the object."
    I had no problems with AR v9.
    Similarly, when I try to insert a pdf file as an object it comes up with exactly the same message.

    Sure.
    In Reader X:
    Edit->Preferences->General->uncheck "Enable Protected Mode At Start Up"
    Cheers

  • Embedded pdf files will not open

    Dell Laptop Windows XP up to date, Firefox 4.0, Adobe Reader 10.0.1
    Since updating to Firefox 4.0 certain embedded pdf files will not open forcing me to use my Internet Explorer browser to access these files. Tried all of the FAQ suggestions with no relief.
    NOTE: I can open previously opened files (Firefox 3.___) but not a new one.

    Thank you for the response. I insereted several .pdf files into my MS Word document where they show as Acobat icons. When in MS Word, I am able to double-click on the icons and the files open in Acrobat. I then converted the MS Word document to a .pdf. These icons now only show as pictures and do not open the original inserted .pdf documents.

  • Insert a PDF?

    Post Author: MaCook
    CA Forum: Crystal Reports
    I want to know if it is possible to insert a pdf document into CR XI. I see there are other ways to get the image into the report but they are not as legible as I would like them to be. Any thoughts or suggestions on this is greatly appreciated.

    Post Author: MaCook
    CA Forum: Crystal Reports
    Okay, I inserted a bmp. Show's up fine in the preview in Crystal. Went to CMC and hit preview-received following error"
    Error
    The database logon information for this report is either incomplete or incorrect.

  • How to insert embedded image into TextArea htmlText (and add IOErrorEvent.IO_ERROR listener).

    I unsuccessfully tried to find way to insert embedded image into TextArea via <img> tag. Can you point me out how to do this?
    Also, please, tell me how to handle IOErrorEvent from TextArea because adding IOErrorEvent.IO_ERROR listener to TextArea doesn't cause any effect when image url of img tag has not been found.
    Thanks

    i 've successfully inserted the image into the database... here is my code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package PMS;
    import java.io.File;
    import java.io.FileInputStream;
    import java.sql.Blob;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.SQLException;
    public class Browse_java
    static Connection con=null;
    public static void main(String args[])
    try{
    System.out.println("(browse.java) just entered in to the class");
    con = new PMS.DbConnection().getConnection();
    System.out.println("(browse.java) connection string is"+con);
    PreparedStatement ps = con.prepareStatement("INSERT INTO img_exp VALUES(?,?)");
    System.out.println("(browse.java) prepare statement object is"+ps);
    File file =new File("C:/Documents and Settings/Administrator/Desktop/Leader.jpg");
    FileInputStream fs = new FileInputStream(file);
    byte blob[]=new byte[(byte)file.length()];
    fs.read(blob);
    ps.setString(1,"C:/Documents and Settings/Administrator/Desktop/Leader.jpg");
    ps.setBytes(2, blob);
    System.out.println("(browse.java)length of picture is"+fs.available());
    int i = ps.executeUpdate();
    System.out.println("image inserted successfully"+i);
    catch(Exception e)
    e.printStackTrace();
    finally
    try {
    con.close();
    } catch (SQLException ex) {
    ex.printStackTrace();
    }

  • Embedding PDFs with live hyperlinks?

    Hi Everybody-
    I was originally updating my site just by copy/pasting text into textboxes on my site, but I have run into a lot of formatting issues between FF, Safari, and IE...surprise surprise.
    So...I want to just take all the text I plan to add each day, turn it into a PDF and just insert the PDF onto one of my pages. This works great and relieves me from the formatting nightmare. However, almost everything I will be adding has a hyperlink along with it. When viewing in Preview or Adobe, all the links are live, but when I insert the PDF into the webpage, users can not click the links.
    Is there a way to enable hyperlinks for the PDFs I am embedding?
    Thanks!

    "Preview in Firefox" means all PDF files are processed through and rendered by the Firefox PDF viewer.
    As you have noted this in-built PDF viewer is somewhat less than ready for prime time (similarly with the in-built PDF viewers available with other contemporary browsers).
    Eventually these browser vendors may deploy something that actually has some greater measure of ISO 32000 compliance.
    Until then always configure all browsers used to make use of what is provided with an install of Adobe Reader or Acrobat.
    Be well...

  • Cannot start the source application for this object - Embedded PDF in Excel 2007

    I am having a real issue which unfortunately is intermittant and I cannot pinpoint what is causing the problem. Basically I am inserting a PDF object into an Excel worksheet and immediately after I insert it, it will open fine. If you click off into another cell and save the sheet, then try to reopen the embedded PDF, you get the error "cannot start the source application for this object".
    Any help would be very much appreciated! Has anyone else run into this?

    I got that problem with one of my client after updating from Adobe  Reader 8.2 to 9.3.1. Excel version was 2002 and not 2007 but this is Adobe problem.
    Check that registry key for you Acrobat  Document key points to right AcroRead32.exe path at  HKEY_CLASSES_ROOT\CLSID\{B801CA65-A1FC-11D0-85AD-444553540000}\LocalServer32
    of  whatever key points to your Acrobat Document.
    I used  Sysinternals Procmon to monitor registry activity and found a line and  opened that registry location and found out Adobe Reader 8.0 path there.
    9:55:56,9021789     EXCEL.EXE    3236    RegOpenKey     HKCR\CLSID\{B801CA65-A1FC-11D0-85AD-444553540000}\LocalServer32     SUCCESS    Desired Access: Maximum Allowed
    I have seen that Adobe  Reader 9.3 doesn't update that registry and leaves Adobe Reader 8.0  values there. Same problem may be in other upgrade scenarios too.
    In addition to that my Windows 7 with Office 2007 that has never had anything but Adobe Reader 9.x versions didn't had anything on that registry location and it gave me same "cannot start the source application for this object" error. Putting that path "C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe" to LocalSever Default value fixed that too. Maybe Adobe should do something with this issue?

  • Help!  3 layer Dynamic List showing a Embedded PDF

    I'm trying to make a 3 layer dymanic lists that point to a MySQL database so that when the user selects a year, it will change the month list to the supported months for that year, and change the day field to the supported Days in that month.  Then once the day is selected the embedded PDF on the page will cange automatically to that issue.
    I already have Dreamweaver connected to the testing server with a recordset connected to the data.  I just think I'm setting it up wrong.
    In SQL the rows are like so....
    1896   |   January    |     01      |    C:\Library\January_01_1896.pdf
    1896   |   March      |     08      |    C:\Library\March_08_1896.pdf
    1897   |   January    |     01      |    C:\Library\January_01_1897.pdf
    So pick a year, month, day, and the Embedded PDF will change to the PDF on the last row.
    Right now it looks like this, but isn't working
    Select a Year:  ______
    Select a Month: ______
    Select a Day: _______
    EMBEDDED PDF
    I'm new to this, so try to avoid code please.  I know this all can be done in Dreamweaver with just commands.

    First off, you need to add a primary key to your table, so that each element has a unique identifier. Then you need to set up a query. Take a look at this tutorial video:
    http://www.youtube.com/watch?v=Kmawo5-JZWg
    I know you're trying to avoid code, but in order to accomplish what you are trying to do, you're going to have to learn a bit of SQL statements and PHP for proper connection.
    -Julia

  • Embedding PDF in Powerpoint - showing filename only not PDF content

    Hi all,
    I have automated a powerpoint presentation to embed PDF's  into a powerpoint presentation...
    this all works great but on some machines the content does not show, it only shows as the filename... it is still embeded but I want the content of the PDF to be displayed on the slide... which it does on some machines and I can't see what is different on the PC's that it won't do that on...
    The command used to insert the PDF is ...
            ActiveWindow.Selection.SlideRange.Shapes.AddOLEObject(Left:=60, Top:=20, FileName:=strOutputPath & "\" & strFilename, link:=msoFalse).Select
    which is just an insert object from file command...
    Further investigation showed that even trying to do this manually still will not bring in the content in... so then as a test i inserted the PDF in an Excel spreadsheet and the same result... content appears on some PC's some just show the filename only...
    PS... I don't have the 'Show as icon' checkbox selected when i'm doing this.
    Any pointers in the right direction would be very much appreciated...
    Cheers
    Steve.

    OK - so Postscript and EPS are programming languages while PDF is not.  So it's not the same thing.   But I understand the concept.
    An XObject is correct - but a Form XObject NOT a reference XObject.  If this is for Acrobat, and you want to do this the quick and easy way, then call over to the addWatermark() method in JavaScript and let it do all the heavy lifting for you.  Or, for native plugin code in Acrobat, there is the AFPDFormFromPage() API that will also do the work of creating the necessary CosObj for you.
    For PDFLibrary, you will need to do the work yourself as there isn't a high level API call.

Maybe you are looking for