How much binary data (bytes) could I put in a transaction and how? I know that some people had put text, pdf and images in the blockchain.

I wonder which are the limits in order to have a minimum "bytes/btc" value in regarding the blockchain as a permanent database.

How much bytes could I put in a transaction and how many bitcoins I need to use (e.g. in fees) ?

And how this is possible, e.g. using satoshi client?
There's 3 related issues to your question where confusion may be arising.


The Blockchain can be used to hash PDFs or JPGs as a means of proof of existence - this is not the same as attaching the document itself
As seen here, it is (was?) possible to take hex code for a PDF/JPEG and use the resulting hex string as a public address. Splitting the file into ?? byte chunks then using these addresses as outputs in a Bitcoin transaction allows for things like photos of Nelson Mandela
Coinbase (source of mined coins) allows 100 bytes of arbitrary text in the block which was utilised in the Genesis Block, where encoded in hex (0x5468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73) was the phrase: 'The Times 03/Jan/2009 Chancellor on brink of second bailout for banks'. 


Find more interesting stuff encoded in the Blockchain at BitcoinStrings.com