You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Darrel Riekhof <da...@tririga.com> on 2002/08/16 00:19:58 UTC

Are PDFs best stored as CLOBs or BLOBs?

A little off topic, I apologize...

But, after FOP has generated our PDFs we would like to store them in an Oracle DB.  I'd prefer to put them in a CLOB field if possible, because TOAD and SQL Plus like CLOBs better than BLOBs.  But, we can't do that if putting a PDF in a CLOB would corrupt the data.

Darrel

Re: Are PDFs best stored as CLOBs or BLOBs?

Posted by Patrick Riedel <pr...@asllc.net>.
On Thu, 15 Aug 2002 15:19:58 -0700
"Darrel Riekhof" <da...@tririga.com> wrote:

> A little off topic, I apologize...
> 
> But, after FOP has generated our PDFs we would like to store them in
> an Oracle DB.  I'd prefer to put them in a CLOB field if possible,
> because TOAD and SQL Plus like CLOBs better than BLOBs.  But, we can't
> do that if putting a PDF in a CLOB would corrupt the data.
> 
> Darrel
> 

Why not just store the XML, and render the PDF on the fly, as needed? 
That way, if you make some layout change in the future, your old "docs"
will reflect the change.  If the docs need to be in their original
format, store the XSL too.  Or one copy of the XSL, with a relationship
to the data.


Patrick

RE: Are PDFs best stored as CLOBs or BLOBs?

Posted by Roland Neilands <rn...@pulsemining.com.au>.
Darrel,

> But, after FOP has generated our PDFs we would like to store 
> them in an Oracle DB.  I'd prefer to put them in a CLOB field 
> if possible, because TOAD and SQL Plus like CLOBs better than 
> BLOBs.  But, we can't do that if putting a PDF in a CLOB 
> would corrupt the data.

PDF Reference 3ed. section 2.2.1:
"PDF ?les must be transported
and stored as binary ?les, not as text ?les; inadvertent changes, such as
conversion between text end-of-line conventions, will damage the ?le and may
render it unusable."

Regards,
Roland.