Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when there are spaces in an imageExpression file name #2737

Open
TimSC opened this issue Nov 22, 2022 · 2 comments
Open

Getting error when there are spaces in an imageExpression file name #2737

TimSC opened this issue Nov 22, 2022 · 2 comments

Comments

@TimSC
Copy link

TimSC commented Nov 22, 2022

Context

  • MapFish print version: core-3.29.4
  • Java version: ?
  • OS: docker image osgeo/gdal:ubuntu-full-3.4.1 as base

Describe the bug

We are getting below error when we are using spaces in image path: 

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Byte data not found at: http://localhost:8070/webdav/Space In Name.jpg.
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:511)

Sample jrxml

<detail>
    <band height="15">
        <image>
            <reportElement x="0" y="0" width="50" height="10" />
            <imageExpression>
                <![CDATA["http://localhost:8070/webdav/Space In Name.jpg"]]>
            </imageExpression>
        </image>
    </band>
</detail>

The bug is discussed here https://community.jaspersoft.com/questions/1118421/getting-error-when-there-are-spaces-image-path-671 so I suspect this is upstream issue?

@sbrunner
Copy link
Member

It looks like that the filename should be URL encoded...

@TimSC
Copy link
Author

TimSC commented Nov 23, 2022

I've tried URL encoding and XML entities without success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants