[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Adding page number to olinks destroys text justification
Hi again,
It seems that I was happy too early. Olinks with page numbers seems to be rendered correctly by FOP 1.1 but now I have a problem with rendering the link elements with a graphic. For external links, I had defined a role which adds some additional styling to links, namely the underline style and a graphic. And, as you can see from the attached images, sometimes links are rendered correctly and other times they are not and the image is covering the next characters.
This bit was correct with FOP 1.0.
Do you think this is another issue with FOP and I must choose between olinks with page number and extra styling for external links? Or is there anything I can do about it?
XML:
<para>The <olink targetptr="client_push_notifications_api">push
notifications _javascript_ API</olink> provides a way to register an application running on the
client device for receiving the AMP Services Engine-originated ACF-based messages ("ACF Push").
To enable push notifications being sent by the notification service, it is necessary for the
device to provide an up-to-date token to a matching service: <link role="external"
xlink:href="">Google Cloud
Messaging</link> for Android and <link role="external"
xlink:href=""
>Apple Push Notification Service</link> for iOS platform. Refer to the article entitled <olink
targetptr="client_push_notifications_acf"/> for the
configuration details.</para>
XSLT:
<xsl:attribute-set name="xref.properties">
<xsl:attribute name="color">#B64F0D</xsl:attribute>
<xsl:attribute name="text-decoration">
<xsl:choose>
<xsl:when test="@role = 'external'">underline</xsl:when>
<xsl:otherwise>none</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="background-image">
<xsl:if test="@role = 'external'"
>../../../sources/graphics/common/icon_external_orange_pdf.png</xsl:if>
</xsl:attribute>
<xsl:attribute name="padding-right">
<xsl:choose>
<xsl:when test="@role ='external'">10pt</xsl:when>
<xsl:otherwise>0pt</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute
name="background-position-horizontal">right</xsl:attribute>
<xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
</xsl:attribute-set>
FO:
WRONG RENDERING
<fo:block space-before.optimum="5pt" space-before.minimum="5pt" space-before.maximum="5pt">The
<fo:basic-link internal-destination="client_push_notifications_api" color="#B64F0D"
text-decoration="none" background-image="" padding-right="0pt"
background-position-horizontal="right" background-repeat="no-repeat">push notifications
_javascript_
API<fo:basic-link xmlns:rx="http://www.renderx.com/XSL/Extensions"
internal-destination="client_push_notifications_api" color="#B64F0D"
text-decoration="none" background-image="" padding-right="0pt"
background-position-horizontal="right"
background-repeat="no-repeat"><fo:inline
color="#7E7E7E"> [<fo:page-number-citation ref-id="client_push_notifications_api"
/>]</fo:inline></fo:basic-link></fo:basic-link> provides a way to register an
application running on the client device for
receiving the AMP Services Engine-originated
ACF-based messages ("ACF Push"). To enable push notifications being sent by the notification
service, it is necessary for the device to provide an up-to-date token to a matching
service: <fo:basic-link
external-destination="url(http://developer.android.com/guide/google/gcm/index.html)"
><fo:inline color="#B64F0D" text-decoration="underline"
background-image="../../../sources/graphics/common/icon_external_orange_pdf.png"
padding-right="10pt"
background-position-horizontal="right"
background-repeat="no-repeat">Google Cloud Messaging</fo:inline></fo:basic-link> for
Android and <fo:basic-link
external-destination="url(http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html)"
><fo:inline color="#B64F0D" text-decoration="underline"
background-image="../../../sources/graphics/common/icon_external_orange_pdf.png"
padding-right="10pt" background-position-horizontal="right"
background-repeat="no-repeat">Apple Push Notification
Service</fo:inline></fo:basic-link> for iOS platform. Refer to the article entitled
<fo:basic-link
internal-destination="client_push_notifications_acf" color="#B64F0D"
text-decoration="none" background-image="" padding-right="0pt"
background-position-horizontal="right" background-repeat="no-repeat">AMP Services
Engine-originated ACF-based notifications<fo:basic-link
xmlns:rx="http://www.renderx.com/XSL/Extensions"
internal-destination="client_push_notifications_acf" color="#B64F0D"
text-decoration="none" background-image="" padding-right="0pt"
background-position-horizontal="right" background-repeat="no-repeat"><fo:inline
color="#7E7E7E"> [<fo:page-number-citation ref-id="client_push_notifications_acf"
/>]</fo:inline></fo:basic-link></fo:basic-link> for the configuration
details.</fo:block>
CORRECT RENDERING:
<fo:block space-before.optimum="5pt" space-before.minimum="5pt" space-before.maximum="5pt">The
push notification API provides a way to register an application running on the client device
for receiving the AMP Services Engine-originated ACF-based messages
("ACF Push"). To enable
push notifications being sent by the notification service, it is necessary for the device to
provide an up-to-date push notification token to a matching service: <fo:basic-link
external-destination="url(http://developer.android.com/guide/google/gcm/index.html)"
><fo:inline color="#B64F0D" text-decoration="underline"
background-image="../../../sources/graphics/common/icon_external_orange_pdf.png"
padding-right="10pt" background-position-horizontal="right"
background-repeat="no-repeat">Google Cloud Messaging</fo:inline></fo:basic-link> for
Android and <fo:basic-link
external-destination="url(http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html)"
><fo:inline color="#B64F0D" text-decoration="underline"
background-image="../../../sources/graphics/common/icon_external_orange_pdf.png"
padding-right="10pt" background-position-horizontal="right"
background-repeat="no-repeat">Apple Push Notification
Service</fo:inline></fo:basic-link> for iOS.</fo:block>
Regards,
Maria
Dnia Wtorek, 7 Stycznia 2014 21:11 Bob Stayton <bobs@sagehill.net> napisał(a)
Hi Maria,
I believe this is an artifact of FOP 1.0. It seems that it measured the
text on the line for justification *before* resolving the page numbers.
I believe this is fixed in FOP 1.1, but you could send me a .fo file
and I could check it. Can you test with FOP 1.1?
--
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
On 1/7/2014 5:11 AM, Maria Lowas wrote:
> Hi all,
>
> Recently, I've been experimenting a bit with adding a page number to
> olinks in PDFs. Everything looks great apart from two small issues:
> - the space behind a page number isn't rendered always in the same way.
> Sometimes the text is distributed evenly within a line and sometimes the
> space behind the page number is cut off and the number covers the next
> character in the line.
> - sometimes the line with a page number is not justified correctly.
> Please, have a look at the attached image to see what I mean.
>
Attachment:
wrong_rendering.png
Description: PNG image
Attachment:
correct_rendering.png
Description: PNG image
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]