You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "David Crossley (JIRA)" <ji...@apache.org> on 2005/08/17 07:30:54 UTC

[jira] Created: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

images not reproduced in PDFs, if sources are in xdocs/images directory
-----------------------------------------------------------------------

         Key: FOR-635
         URL: http://issues.apache.org/jira/browse/FOR-635
     Project: Forrest
        Type: Bug
  Components: Documentation and website  
    Versions: 0.7, 0.8-dev    
    Reporter: David Crossley
    Priority: Minor
     Fix For: 0.8-dev


We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


Re: [jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Thu, 2008-02-21 at 12:43 +1100, David Crossley wrote:
...
> Would someone please add a mention of this in the main
> "changes" file at site-author/status.xml

done

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: [jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by David Crossley <cr...@apache.org>.
> Thorsten Scherler closed FOR-635.
> ---------------------------------
> 
>     Resolution: Fixed
> 
> After the update to FOP 0.94 it is possible to use any protocol that is known to cocoon. 
> This allowed to resolve the images via cocoon sitemap and drop the workaround that relied on the file system.

Fantastic news. This issue has been of concern for some time.
Thanks to everyone involved in past analysis and with the
elegant fix.

Would someone please add a mention of this in the main
"changes" file at site-author/status.xml

-David

> > images not reliably reproduced in PDFs
> > --------------------------------------
> >
> >                 Key: FOR-635
> >                 URL: https://issues.apache.org/jira/browse/FOR-635
> >             Project: Forrest
> >          Issue Type: Bug
> >          Components: Documentation and website
> >    Affects Versions: 0.7, 0.8
> >            Reporter: David Crossley
> >            Priority: Minor
> >             Fix For: 0.9-dev
> >
> >         Attachments: fo.diff
> >
> >
> > We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 

[jira] Assigned: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FOR-635?page=all ]

David Crossley reassigned FOR-635:
----------------------------------

    Assignee:     (was: David Crossley)

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>                 Key: FOR-635
>                 URL: http://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8-dev
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.8-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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

        

[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12414407 ] 

David Crossley commented on FOR-635:
------------------------------------

I added a set of examples of linking to images to the 'forrest seed-sample' to demonstrate and explain each situation. This shows that many of the images are broken in the PDF document.
Using localhost:8888/samples/linking.fo is now very helpful.

Regarding the issue comments above. Doing the manipulation of image URLs in the stylesheet seems to be bypassing the sitemap and locationmap handling of these images.

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Assignee: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev
>  Attachments: fo.diff
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Rasik Pandey (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12318969 ] 

Rasik Pandey commented on FOR-635:
----------------------------------

I think FOP likes absolute urls. Did you try that?

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug
>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev

>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12318971 ] 

David Crossley commented on FOR-635:
------------------------------------

Maybe i wasn't being clear. When forrest sees a URI that begins with "images/*.*" then it uses main/webapp/resources.xmap to look first in xdocs/images/ directory (for backwards compatibility) then in resources/images directory and elsewhere. That works fine for the html output, but not for PDFs. Sure, behind the scenes maybe Forrest maps those to absolute for FOP. However, ...

I wonder if we should mark this issue as "Won't fix" and instead change our documentation and the example "seed sites" to encourage the use of the project resources directory instead instead of xdocs/images/ directory.



> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug
>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev

>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.

> -----Original Message-----
> From: David Crossley (JIRA) [mailto:jira@apache.org]
> Sent: Friday, 2 June 2006 7:58 PM
> To: dev@forrest.apache.org
> Subject: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
> sources are in xdocs/images directory
> 
>     [ http://issues.apache.org/jira/browse/FOR-
> 635?page=comments#action_12414406 ]
> 
> David Crossley commented on FOR-635:
> ------------------------------------
> 
> I tried Gavin's patch "1. fo.diff (10 kb)" but it has no effect as far as
> i can see.

Strange, worked for me, then I did create this patch before some of the more
recent updates, did they have an effect ? I don't know.

I'll check it again.

Gav...

> 
> > images not reproduced in PDFs, if sources are in xdocs/images directory
> > -----------------------------------------------------------------------
> >
> >          Key: FOR-635
> >          URL: http://issues.apache.org/jira/browse/FOR-635
> >      Project: Forrest
> >         Type: Bug
> 
> >   Components: Documentation and website
> >     Versions: 0.7, 0.8-dev
> >     Reporter: David Crossley
> >     Assignee: David Crossley
> >     Priority: Minor
> >      Fix For: 0.8-dev
> >  Attachments: fo.diff
> >
> > We used to enable images to be placed in the xdocs/images directory.
> However, now they are intended to go in the resources/images directory
> instead. Both methods will work for html pages, but  only the latter
> method for the PDF pages.
> 
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.8.1/354 - Release Date: 6/1/2006



[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12414406 ] 

David Crossley commented on FOR-635:
------------------------------------

I tried Gavin's patch "1. fo.diff (10 kb)" but it has no effect as far as i can see.

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Assignee: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev
>  Attachments: fo.diff
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Ferdinand Soethe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12358753 ] 

