You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Marco Huber (JIRA)" <ji...@codehaus.org> on 2009/04/03 13:32:12 UTC

[jira] Created: (MPDF-7) Relative images are not recognised in sub folders

Relative images are not recognised in sub folders
-------------------------------------------------

                 Key: MPDF-7
                 URL: http://jira.codehaus.org/browse/MPDF-7
             Project: Maven 2.x PDF Plugin
          Issue Type: Bug
    Affects Versions: 1.0
         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
            Reporter: Marco Huber
         Attachments: pdf-test.zip

If parts of the documentation located in sub folders under the "apt" folder images are not recognised

Example:

(file under "apt/administration/overview.apt")
// SNIPPED START >>

  Following the overview

[./../images/overview.png]


// << SNIPPED END

The created html pages are correct. If I create the pdf I got

ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png

I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MPDF-7) Relative images are not recognised in sub folders

Posted by "Marco Huber (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPDF-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marco Huber updated MPDF-7:
---------------------------

    Attachment: output.log

I attached the output. As far I can see I use  version "1.0-20090309.102020-2".
Its the latest in the snapshot repo of apache.

> Relative images are not recognised in sub folders
> -------------------------------------------------
>
>                 Key: MPDF-7
>                 URL: http://jira.codehaus.org/browse/MPDF-7
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
>            Reporter: Marco Huber
>         Attachments: output.log, pdf-test.zip
>
>
> If parts of the documentation located in sub folders under the "apt" folder images are not recognised
> Example:
> (file under "apt/administration/overview.apt")
> // SNIPPED START >>
>   Following the overview
> [./../images/overview.png]
> // << SNIPPED END
> The created html pages are correct. If I create the pdf I got
> ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png
> I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MPDF-7) Relative images are not recognised in sub folders

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPDF-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=172085#action_172085 ] 

Lukas Theussl commented on MPDF-7:
----------------------------------

The second version (with "../") does work for me, can you attach the -X output, maybe you are not using the latest snapshot?

I'll have a look to fix the first issue.

> Relative images are not recognised in sub folders
> -------------------------------------------------
>
>                 Key: MPDF-7
>                 URL: http://jira.codehaus.org/browse/MPDF-7
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
>            Reporter: Marco Huber
>         Attachments: pdf-test.zip
>
>
> If parts of the documentation located in sub folders under the "apt" folder images are not recognised
> Example:
> (file under "apt/administration/overview.apt")
> // SNIPPED START >>
>   Following the overview
> [./../images/overview.png]
> // << SNIPPED END
> The created html pages are correct. If I create the pdf I got
> ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png
> I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MPDF-7) Relative images are not recognised in sub folders

Posted by "Marco Huber (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPDF-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=172412#action_172412 ] 

Marco Huber commented on MPDF-7:
--------------------------------

Found out something more about why [../images/overview.png] is not going.
I debugged and see in the {{FoAggregateSink}} (from _doxia-module-fo_) that the {{docName}} attribute is "./overview\overview".
The call of the {{resolveLinkRelativeToBase}} returns the wrong value.
The code line

 {{String base = docName.substring( 0, docName.lastIndexOf( "/" ) );}}

return ".".

Because of the backslash in the docName the string is cutted after the ".".



> Relative images are not recognised in sub folders
> -------------------------------------------------
>
>                 Key: MPDF-7
>                 URL: http://jira.codehaus.org/browse/MPDF-7
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
>            Reporter: Marco Huber
>         Attachments: output-2009-04-07.log, output.log, pdf-test.fo, pdf-test.zip
>
>
> If parts of the documentation located in sub folders under the "apt" folder images are not recognised
> Example:
> (file under "apt/administration/overview.apt")
> // SNIPPED START >>
>   Following the overview
> [./../images/overview.png]
> // << SNIPPED END
> The created html pages are correct. If I create the pdf I got
> ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png
> I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MPDF-7) Relative images are not recognised in sub folders

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPDF-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl closed MPDF-7.
----------------------------

         Assignee: Lukas Theussl
       Resolution: Fixed
    Fix Version/s: 1.0

Fixed with DOXIA-306.

