static InputStream getFileDocumentContent (IContext context, IMendixObject fileDocument)
static File getFileDocumentContentAsFile (IContext context, IMendixObject fileDocument)
static void storeFileDocumentContent (IContext context, IMendixObject fileDocument, String fileName, InputStream inputStream)
static void storeFileDocumentContent (IContext context, IMendixObject fileDocument, InputStream inputStream)
static void storeImageDocumentContent (IContext context, IMendixObject imageDocument, InputStream inputStream, int thumbnailWidth, int thumbnailHeight)
static InputStream getImage (IContext context, IMendixObject imageDocument, boolean retrieveThumbnail)
Hi ,
Thanks for your reply. As suggested I have used InputStream inputStream = Core.getFileDocumentContent(getContext(), __PDFObeject); to get Input Stream.
I have used BufferedReader to read the lines in PDF. But it displaying junk values. How can I get the values present in PDF. ?
Below Code I have used :
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream), 1); String line = null; StringBuilder inputStringBuilder = new StringBuilder(); while ((line = bufferedReader.readLine()) != null) { inputStringBuilder.append(line); inputStringBuilder.append('\n'); line = bufferedReader.readLine(); System.out.println("Values in PDF are ::: "+line); }
And Also when I used BufferedReader bufferedReader = new BufferedReader(new InputStreamReader( new FileInputStream(PDFObeject.getName()), "UTF8")); Its showing access denied. Where I need to give access to this file ? Thanks.