Ferdinand Soethe commented on FOR-635:
--------------------------------------

Adjusting the documentation for now seems like a great idea. Would have saved my hours ....

Apart from that I'd much prefer if both options work as it is often much easier to store an image for a single page with that page in the same directory while it makes sense to store common images in the resource branch.

In the light of this view it might be a good idea to change the seed site to store project and group icons in the resources branch.

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug
>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev

>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483980 ] 

Ross Gardler commented on FOR-635:
----------------------------------

Using the example document created by David (forrest seed-sample, http://localhost:8888/samples/linking.pdf) we get the following results with "forrest site":

image liinks 4,5,6 all work as do all three generated PNG's, so the problem cases for "forrest site" are all absolute URLs (i.e. "/images/....")

In "forrest run" no images work (ouch!)




> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8-dev
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.8-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463796 ] 

David Crossley commented on FOR-635:
------------------------------------

Testing the PDF document with r411535 (when the above samples were added) and current head r494757 ... only two images are shown in PDFs: item 4 in the first group and item 3 in the second group. Same in forrest-0.7 release and in current head of forrest_07_branch. Yes, this is with adding the lib/optional/jimi-1.0.jar as described in faq.html#pdf_images

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8-dev
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.8-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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

        

[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gavin (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12413570 ] 

Gavin commented on FOR-635:
---------------------------

Does somebody want to test this.

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev
>  Attachments: fo.diff
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


[jira] Updated: (FOR-635) images not reliably reproduced in PDFs

Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ross Gardler updated FOR-635:
-----------------------------

    Fix Version/s:     (was: 0.8-dev)
                   0.9
          Urgency: Low
          Summary: images not reliably reproduced in PDFs  (was: images not reproduced in PDFs, if sources are in xdocs/images directory)

Change title to reflect the actual situation as it currently stands
Moving to 0.9

> images not reliably reproduced in PDFs
> --------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8-dev
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FOR-635?page=all ]

David Crossley updated FOR-635:
-------------------------------

    Other Info: [Patch available]

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev
>  Attachments: fo.diff
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ferdinand Soethe <fe...@apache.org>.





Ross Gardler wrote:

>> Why use ../ at all ?

> It's legacy, but that is not important, the key is that the URL works 
> for HTML but not for PDF. We need to standardise somewhere. Sure it 
> should be in the sources, but then we can't control the users sources.
> If we can make the handling of URLs work regardless of the rubbish put
> in by users then Forrest is a big hit with users.

It would also sabotage drop in and skinned use of html-pages of we did
away with ../-support so I'd rather see us fix the problem with ..

--
Ferdinand Soethe


RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.

> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@apache.org]
> Sent: Wednesday, 17 May 2006 9:03 PM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
> sources are in xdocs/images directory
> 
> Gav.... wrote:
> 
> > So then people, suggestions on what to keep, what to throw away, or
> leave
> > as-is fixed above to please everyone and comment docs accordingly.
> Bearing
> > In mind comments that this current over-choice for the user is messy.
> 
> I was referring to what files are resolved to as being messy, not what
> we allow as an input. We cannot control the input (although we can
> recommend).
> 
> Do not remove anything that already works. Just modify what we have so
> that the PDF images work the same way as the HTML images.

Ok, I have done that, I'll upload a patch.

> 
> Which, if I understand everything correctly means just strip leading
> "../../" from image URLs. WARNING: I'm rushing so dont assume I do
> understand correctly.

Yep. ( and then moving the path up the required level(s) )

Gav...

> 
> Ross
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006



Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ross Gardler <rg...@apache.org>.
Gav.... wrote:

> So then people, suggestions on what to keep, what to throw away, or leave
> as-is fixed above to please everyone and comment docs accordingly. Bearing
> In mind comments that this current over-choice for the user is messy.

I was referring to what files are resolved to as being messy, not what 
we allow as an input. We cannot control the input (although we can 
recommend).

Do not remove anything that already works. Just modify what we have so 
that the PDF images work the same way as the HTML images.

Which, if I understand everything correctly means just strip leading 
"../../" from image URLs. WARNING: I'm rushing so dont assume I do 
understand correctly.

Ross

RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.

> -----Original Message-----
> From: Ferdinand Soethe [mailto:ferdinand@apache.org]
> Sent: Wednesday, 17 May 2006 3:19 PM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
> sources are in xdocs/images directory
> 
> 
> You might find some ideas or a solution in
> 
> main\webapp\skins\common\xslt\html\pathutils.xsl
> 
> > <!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
> > <xsl:template name="normalize">

Doh! That is all that was needed to make it work, thanks.
I think my attempt was close, just missing the fact you have to
Remove the last directory before the ../ (important!)

Now, I think we need to clear up now what options we want and why.

Ross stated earlier :-

<quote>

The url "../images/icon.png" falls through to the "otherwise" option.

an url of "images/icon.png" would be matched by the first test, producing:

$imagesdir/icon.png

which resolves to:

{project:resources.images}/icon.png

So...

we have wo possible locations already (and there should be one).

Then we add the problem that the images need to be resolved from multiple
possible locations in the src tree (the original issue).

This is *really* messy...

</quote>

Recapping what happens now then :-

---------------------------------------------------------------------------

1. Usage: src="images/icon.png"

This uses the full system path to /resources/images/ directory from :-

<!-- resources image dir -->
        <xsl:when test="starts-with(string(@src),'images/')">
          <xsl:value-of
select="concat($imagesdir,substring-after(@src,'images'))"/>
        </xsl:when>

Example fo : <fo:external-graphic
src="D:\web\forrest_rc1/src/documentation/resources/images///group-logo.gif"
/>

Although there is no dotdots here, we can maybe run this through the 
Normalize template to correct slash direction maybe.

---------------------------------------------------------------------------

2. Usage : src="/images/icon.png"
   Usage : src="/ANOtherDirectory/icon.png"

This will use any specified directory taking 'xdocs' to be root. From :-

<!-- already absolute -->
        <xsl:when test="contains(string(@src),':') or
starts-with(string(@src),'/')">
          <xsl:value-of select="@src"/>
        </xsl:when>

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

---------------------------------------------------------------------------

3. Usage: src="../images/icon.png"
   Usage: src="../../ANOtherDirectory/icon.png"
   Usage: src="icon.png"

This will use any specified directory taking the drive root and so uses the
Full system path to the image. I suppose then in this case the images can
Be stored anywhere even below the site root. Specifying '../images/icon.png'
from an /xdocs/index.xml file will not find either of the current images
Directories though so this needs to be documented. Specifying just an image
Name without any path will find the image if it is in the same directory as
the calling file. From :-

<!-- relative to document -->
	<xsl:otherwise>
		<xsl:variable name="path"
select="concat($xmlbasedir,@src)"/>
		<xsl:call-template name="normalize">
			<xsl:with-param name="path" select="$path"/>
		</xsl:call-template>
	</xsl:otherwise>

Example fo : <fo:external-graphic
src="D:/web/forrest_rc1/src/documentation/content/images/group-logo.gif"/>

Notice is this fo example we are one level below xdocs.

---------------------------------------------------------------------------


So then people, suggestions on what to keep, what to throw away, or leave
as-is fixed above to please everyone and comment docs accordingly. Bearing
In mind comments that this current over-choice for the user is messy.

Gav...

> 
> --
> Ferdinand Soethe
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006




Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ferdinand Soethe <fe...@apache.org>.
You might find some ideas or a solution in

main\webapp\skins\common\xslt\html\pathutils.xsl

> <!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
> <xsl:template name="normalize">

--
Ferdinand Soethe


RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.

> > >
> > > The area of thinking I have at the moment is something like :-
> > >
> > > <xsl:when test="starts-with(string(@src),'../')">
> > >           <xsl:value-of select="substring-after(string(@src),'../')"/>
> > >         </xsl:when>
> > >
> >
> > That's where I was thinking, yes. I think you may find there is a
> > template for stripping dot dots in the existing dotdots stylesheet, not
> > sure though.
> 
> No, just a template to convert paths into dotdots.
> 
> I'll have a play and create one to remove dotdots.
> 
> Gav...

Well I have had a play and this is what I have so far.

<xsl:template name="removedotdots">
	  <xsl:param name="path"/>
	  <xsl:variable name="removedirs" select="substring
after(string($path),'../')"/>
	  <xsl:variable name="removeagain"
select="starts-with(string($removedirs),'../')"/>
	  <xsl:if test="$removeagain">
		  <xsl:call-template name="removedotdots">
			  <xsl:with-param name="path"
select="substring-after(string($removedirs),'../')"/>
		  </xsl:call-template>
	  </xsl:if>
	  </xsl:template>

And the calling code :-

	<xsl:otherwise>
		<xsl:variable name="path" select="@src"/>
		<xsl:call-template name="removedotdots">
			<xsl:with-param name="path" select="$path"/>
		</xsl:call-template>
	</xsl:otherwise>

Unfortunately this does not work. Seems like I'm either not getting a
Value returned from the template, the return is empty for some reason, or
the @src value is not being passed into the template, don't know which.

I end up with fo output of 

<fo:external-graphic src=""/>

So if someone spots a mistake or two let me know, I'll carry on tonight.

Gav...



RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.

> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@apache.org]
> Sent: Monday, 15 May 2006 11:20 PM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
> sources are in xdocs/images directory
> 
> Gav.... wrote:
> >>>So how do we do it?
> >>>
> >>>How about stripping ay leading dotdots before we process image
> >>
> >>references?
> >>
> >>Ok, so where is the best place to do this, in the document-to-fo.xsl
> file
> >>Or somewhere else?
> >>
> >>In document-to-fo.xsl we can use substring-before to detect for .. and
> >>remove
> >>It but can't see how to do it if there is more than one nested level.
> >>If there was ../../ for instance.
> >>
> >>I'll keep looking, I feel this issue needs doing before the release and
> so
> >>Will keep concentrating on this issue for now.
> >
> >
> > The area of thinking I have at the moment is something like :-
> >
> > <xsl:when test="starts-with(string(@src),'../')">
> >           <xsl:value-of select="substring-after(string(@src),'../')"/>
> >         </xsl:when>
> >
> 
> That's where I was thinking, yes. I think you may find there is a
> template for stripping dot dots in the existing dotdots stylesheet, not
> sure though.

No, just a template to convert paths into dotdots.

I'll have a play and create one to remove dotdots.

Gav...

> 
> Ross
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.392 / Virus Database: 268.5.6/339 - Release Date: 14/05/2006



Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ross Gardler <rg...@apache.org>.
Gav.... wrote:
>>>So how do we do it?
>>>
>>>How about stripping ay leading dotdots before we process image
>>
>>references?
>>
>>Ok, so where is the best place to do this, in the document-to-fo.xsl file
>>Or somewhere else?
>>
>>In document-to-fo.xsl we can use substring-before to detect for .. and
>>remove
>>It but can't see how to do it if there is more than one nested level.
>>If there was ../../ for instance.
>>
>>I'll keep looking, I feel this issue needs doing before the release and so
>>Will keep concentrating on this issue for now.
> 
> 
> The area of thinking I have at the moment is something like :-
> 
> <xsl:when test="starts-with(string(@src),'../')">
>           <xsl:value-of select="substring-after(string(@src),'../')"/>
>         </xsl:when>
> 

That's where I was thinking, yes. I think you may find there is a 
template for stripping dot dots in the existing dotdots stylesheet, not 
sure though.

Ross

RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.
> >
> > So how do we do it?
> >
> > How about stripping ay leading dotdots before we process image
> references?
> 
> Ok, so where is the best place to do this, in the document-to-fo.xsl file
> Or somewhere else?
> 
> In document-to-fo.xsl we can use substring-before to detect for .. and
> remove
> It but can't see how to do it if there is more than one nested level.
> If there was ../../ for instance.
> 
> I'll keep looking, I feel this issue needs doing before the release and so
> Will keep concentrating on this issue for now.

The area of thinking I have at the moment is something like :-

<xsl:when test="starts-with(string(@src),'../')">
          <xsl:value-of select="substring-after(string(@src),'../')"/>
        </xsl:when>

If there is a better tack I'd better know now before I carry on this route.

Cheers

Gav...




RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.

