Posts

Showing posts from May, 2012

How to embed a PDF document into HTML web page

Image
PDF the Portable Document Format, although created by Adobe in the early 90's is now an open standard ISO format for documents. It's a great way of converting propriety documents (excel, word etc.) into a easily viewable/exchangable format. Putting PDFs into web pages is increasing popular - you can view documents as they should appear with images and text formatted as the author intended. So.. how do you embed a pdf into a web page? The simple way is to use the  <object>  element. This assumes that the web browser has a PDF plugin - if not you can add a message to allow a direct download of the PDF instead. <object data="filename.pdf" type="application/pdf" width="100%" height="100%">   <p>Your web browser doesn't have a PDF plugin.   Instead you can <a href="filename.pdf">click here to   download the PDF file.</a></p> </object>

PL/SQL Functions

What is a Function in PL/SQL? A function is a named PL/SQL Block which is similar to a procedure. The major difference between a procedure and a function is, a function must always return a value, but a procedure may or may not return a value. The General Syntax to create a function is:  CREATE [OR REPLACE] FUNCTION function_name [parameters] RETURN return_datatype;  IS  Declaration_section  BEGIN  Execution_section Return return_variable;  EXCEPTION  exception section  Return return_variable;  END; 1)  Return Type:   The header section defines the return type of the function. The return datatype can be any of the oracle datatype like varchar, number etc. 2) The execution and exception section both should return a value which is of the datatype defined in the header section. For example, let’s create a frunction called ''employer_details_func' similar to the one created...