Results 1 to 2 of 2

Thread: PDF Upload

  1. #1
    Join Date
    Jan 2002

    Unanswered: PDF Upload

    We have a web application, which uploads pdf files into Sybase database. These PDF files can be opened and viewed from the website.
    The application stores the PDF files into an image data type column of a Sybase table(ASE11.9.2). Some of the PDF files are getting truncated and are not opening when viewed from the web site. The Sybase DB is on an UNIX machine. We use an O' Reilly component for uploading the PDF files to the server's file system and then we use PreparedStatement to load the PDF file into the database.

    Most of the PDF files are uploading properly and while downloading, open without problems. But a few files give problems. The last part of these files get truncated.

    For eg, one pdf file which is 981,468 bytes long gets stored only upto 980,992 bytes. We did a file compare of the two files (the file before uploading and the downloaded one from the database), we find that the last few lines of this file gets truncated while storing in the database. Hence, when we open this file after downloading, we get the msg "There was an error opening the document. Could not repair file - acrobat reader"

    There is no problem with the size of these files as files as large as 5 MB gets stored properly. This problem occurs only for a few pdf files.

    There is no problem with the O'Reilly component (used for uploading) either, because the file gets stored properly in the server's file system after uploading. The problem occurs only when it is stored in the database (which uses PreparedStatement).

  2. #2
    Join Date
    Apr 2006
    I have the same problem, but in my case i upload a file which is 50kb and only store only 16 kb, this occure with any file (pdf, xls, doc, txt) i test that using jConnect30 and jCon12 and the problem continue. I apreciate any help, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts