Show PDF, JPEG inside of layout cell

How to show local PDF or JPEG file inside of the layout cell?

Content can be placed in layout cell using one of the following methods:

attachObject(contId) - method takes id of html container as a parameter
attachURL(url) - load page into an iframe
attachURL(url,true) - loads content by Ajax and places it as innerHTML.