> -----Original Message-----
> From: Ross Gardler [mailto:rgardler@apache.org]
> Sent: Sunday, 14 May 2006 4:58 AM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
> sources are in xdocs/images directory
> 
> Gav.... wrote:
> >
> >>-----Original Message-----
> >>From: Ross Gardler (JIRA) [mailto:jira@apache.org]
> >>Sent: Saturday, 13 May 2006 9:29 AM
> >>To: dev@forrest.apache.org
> >>Subject: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
> >>sources are in xdocs/images directory
> >>
> >>    [ http://issues.apache.org/jira/browse/FOR-
> >>635?page=comments#action_12383339 ]
> >>
> >>Ross Gardler commented on FOR-635:
> >>----------------------------------
> >>
> >>(some notes I'm working on about 3 issues at once due to Forrest Friday
> >>and IRC - need this so we don't forget what we have discovered)
> >>
> >>Looking at http://localhost:8888/samples/sample.fo
> >>
> >>we see that an xdoc entry of:
> >>
> >><icon height="22" width="26" src="../images/icon.png" alt="feather"/>
> >
> >
> > Why use ../ at all ?
> 
> It's legacy, but that is not important, the key is that the URL works
> for HTML but not for PDF. We need to standardise somewhere. Sure it
> should be in the sources, but then we can't control the users sources.
> If we can make the handling of URLs work regardless of the rubbish put
> in by users then Forrest is a big hit with users.
> 
> > The two images directories are static so this relevant from document
> rubbish
> > Is not needed.
> >
> > And, is ../images intended to be /resources/images or /xdocs/images ?
> 
> Again, legacy. Images used to be in one location, then moved to another,
> then to another etc.
> 
> > There can also be ../../../images/icon.png if the nested directories are
> > deep enough. In all nested or root cases specifying /images/icon.png
> would
> > Always work. Can we do away with dotdots ?
> 
> Only if you are prepared to edit every single users source documents for
> them ;-)
> 
> Seriously, we can choose to only support images/icon.png and correct our
> sources. But if we can it would be better if we handle all potential
> user error - less work for us on the user lists.
> 
> So how do we do it?
> 
> How about stripping ay leading dotdots before we process image references?

Ok, so where is the best place to do this, in the document-to-fo.xsl file
Or somewhere else?

In document-to-fo.xsl we can use substring-before to detect for .. and
remove
It but can't see how to do it if there is more than one nested level.
If there was ../../ for instance.

I'll keep looking, I feel this issue needs doing before the release and so
Will keep concentrating on this issue for now.

Gav...

> 
> 
> (NOTE we should still tidy up our example docs to conform to our "best
> practice" recomendations)
> 
> I don't think the idea of adding special matches for possible matches is
> a good idea, that could be a never ending task.
> 
> 
> Ross
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.392 / Virus Database: 268.5.6/338 - Release Date: 12/05/2006



Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ross Gardler <rg...@apache.org>.
Gav.... wrote:
> 
>>-----Original Message-----
>>From: Ross Gardler (JIRA) [mailto:jira@apache.org]
>>Sent: Saturday, 13 May 2006 9:29 AM
>>To: dev@forrest.apache.org
>>Subject: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
>>sources are in xdocs/images directory
>>
>>    [ http://issues.apache.org/jira/browse/FOR-
>>635?page=comments#action_12383339 ]
>>
>>Ross Gardler commented on FOR-635:
>>----------------------------------
>>
>>(some notes I'm working on about 3 issues at once due to Forrest Friday
>>and IRC - need this so we don't forget what we have discovered)
>>
>>Looking at http://localhost:8888/samples/sample.fo
>>
>>we see that an xdoc entry of:
>>
>><icon height="22" width="26" src="../images/icon.png" alt="feather"/>
> 
> 
> Why use ../ at all ?

It's legacy, but that is not important, the key is that the URL works 
for HTML but not for PDF. We need to standardise somewhere. Sure it 
should be in the sources, but then we can't control the users sources. 
If we can make the handling of URLs work regardless of the rubbish put 
in by users then Forrest is a big hit with users.

> The two images directories are static so this relevant from document rubbish
> Is not needed. 
> 
> And, is ../images intended to be /resources/images or /xdocs/images ?

Again, legacy. Images used to be in one location, then moved to another, 
then to another etc.

> There can also be ../../../images/icon.png if the nested directories are
> deep enough. In all nested or root cases specifying /images/icon.png would
> Always work. Can we do away with dotdots ?

Only if you are prepared to edit every single users source documents for 
them ;-)

Seriously, we can choose to only support images/icon.png and correct our 
sources. But if we can it would be better if we handle all potential 
user error - less work for us on the user lists.

So how do we do it?

How about stripping ay leading dotdots before we process image references?


(NOTE we should still tidy up our example docs to conform to our "best 
practice" recomendations)

I don't think the idea of adding special matches for possible matches is 
a good idea, that could be a never ending task.


Ross

RE: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gav...." <br...@brightontown.com.au>.

> -----Original Message-----
> From: Ross Gardler (JIRA) [mailto:jira@apache.org]
> Sent: Saturday, 13 May 2006 9:29 AM
> To: dev@forrest.apache.org
> Subject: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
> sources are in xdocs/images directory
> 
>     [ http://issues.apache.org/jira/browse/FOR-
> 635?page=comments#action_12383339 ]
> 
> Ross Gardler commented on FOR-635:
> ----------------------------------
> 
> (some notes I'm working on about 3 issues at once due to Forrest Friday
> and IRC - need this so we don't forget what we have discovered)
> 
> Looking at http://localhost:8888/samples/sample.fo
> 
> we see that an xdoc entry of:
> 
> <icon height="22" width="26" src="../images/icon.png" alt="feather"/>

Why use ../ at all ?

The two images directories are static so this relevant from document rubbish
Is not needed. 

And, is ../images intended to be /resources/images or /xdocs/images ?

There can also be ../../../images/icon.png if the nested directories are
deep enough. In all nested or root cases specifying /images/icon.png would
Always work. Can we do away with dotdots ?

As I see it, there are 3 possible locations.

1. /resources/images

In which case we specify src="images/icon.png"

And this works for pdf as it matches :-

xsl:when test="starts-with(string(@src),'images/')">
           <xsl:value-of select="concat($imagesdir,substring-
 after(@src,'images'))"/>
         </xsl:when>

2. /xdocs/images

In which case we specify src="/images/icon.png"

This should work but does not, the match is :-

xsl:when test="contains(string(@src),':') or starts-
 with(string(@src),'/')">
           <xsl:value-of select="@src"/>
         </xsl:when>

Now, I can not see why this does not work at this stage.
We need to test that when test to make sure the syntax
Is correct. Maybe it does not like '/' and is treating the 
/ as an escape character or something. Could it be we need
Two in there '//' so the first one escapes and second one
Gets read properly, I don't know just thinking loud.

What about ':' , what is that there for ?

Anyway currently then src="/images/icon.png" is therefore
Falling through to the default otherwise.

3. image

In which case we specify src="icon.png"

In other words, the image is in the same directory as the file.
If the image is not required in either 1. or 2. above then this
In the only other place that it might be wanted.

The match for this is :-

 <xsl:otherwise><xsl:value-of
 select="concat($xmlbasedir,@src)"/></xsl:otherwise>
 </xsl:choose>

$xmlbasedir would be xdocs + '.' so should be ok.

As mentioned by Ross, the use of ../images/icon.png also
Falls through to this otherwise at the moment.

Can I suggest at least for the moment we add a match to the first when to
Account for this so it looks in the /resources/images/ directory for it.

The first match would then look like :-

xsl:when test="starts-with(string(@src),'images/') or
starts-with(string(@src),'../')">
           <xsl:value-of select="concat($imagesdir,substring-
 after(@src,'images'))"/>
         </xsl:when>

The end result will be all images that start with '../images' or '/images'
will resolve To look in /resources/images and those that start with just
'images' will look in /xdocs/images and those that just have 'image.png'
will Look in the current directory.

Eventually we should weed out ../ ../../ etc refs and make them just /.


WDYT?

Gav...

> 
> gets converted to an fo entry of:
> 
> <fo:external-graphic
> src="D:\tmp\forrest/src/documentation/content/xdocs/samples/../images/icon
> .png" height="22" width="26"/>
> 
> This happens because of document-to-fo.xsl:
> 
> <xsl:choose>
>         <!-- resources image dir -->
>         <xsl:when test="starts-with(string(@src),'images/')">
>           <xsl:value-of select="concat($imagesdir,substring-
> after(@src,'images'))"/>
>         </xsl:when>
>         <!-- already absolute -->
>         <xsl:when test="contains(string(@src),':') or starts-
> with(string(@src),'/')">
>           <xsl:value-of select="@src"/>
>         </xsl:when>
>         <!-- relative to document -->
>         <xsl:otherwise><xsl:value-of
> select="concat($xmlbasedir,@src)"/></xsl:otherwise>
> </xsl:choose>
> 
> > images not reproduced in PDFs, if sources are in xdocs/images directory
> > -----------------------------------------------------------------------
> >
> >          Key: FOR-635
> >          URL: http://issues.apache.org/jira/browse/FOR-635
> >      Project: Forrest
> >         Type: Bug
> 
> >   Components: Documentation and website
> >     Versions: 0.7, 0.8-dev
> >     Reporter: David Crossley
> >     Priority: Minor
> >      Fix For: 0.8-dev
> 
> >
> > We used to enable images to be placed in the xdocs/images directory.
> However, now they are intended to go in the resources/images directory
> instead. Both methods will work for html pages, but  only the latter
> method for the PDF pages.
> 
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.392 / Virus Database: 268.5.6/338 - Release Date: 12/05/2006



[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12383339 ] 

Ross Gardler commented on FOR-635:
----------------------------------

(some notes I'm working on about 3 issues at once due to Forrest Friday and IRC - need this so we don't forget what we have discovered)

Looking at http://localhost:8888/samples/sample.fo

we see that an xdoc entry of:

<icon height="22" width="26" src="../images/icon.png" alt="feather"/>

gets converted to an fo entry of:

<fo:external-graphic src="D:\tmp\forrest/src/documentation/content/xdocs/samples/../images/icon.png" height="22" width="26"/>

This happens because of document-to-fo.xsl:

<xsl:choose>
        <!-- resources image dir -->
        <xsl:when test="starts-with(string(@src),'images/')">
          <xsl:value-of select="concat($imagesdir,substring-after(@src,'images'))"/>
        </xsl:when>
        <!-- already absolute -->
        <xsl:when test="contains(string(@src),':') or starts-with(string(@src),'/')">
          <xsl:value-of select="@src"/>
        </xsl:when>
        <!-- relative to document -->
        <xsl:otherwise><xsl:value-of select="concat($xmlbasedir,@src)"/></xsl:otherwise>
</xsl:choose>

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev

>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


[jira] Updated: (FOR-635) images not reliably reproduced in PDFs

Posted by "Gavin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gavin updated FOR-635:
----------------------

    Other Info:   (was: [Patch available])

Removing patch available as it does not fix the problem.

> images not reliably reproduced in PDFs
> --------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.9-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Gavin (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FOR-635?page=all ]

Gavin updated FOR-635:
----------------------

    Attachment: fo.diff

added pathutils.xsl to fo directory, altered document-to-fo.xsl.

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev
>  Attachments: fo.diff
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


[jira] Assigned: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/FOR-635?page=all ]

David Crossley reassigned FOR-635:
----------------------------------

    Assign To: David Crossley

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Assignee: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev
>  Attachments: fo.diff
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
le 28/03/2007 11:25 Ross Gardler a écrit :
> Ross Gardler wrote:
>> Cyriaque Dupoirieux wrote:
>>> (I think we will have lots of problems with input plugins such as 
>>> Odt...)
>
> I only just realised the implications of this sentence. There should 
> be *no* problems with input plugins, it is the above issue is a 
> special case that results from the fact that FOP insists on having 
> absolute addresses. It is an output plugin issue, not an input plugin.
>
> The OOo input plugin works just fine (at least last time I checked), 
> so there is no reason why the Odt plugin should not work.
Ok, I was just wandering about the need of fullpath in fo file for 
pictures. Which src path are we going to give, since the picture is not 
directly available in the sources.
But let's see what happens, I have several page written in Odt in my 
site (made with the dispatcher) I am going to test myself.

Thank you,

Salutations,
Cyriaque,

>
> Raise this with me after the 0.8 release if you like.
>
> Ross
>
>

Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ross Gardler <rg...@apache.org>.
Ross Gardler wrote:
> Cyriaque Dupoirieux wrote:
>> (I think we will have lots of problems with input plugins such as Odt...)

I only just realised the implications of this sentence. There should be 
*no* problems with input plugins, it is the above issue is a special 
case that results from the fact that FOP insists on having absolute 
addresses. It is an output plugin issue, not an input plugin.

The OOo input plugin works just fine (at least last time I checked), so 
there is no reason why the Odt plugin should not work.

Raise this with me after the 0.8 release if you like.

Ross

Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ross Gardler <rg...@apache.org>.
Cyriaque Dupoirieux wrote:
> Did you commit your changes ?
> I want to make it work also with dispatcher, thanks.
> (I think we will have lots of problems with input plugins such as Odt...)

http://svn.apache.org/viewvc?view=rev&revision=523042

Ross

Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
Did you commit your changes ?
I want to make it work also with dispatcher, thanks.
(I think we will have lots of problems with input plugins such as Odt...)


Salutations,
Cyriaque,

le 27/03/2007 21:53 Ross Gardler (JIRA) a écrit :
>     [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484567 ] 
>
> Ross Gardler commented on FOR-635:
> ----------------------------------
>
> OK, some success and some failure.
>
> The good news:
>
> I've made a change that means samples 1,2, 4, 5, 6 in group 1 and sample 3 in group 2 now works in both run and site modes
>
> The bad news:
>
> There is no way to make the remaining images work. However, this must have always been the case since the problem is very deep rooted in the way the FO XSLT calculates the path to images and the way some images are generated dynamically.
>
> I propose we now document this limitations and move this to 0.9.
>
>   
>> images not reproduced in PDFs, if sources are in xdocs/images directory
>> -----------------------------------------------------------------------
>>
>>                 Key: FOR-635
>>                 URL: https://issues.apache.org/jira/browse/FOR-635
>>             Project: Forrest
>>          Issue Type: Bug
>>          Components: Documentation and website
>>    Affects Versions: 0.7, 0.8-dev
>>            Reporter: David Crossley
>>            Priority: Minor
>>             Fix For: 0.8-dev
>>
>>         Attachments: fo.diff
>>
>>
>> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.
>>     
>
>   

[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484567 ] 

Ross Gardler commented on FOR-635:
----------------------------------

OK, some success and some failure.

The good news:

I've made a change that means samples 1,2, 4, 5, 6 in group 1 and sample 3 in group 2 now works in both run and site modes

The bad news:

There is no way to make the remaining images work. However, this must have always been the case since the problem is very deep rooted in the way the FO XSLT calculates the path to images and the way some images are generated dynamically.

I propose we now document this limitations and move this to 0.9.

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8-dev
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.8-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "Ross Gardler (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/FOR-635?page=comments#action_12383342 ] 

Ross Gardler commented on FOR-635:
----------------------------------

So, following on from my notes (previous comment)...

The url "../images/icon.png" falls through to the "otherwise" option.

an url of "images/icon.png" would be matched by the first test, producing:

$imagesdir/icon.png

which resolves to:

{project:resources.images}/icon.png

So...

we have wo possible locations already (and there should be one).

Then we add the problem that the images need to be resolved from multiple possible locations in the src tree (the original issue).

This is *really* messy...

(time for me to sleep now - good luck to those who follow)

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>          Key: FOR-635
>          URL: http://issues.apache.org/jira/browse/FOR-635
>      Project: Forrest
>         Type: Bug

>   Components: Documentation and website
>     Versions: 0.7, 0.8-dev
>     Reporter: David Crossley
>     Priority: Minor
>      Fix For: 0.8-dev

>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

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


Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> >David Crossley commented on FOR-635:
> >------------------------------------
> >
> >For me, in 'forrest run' mode all images work in html. In PDF only two 
> >images work (#4 in group 1 and #3 in group 2).
> 
> Interesting...
> 
> All images work in html, that's fine.
> 
> Strange we should have different results for the PDF though, Do you have 
> Jimi installed? (see our FAQ)

Yes, see comments in FOR-635.

-David

Re: [jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by Ross Gardler <rg...@apache.org>.
David Crossley (JIRA) wrote:
>     [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483989 ] 
> 
> David Crossley commented on FOR-635:
> ------------------------------------
> 
> For me, in 'forrest run' mode all images work in html. In PDF only two images work (#4 in group 1 and #3 in group 2).

Interesting...

All images work in html, that's fine.

Strange we should have different results for the PDF though, Do you have 
Jimi installed? (see our FAQ)

Ross

[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12483989 ] 

David Crossley commented on FOR-635:
------------------------------------

For me, in 'forrest run' mode all images work in html. In PDF only two images work (#4 in group 1 and #3 in group 2).

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8-dev
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.8-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FOR-635) images not reproduced in PDFs, if sources are in xdocs/images directory

Posted by "David Crossley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12466884 ] 

David Crossley commented on FOR-635:
------------------------------------

Discussion is in various threads, e.g.
 Re: Match Patterns - .xmap and .locationmap.
 http://marc.theaimsgroup.com/?t=116835243200002

> images not reproduced in PDFs, if sources are in xdocs/images directory
> -----------------------------------------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8-dev
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.8-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 25.02.2008 01:15:51 David Crossley wrote:
<snip/>
> Lets thank Apache FOP too for that excellent feature
> and Jeremias for referring us to the solution.
<snip/>

Well, working together is one of the purposes of the ASF, isn't it?
After all, FOP profits from these changes, too, as we won't have PDFs
from a FOP version on the website anymore which we tell our users to
finally let drop. Looking forward to switching over...


Jeremias Maerki


Re: [jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> Thorsten Scherler wrote:
> >Ferdinand Soethe wrote:
> >>Thorsten Scherler (JIRA) wrote:
> >>
> >>>After the update to FOP 0.94 it is possible to use any protocol that is 
> >>>known to cocoon. This allowed to resolve the images via cocoon sitemap 
> >>>and drop the workaround that relied on the file system.
> >>
> >>Phantastic fix. Thanks, Thorsten! I would have never 
> >>believed the solution was so close.
> >
> >Actually thanks to you because without your work the fix would not have
> >been possible. I just picked up the pieces. 

Following on from the work of others is what gives
us a boost. Otherwise it remains just potential.

> >Thanks to everyone that updated our fop version that made this fix
> >possible.
> 
> :-))))
> 
> 
> It's been a while since Forrest saw such wonderful collaboration and 
> back slapping.
> 
> Well done all.

Lets thank Apache FOP too for that excellent feature
and Jeremias for referring us to the solution.

-David

Re: [jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> On Thu, 2008-02-21 at 17:56 +0100, Ferdinand Soethe wrote:
>> Thorsten Scherler (JIRA) wrote:
>>
>>> After the update to FOP 0.94 it is possible to use any protocol that is known to cocoon. 
>>> This allowed to resolve the images via cocoon sitemap and drop the workaround that relied on the file system.
>>
>> Phantastic fix. Thanks, Thorsten! I would have never 
>> believed the solution was so close.
> 
> Actually thanks to you because without your work the fix would not have
> been possible. I just picked up the pieces. 
> 
> Thanks to everyone that updated our fop version that made this fix
> possible.

:-))))


It's been a while since Forrest saw such wonderful collaboration and 
back slapping.

Well done all.

Ross


Re: [jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by Thorsten Scherler <th...@apache.org>.
On Thu, 2008-02-21 at 17:56 +0100, Ferdinand Soethe wrote:
> Thorsten Scherler (JIRA) wrote:
> 
> > After the update to FOP 0.94 it is possible to use any protocol that is known to cocoon. 
> > This allowed to resolve the images via cocoon sitemap and drop the workaround that relied on the file system.
> 
> 
> Phantastic fix. Thanks, Thorsten! I would have never 
> believed the solution was so close.

Actually thanks to you because without your work the fix would not have
been possible. I just picked up the pieces. 

Thanks to everyone that updated our fop version that made this fix
possible.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: [jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by Ferdinand Soethe <fe...@apache.org>.
Thorsten Scherler (JIRA) wrote:

> After the update to FOP 0.94 it is possible to use any protocol that is known to cocoon. 
> This allowed to resolve the images via cocoon sitemap and drop the workaround that relied on the file system.


Phantastic fix. Thanks, Thorsten! I would have never 
believed the solution was so close.

Best regards,
Ferdinand Soethe

[jira] Closed: (FOR-635) images not reliably reproduced in PDFs

Posted by "Thorsten Scherler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FOR-635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thorsten Scherler closed FOR-635.
---------------------------------

    Resolution: Fixed

After the update to FOP 0.94 it is possible to use any protocol that is known to cocoon. 
This allowed to resolve the images via cocoon sitemap and drop the workaround that relied on the file system.

> images not reliably reproduced in PDFs
> --------------------------------------
>
>                 Key: FOR-635
>                 URL: https://issues.apache.org/jira/browse/FOR-635
>             Project: Forrest
>          Issue Type: Bug
>          Components: Documentation and website
>    Affects Versions: 0.7, 0.8
>            Reporter: David Crossley
>            Priority: Minor
>             Fix For: 0.9-dev
>
>         Attachments: fo.diff
>
>
> We used to enable images to be placed in the xdocs/images directory. However, now they are intended to go in the resources/images directory instead. Both methods will work for html pages, but  only the latter method for the PDF pages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.