Hello,
My requirement is to convert pdf to jpg format i have used PDFBOX api i have used file input stream and .am able to convert pdf to image by giving static path but if i tried with dynamically providing the dam pdf file path to this api; it is showing me error in this line.
PDDocument doc=PDDocument.load(new FileInputStream(s));
Where s is the path of the file in DAM . I am getting exception like :-The system cannot find the path specified
The possible error I can think of is that fileinputstream takes the local file path
Can anybody provide me a solution so as to how can we use the dam file path in inputfilestream I also used DAMUtil to get the assetbinary pat; but got the same error.
Or any other way to convert the pdf file to image in cq5?
Please provide solutions . I would be highly obliged.
Thanks,
Solved! Go to Solution.
Views
Replies
Total Likes
You can try this:
InputStream in = node.getNode("jcr:content").getProperty("jcr:data").getStream();
Views
Replies
Total Likes
You can try this:
InputStream in = node.getNode("jcr:content").getProperty("jcr:data").getStream();
Views
Replies
Total Likes
Thanks sam
I got solution with your reply.
Views
Replies
Total Likes
Thanks Rahul, Please mark it as resolve
Views
Replies
Total Likes