> Relative images are not recognised in sub folders
> -------------------------------------------------
>
>                 Key: MPDF-7
>                 URL: http://jira.codehaus.org/browse/MPDF-7
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
>            Reporter: Marco Huber
>            Assignee: Lukas Theussl
>             Fix For: 1.0
>
>         Attachments: output-2009-04-07.log, output.log, pdf-test.fo, pdf-test.zip
>
>
> If parts of the documentation located in sub folders under the "apt" folder images are not recognised
> Example:
> (file under "apt/administration/overview.apt")
> // SNIPPED START >>
>   Following the overview
> [./../images/overview.png]
> // << SNIPPED END
> The created html pages are correct. If I create the pdf I got
> ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png
> I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MPDF-7) Relative images are not recognised in sub folders

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPDF-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=172432#action_172432 ] 

Lukas Theussl commented on MPDF-7:
----------------------------------

I just reproduced your problem on windows, so at least the issue is clear now. We will have to re-write the relative path resolution in a more generic way.

> Relative images are not recognised in sub folders
> -------------------------------------------------
>
>                 Key: MPDF-7
>                 URL: http://jira.codehaus.org/browse/MPDF-7
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
>            Reporter: Marco Huber
>         Attachments: output-2009-04-07.log, output.log, pdf-test.fo, pdf-test.zip
>
>
> If parts of the documentation located in sub folders under the "apt" folder images are not recognised
> Example:
> (file under "apt/administration/overview.apt")
> // SNIPPED START >>
>   Following the overview
> [./../images/overview.png]
> // << SNIPPED END
> The created html pages are correct. If I create the pdf I got
> ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png
> I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MPDF-7) Relative images are not recognised in sub folders

Posted by "Marco Huber (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPDF-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marco Huber updated MPDF-7:
---------------------------

    Attachment: pdf-test.fo
                output-2009-04-07.log

Maven downloaded the new snapshot (including doxia) but I get allready the same warnings. The created PDF contains no image.

I attached the log from the running and the created .fo file. There are only 

<fo:external-graphic src="./../images/overview.png" ...>

references. Both the leading "./". 

> Relative images are not recognised in sub folders
> -------------------------------------------------
>
>                 Key: MPDF-7
>                 URL: http://jira.codehaus.org/browse/MPDF-7
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
>            Reporter: Marco Huber
>         Attachments: output-2009-04-07.log, output.log, pdf-test.fo, pdf-test.zip
>
>
> If parts of the documentation located in sub folders under the "apt" folder images are not recognised
> Example:
> (file under "apt/administration/overview.apt")
> // SNIPPED START >>
>   Following the overview
> [./../images/overview.png]
> // << SNIPPED END
> The created html pages are correct. If I create the pdf I got
> ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png
> I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MPDF-7) Relative images are not recognised in sub folders

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPDF-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=172134#action_172134 ] 

Lukas Theussl commented on MPDF-7:
----------------------------------

That's the correct version. FYI, I just deployed a new snapshot that uses the latest doxia snapshots which fixes some minor issues.

However, I do not understand why you get the same warning twice (Image not found: ./../images/overview.png), but nothing about ../images/overview.png. Did you check whether an image is actually included in the pdf? I only get one warning and the second image is in the pdf.

> Relative images are not recognised in sub folders
> -------------------------------------------------
>
>                 Key: MPDF-7
>                 URL: http://jira.codehaus.org/browse/MPDF-7
>             Project: Maven 2.x PDF Plugin
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: Maven 2.1.0, Windows XP Pro, Java 1.6
>            Reporter: Marco Huber
>         Attachments: output.log, pdf-test.zip
>
>
> If parts of the documentation located in sub folders under the "apt" folder images are not recognised
> Example:
> (file under "apt/administration/overview.apt")
> // SNIPPED START >>
>   Following the overview
> [./../images/overview.png]
> // << SNIPPED END
> The created html pages are correct. If I create the pdf I got
> ERROR [org.apache.fop.fo.FONode:83] 2009-04-03 11:35:05,250 - Image not found: ./../images/overview.png
> I enclosed an sample project that shows the issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira