How to change CQ5.6.1 dam path to local file path like c:\\x\y\z to dam path - | Community
Skip to main content
Level 3
October 16, 2015
Solved

How to change CQ5.6.1 dam path to local file path like c:\\x\y\z to dam path -

  • October 16, 2015
  • 3 replies
  • 1681 views

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,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sam205505050

You can try this:

InputStream in = node.getNode("jcr:content").getProperty("jcr:data").getStream();

3 replies

Sam205505050Accepted solution
Level 6
October 16, 2015

You can try this:

InputStream in = node.getNode("jcr:content").getProperty("jcr:data").getStream();

Level 3
October 16, 2015

Thanks sam

I got solution with your reply.

Level 6
October 16, 2015

Thanks Rahul, Please mark it as resolve