Applied bug fix from trunk r1626465. 
Applied patch from jira issue - OFBIZ-5721 - Generate pdf doesn't open in new target.
Thanks Pierre for reporting the issue and providing patch for the same.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/release13.07@1626467 13f79535-47bb-0310-9956-ffa450edef68