import java.io.*; public class PUdf{ public static void main(String[] arguments){ pdf1 v=new pdf1(arguments[0]); v.convert(); } } class pdf1{ String line; pdf1(String line) { this.line=line; } void convert() { try { int n=line.length(); String line1=line.substring(0,n-4); FileOutputStream fil1=new FileOutputStream(line1+".pdf"); FileInputStream fil=new FileInputStream(line); boolean eof=false; while(eof!=true) { int input=fil.read(); if(input!=-1) fil1.write(input); else eof=true; } fil.close(); fil1.close(); } catch(FileNotFoundException f) { System.out.println("File Not Found"); } catch(IOException ioe) { System.out.println("Error"); } } }