[android-developers] Re: Convert from Byte array to Pdf format

2012-06-07 Thread JK Park
You better use this : File dir = Environment.getExternalStorageDirectory(); String filename = "test.pdf"; File f = new File(dir, filename); f.createNewFile(); OutputStream outStream = new FileOutputStream(f); ... outStream.close(); -- You received this message because you are subscribed

[android-developers] Re: Convert from Byte array to Pdf format

2012-06-07 Thread RAJESH RAJARAM
Yes, Thank you JP... I got the solution... //Creating new File in sdcard byte[] bytes; File createfile = new File("/sdcard/Androidrox/"); createfile.mkdirs(); File outputFile = new File(createfile, "Sample.pdf"); FileOutputStream fos = new FileOutputStream(outputFile); //Writing into the PDF Fil

[android-developers] Re: Convert from Byte array to Pdf format

2012-06-06 Thread JP
Michael points in the right direction. You need write permission to / sdcard, which is known as external storage. Here's the documentation: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal You also need to add the WRITE_EXTERNAL_STORAGE permission to the app manifest.