I am using itext and I have created a PDF file which I save to my c drive (c:\iText\File.pdf). I now want to open it from my java program. I want to pass the file name and open it. How do I do it? The code below just passes the fileName but I don't know how to open it.
public final void openPDF ()
{
String fileName = "C:\\iText\\File.pdf"
FileInputStream fis;
try
{
fis = new FileInputStream (fileName);
//Here I want to open the file???
fis.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}
public final void openPDF ()
{
String fileName = "C:\\iText\\File.pdf"
FileInputStream fis;
try
{
fis = new FileInputStream (fileName);
//Here I want to open the file???
fis.close();
}
catch (IOException e)
{
e.printStackTrace();
}
}