You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Jocelin HEINEN (ext)" <jo...@atos.net.INVALID> on 2023/04/27 09:39:34 UTC
AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by "Jocelin HEINEN (ext)" <jo...@atos.net.INVALID>.
Hi,
And you were told right. That email ended in my spam folder which I did not check.
My email is now verified and we should be back on track.
Thank you for your help.
________________________________
De : Simon Steiner <si...@gmail.com>
Envoyé : vendredi 28 avril 2023 16:33
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
Im told:
The user has not yet verified their email address, so the request has not been sent to the PMC. Once the user verifies their email address (they should have a verification link in their inbox) the PMC will be notified of the request.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 28 April 2023 12:36
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
I tried to create an account again
[Image removed by sender. ...]Self-serve Platform
There is already a pending Jira account request associated with this email address. Please wait for it to be processed
Hopefully I did not make a mistake on the project name
Thank you,
________________________________
De : Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Envoyé : vendredi 28 avril 2023 09:08
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
I asked for xmlgraphics.
Maybe I made a mistake.
Should I do another self request?
Thank you,
________________________________
De : Simon Steiner <si...@gmail.com>
Envoyé : jeudi 27 avril 2023 16:50
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
We didn’t get a jira request, what project did you ask it from on the form.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 15:27
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Yes sorry about that still don't have a Jira account but will do when I have and can create the issue
________________________________
De : Glenn Adams <gl...@skynav.com>>
Envoyé : jeudi 27 avril 2023 16:22
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : Re: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Also, please put any example XML into an attachment rather than inlined in the problem description or a comment.
Thanks.
On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <si...@gmail.com>> wrote:
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
________________________________
De : Simon Steiner <si...@gmail.com>>
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by Simon Steiner <si...@gmail.com>.
Hi,
Im told:
The user has not yet verified their email address, so the request has not been sent to the PMC. Once the user verifies their email address (they should have a verification link in their inbox) the PMC will be notified of the request.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 28 April 2023 12:36
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
I tried to create an account again
Self-serve Platform
There is already a pending Jira account request associated with this email address. Please wait for it to be processed
Hopefully I did not make a mistake on the project name
Thank you,
_____
De : Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Envoyé : vendredi 28 avril 2023 09:08
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
I asked for xmlgraphics.
Maybe I made a mistake.
Should I do another self request?
Thank you,
_____
De : Simon Steiner <si...@gmail.com>
Envoyé : jeudi 27 avril 2023 16:50
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
We didn’t get a jira request, what project did you ask it from on the form.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 15:27
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Yes sorry about that still don't have a Jira account but will do when I have and can create the issue
_____
De : Glenn Adams <glenn@skynav.com <ma...@skynav.com> >
Envoyé : jeudi 27 avril 2023 16:22
À : fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> <fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> >
Objet : Re: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Also, please put any example XML into an attachment rather than inlined in the problem description or a comment.
Thanks.
On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <simonsteiner1984@gmail.com <ma...@gmail.com> > wrote:
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jocelin.heinen.external@atos.net.INVALID <ma...@atos.net.INVALID> >
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org>
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
_____
De : Simon Steiner <simonsteiner1984@gmail.com <ma...@gmail.com> >
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> <fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> >
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jocelin.heinen.external@atos.net.INVALID <ma...@atos.net.INVALID> >
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform <http://www.w3.org/1999/XSL/Transform%22> ">
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format <http://www.w3.org/1999/XSL/Format%22> ">
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by "Jocelin HEINEN (ext)" <jo...@atos.net.INVALID>.
Hi,
I tried to create an account again
[...]Self-serve Platform
There is already a pending Jira account request associated with this email address. Please wait for it to be processed
Hopefully I did not make a mistake on the project name
Thank you,
________________________________
De : Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Envoyé : vendredi 28 avril 2023 09:08
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
I asked for xmlgraphics.
Maybe I made a mistake.
Should I do another self request?
Thank you,
________________________________
De : Simon Steiner <si...@gmail.com>
Envoyé : jeudi 27 avril 2023 16:50
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
We didn’t get a jira request, what project did you ask it from on the form.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 15:27
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Yes sorry about that still don't have a Jira account but will do when I have and can create the issue
________________________________
De : Glenn Adams <gl...@skynav.com>>
Envoyé : jeudi 27 avril 2023 16:22
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : Re: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Also, please put any example XML into an attachment rather than inlined in the problem description or a comment.
Thanks.
On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <si...@gmail.com>> wrote:
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
________________________________
De : Simon Steiner <si...@gmail.com>>
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by "Jocelin HEINEN (ext)" <jo...@atos.net.INVALID>.
Hi,
I asked for xmlgraphics.
Maybe I made a mistake.
Should I do another self request?
Thank you,
________________________________
De : Simon Steiner <si...@gmail.com>
Envoyé : jeudi 27 avril 2023 16:50
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
We didn’t get a jira request, what project did you ask it from on the form.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 15:27
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Yes sorry about that still don't have a Jira account but will do when I have and can create the issue
________________________________
De : Glenn Adams <gl...@skynav.com>>
Envoyé : jeudi 27 avril 2023 16:22
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : Re: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Also, please put any example XML into an attachment rather than inlined in the problem description or a comment.
Thanks.
On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <si...@gmail.com>> wrote:
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
________________________________
De : Simon Steiner <si...@gmail.com>>
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by Simon Steiner <si...@gmail.com>.
Hi,
We didn’t get a jira request, what project did you ask it from on the form.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 15:27
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Yes sorry about that still don't have a Jira account but will do when I have and can create the issue
_____
De : Glenn Adams <glenn@skynav.com <ma...@skynav.com> >
Envoyé : jeudi 27 avril 2023 16:22
À : fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> <fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> >
Objet : Re: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Also, please put any example XML into an attachment rather than inlined in the problem description or a comment.
Thanks.
On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <simonsteiner1984@gmail.com <ma...@gmail.com> > wrote:
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jocelin.heinen.external@atos.net.INVALID <ma...@atos.net.INVALID> >
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org>
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
_____
De : Simon Steiner <simonsteiner1984@gmail.com <ma...@gmail.com> >
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> <fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> >
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jocelin.heinen.external@atos.net.INVALID <ma...@atos.net.INVALID> >
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform <http://www.w3.org/1999/XSL/Transform%22> ">
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format <http://www.w3.org/1999/XSL/Format%22> ">
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Re: AFP with custom font TTF generates space-letter-space
Posted by Glenn Adams <gl...@skynav.com>.
Pas de problème Jocelin. Juste une suggestion amicale.
G.
On Thu, Apr 27, 2023 at 9:27 AM Jocelin HEINEN (ext)
<jo...@atos.net.invalid> wrote:
> Yes sorry about that still don't have a Jira account but will do when I
> have and can create the issue
> ------------------------------
> *De :* Glenn Adams <gl...@skynav.com>
> *Envoyé :* jeudi 27 avril 2023 16:22
> *À :* fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
> *Objet :* Re: AFP with custom font TTF generates space-letter-space
>
> Caution: External email. Do not open attachments or click links, unless
> this email comes from a known sender and you know the content is safe.
>
> Also, please put any example XML into an attachment rather than inlined in
> the problem description or a comment.
>
> Thanks.
>
> On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <si...@gmail.com>
> wrote:
>
> Hi,
>
>
>
> You may need to open a bug in jira for us to check this.
>
>
>
> Thanks
>
>
>
> *From:* Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
> *Sent:* 27 April 2023 11:03
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* RE: AFP with custom font TTF generates space-letter-space
>
>
>
> Hi,
>
> Thank you for the quick answer.
> Unfortunately I did try a while ago that attribute and I did retry after
> your answer but still the same. (result below with position-by-char).
> I have also tried several others TTF but ended up with the exact same
> result.
>
>
>
> A r i a l a r i a l N a r i a l N B
>
> ESC
>
> AMB 223
>
> AMI 236
>
> SCFL 1
>
> SVI 11
> ------------------------------
>
> *De :* Simon Steiner <si...@gmail.com>
> *Envoyé :* jeudi 27 avril 2023 11:50
> *À :* fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
> *Objet :* RE: AFP with custom font TTF generates space-letter-space
>
>
>
> *Caution:* External email. Do not open attachments or click links, unless
> this email comes from a known sender and you know the content is safe.
>
>
>
> Hi,
>
>
>
> What about using:
>
>
>
> <font kerning="yes" embed-url="arial.ttf" name="Arial"
> position-by-char="false">
>
>
>
> Thanks
>
>
>
> *From:* Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
> *Sent:* 27 April 2023 10:40
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* AFP with custom font TTF generates space-letter-space
>
>
>
> Hi,
>
> I am producing an AFP file with Apache FOP 2.8 and java 17.
> In my fo.xconf file am using a custom font with the TTF format and I have
> using also a xsl file. (you can find them below)
>
> Altough then file renders properly when viewed with a tool like "Papyrus
> AFP viewer",
>
> I have noticed that the content has issues when analyzed using AFPexplorer.
>
> In the example below you see that the words are not generated words by
> words but space-letter-space which is causing problems during printing.
>
>
> *AFPexplorer*
>
> MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
>
>
>
> PTX tag:
> A r i a l a r i a l N a r i a l N B
>
> ESC
>
> AMB 223
>
> AMI 236
>
> SCFL 1
>
> SVI 11
>
> I do not understand what is missing to produce an AFP file with the
> correct structure.
>
> Any help is welcome 🙂
>
> Thank you for your time.
>
> Jo
>
>
> *fo.xconf*
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <fop version="1.0">
>
> <!-- Base URL for resolving relative URLs -->
> <base>.</base>
> <!-- <font-base> </font-base> -->
> <font-base>./</font-base>
>
> <strict-configuration>true</strict-configuration>
> <default-page-settings height="297mm" width="210mm"/>
>
>
> <renderers>
> <renderer mime="application/x-afp">
>
> <renderer-resolution>240</renderer-resolution>
> <images mode="color"/>
> <fonts>
> <font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
> <font-triplet name="Arial" style="normal" weight="normal"/>
> <font-triplet name="any" style="normal" weight="normal"/>
> </font>
> <font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
> <font-triplet name="arialN" style="normal" weight="normal"/>
> <font-triplet name="sans-serif" style="normal" weight="normal"/>
> <font-triplet name="Symbol" style="normal" weight="normal"/>
> <font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
> <font-triplet name="any" style="normal" weight="normal"/>
> </font>
> <font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
> <font-triplet name="arialNB" style="normal" weight="bold"/>
> <font-triplet name="SymbolNB" style="normal" weight="bold"/>
> <font-triplet name="any" style="normal" weight="bold"/>
> </font>
> </fonts>
> </renderer>
>
> </renderers>
>
> </fop>
>
> *XSL file*
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsl:stylesheet version="1.0" xmlns:xsl="
> http://www.w3.org/1999/XSL/Transform">
> <xsl:output />
> <xsl:attribute-set name="borderActivity">
> <xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
> </xsl:attribute-set>
> <xsl:template match="/">
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="first" page-height="29.7cm"
> page-width="21cm" margin-top="1cm"
> margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
> <fo:region-body margin-top="1cm"/>
> <fo:region-before extent="1cm"/>
> <fo:region-after extent="1.5cm"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="first">
> <fo:flow flow-name="xsl-region-body">
> <fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
> <fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
> <fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
> </fo:flow>
>
> </fo:page-sequence>
> </fo:root>
> </xsl:template>
> </xsl:stylesheet>
>
>
>
>
>
> Ce message et toutes les pièces jointes (ci-après le "message") sont
> établis à l’intention exclusive des destinataires désignés. Il contient des
> informations confidentielles et pouvant être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de détruire le message. Toute utilisation de
> ce message non conforme à sa destination, toute diffusion ou toute
> publication, totale ou partielle, est interdite, sauf autorisation expresse
> de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message
> lors de son acheminement, Atos (et ses filiales) décline(nt) toute
> responsabilité au titre de son contenu. Bien que ce message ait fait
> l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut
> garantir l’absence totale de logiciels malveillants dans son contenu et ne
> pourrait être tenu pour responsable des dommages engendrés par la
> transmission de l’un d’eux.
>
> This message and any attachments (the "message") are intended solely for
> the addressee(s). It contains confidential information, that may be
> privileged. If you receive this message in error, please notify the sender
> immediately and delete the message. Any use of the message in violation of
> its purpose, any dissemination or disclosure, either wholly or partially is
> strictly prohibited, unless it has been explicitly authorized by the
> sender. As its integrity cannot be secured on the internet, Atos and its
> subsidiaries decline any liability for the content of this message.
> Although the sender endeavors to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and will
> not be liable for any damages resulting from any virus transmitted.
>
> Ce message et toutes les pièces jointes (ci-après le "message") sont
> établis à l’intention exclusive des destinataires désignés. Il contient des
> informations confidentielles et pouvant être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de détruire le message. Toute utilisation de
> ce message non conforme à sa destination, toute diffusion ou toute
> publication, totale ou partielle, est interdite, sauf autorisation expresse
> de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message
> lors de son acheminement, Atos (et ses filiales) décline(nt) toute
> responsabilité au titre de son contenu. Bien que ce message ait fait
> l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut
> garantir l’absence totale de logiciels malveillants dans son contenu et ne
> pourrait être tenu pour responsable des dommages engendrés par la
> transmission de l’un d’eux.
>
> This message and any attachments (the "message") are intended solely for
> the addressee(s). It contains confidential information, that may be
> privileged. If you receive this message in error, please notify the sender
> immediately and delete the message. Any use of the message in violation of
> its purpose, any dissemination or disclosure, either wholly or partially is
> strictly prohibited, unless it has been explicitly authorized by the
> sender. As its integrity cannot be secured on the internet, Atos and its
> subsidiaries decline any liability for the content of this message.
> Although the sender endeavors to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and will
> not be liable for any damages resulting from any virus transmitted.
>
> Ce message et toutes les pièces jointes (ci-après le "message") sont
> établis à l’intention exclusive des destinataires désignés. Il contient des
> informations confidentielles et pouvant être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de détruire le message. Toute utilisation de
> ce message non conforme à sa destination, toute diffusion ou toute
> publication, totale ou partielle, est interdite, sauf autorisation expresse
> de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message
> lors de son acheminement, Atos (et ses filiales) décline(nt) toute
> responsabilité au titre de son contenu. Bien que ce message ait fait
> l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut
> garantir l’absence totale de logiciels malveillants dans son contenu et ne
> pourrait être tenu pour responsable des dommages engendrés par la
> transmission de l’un d’eux.
>
> This message and any attachments (the "message") are intended solely for
> the addressee(s). It contains confidential information, that may be
> privileged. If you receive this message in error, please notify the sender
> immediately and delete the message. Any use of the message in violation of
> its purpose, any dissemination or disclosure, either wholly or partially is
> strictly prohibited, unless it has been explicitly authorized by the
> sender. As its integrity cannot be secured on the internet, Atos and its
> subsidiaries decline any liability for the content of this message.
> Although the sender endeavors to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and will
> not be liable for any damages resulting from any virus transmitted.
>
RE: AFP with custom font TTF generates space-letter-space
Posted by "Jocelin HEINEN (ext)" <jo...@atos.net.INVALID>.
Yes sorry about that still don't have a Jira account but will do when I have and can create the issue
________________________________
De : Glenn Adams <gl...@skynav.com>
Envoyé : jeudi 27 avril 2023 16:22
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : Re: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Also, please put any example XML into an attachment rather than inlined in the problem description or a comment.
Thanks.
On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <si...@gmail.com>> wrote:
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
________________________________
De : Simon Steiner <si...@gmail.com>>
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Re: AFP with custom font TTF generates space-letter-space
Posted by Glenn Adams <gl...@skynav.com>.
Also, please put any example XML into an attachment rather than inlined in
the problem description or a comment.
Thanks.
On Thu, Apr 27, 2023 at 5:12 AM Simon Steiner <si...@gmail.com>
wrote:
> Hi,
>
>
>
> You may need to open a bug in jira for us to check this.
>
>
>
> Thanks
>
>
>
> *From:* Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
> *Sent:* 27 April 2023 11:03
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* RE: AFP with custom font TTF generates space-letter-space
>
>
>
> Hi,
>
> Thank you for the quick answer.
> Unfortunately I did try a while ago that attribute and I did retry after
> your answer but still the same. (result below with position-by-char).
> I have also tried several others TTF but ended up with the exact same
> result.
>
>
>
> A r i a l a r i a l N a r i a l N B
>
> ESC
>
> AMB 223
>
> AMI 236
>
> SCFL 1
>
> SVI 11
> ------------------------------
>
> *De :* Simon Steiner <si...@gmail.com>
> *Envoyé :* jeudi 27 avril 2023 11:50
> *À :* fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
> *Objet :* RE: AFP with custom font TTF generates space-letter-space
>
>
>
> *Caution:* External email. Do not open attachments or click links, unless
> this email comes from a known sender and you know the content is safe.
>
>
>
> Hi,
>
>
>
> What about using:
>
>
>
> <font kerning="yes" embed-url="arial.ttf" name="Arial"
> position-by-char="false">
>
>
>
> Thanks
>
>
>
> *From:* Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
> *Sent:* 27 April 2023 10:40
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* AFP with custom font TTF generates space-letter-space
>
>
>
> Hi,
>
> I am producing an AFP file with Apache FOP 2.8 and java 17.
> In my fo.xconf file am using a custom font with the TTF format and I have
> using also a xsl file. (you can find them below)
>
> Altough then file renders properly when viewed with a tool like "Papyrus
> AFP viewer",
>
> I have noticed that the content has issues when analyzed using AFPexplorer.
>
> In the example below you see that the words are not generated words by
> words but space-letter-space which is causing problems during printing.
>
>
> *AFPexplorer*
>
> MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
>
>
>
> PTX tag:
> A r i a l a r i a l N a r i a l N B
>
> ESC
>
> AMB 223
>
> AMI 236
>
> SCFL 1
>
> SVI 11
>
> I do not understand what is missing to produce an AFP file with the
> correct structure.
>
> Any help is welcome 🙂
>
> Thank you for your time.
>
> Jo
>
>
> *fo.xconf*
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <fop version="1.0">
>
> <!-- Base URL for resolving relative URLs -->
> <base>.</base>
> <!-- <font-base> </font-base> -->
> <font-base>./</font-base>
>
> <strict-configuration>true</strict-configuration>
> <default-page-settings height="297mm" width="210mm"/>
>
>
> <renderers>
> <renderer mime="application/x-afp">
>
> <renderer-resolution>240</renderer-resolution>
> <images mode="color"/>
> <fonts>
> <font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
> <font-triplet name="Arial" style="normal" weight="normal"/>
> <font-triplet name="any" style="normal" weight="normal"/>
> </font>
> <font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
> <font-triplet name="arialN" style="normal" weight="normal"/>
> <font-triplet name="sans-serif" style="normal" weight="normal"/>
> <font-triplet name="Symbol" style="normal" weight="normal"/>
> <font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
> <font-triplet name="any" style="normal" weight="normal"/>
> </font>
> <font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
> <font-triplet name="arialNB" style="normal" weight="bold"/>
> <font-triplet name="SymbolNB" style="normal" weight="bold"/>
> <font-triplet name="any" style="normal" weight="bold"/>
> </font>
> </fonts>
> </renderer>
>
> </renderers>
>
> </fop>
>
> *XSL file*
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <xsl:stylesheet version="1.0" xmlns:xsl="
> http://www.w3.org/1999/XSL/Transform">
> <xsl:output />
> <xsl:attribute-set name="borderActivity">
> <xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
> </xsl:attribute-set>
> <xsl:template match="/">
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="first" page-height="29.7cm"
> page-width="21cm" margin-top="1cm"
> margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
> <fo:region-body margin-top="1cm"/>
> <fo:region-before extent="1cm"/>
> <fo:region-after extent="1.5cm"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="first">
> <fo:flow flow-name="xsl-region-body">
> <fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
> <fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
> <fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
> </fo:flow>
>
> </fo:page-sequence>
> </fo:root>
> </xsl:template>
> </xsl:stylesheet>
>
>
>
>
>
> Ce message et toutes les pièces jointes (ci-après le "message") sont
> établis à l’intention exclusive des destinataires désignés. Il contient des
> informations confidentielles et pouvant être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de détruire le message. Toute utilisation de
> ce message non conforme à sa destination, toute diffusion ou toute
> publication, totale ou partielle, est interdite, sauf autorisation expresse
> de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message
> lors de son acheminement, Atos (et ses filiales) décline(nt) toute
> responsabilité au titre de son contenu. Bien que ce message ait fait
> l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut
> garantir l’absence totale de logiciels malveillants dans son contenu et ne
> pourrait être tenu pour responsable des dommages engendrés par la
> transmission de l’un d’eux.
>
> This message and any attachments (the "message") are intended solely for
> the addressee(s). It contains confidential information, that may be
> privileged. If you receive this message in error, please notify the sender
> immediately and delete the message. Any use of the message in violation of
> its purpose, any dissemination or disclosure, either wholly or partially is
> strictly prohibited, unless it has been explicitly authorized by the
> sender. As its integrity cannot be secured on the internet, Atos and its
> subsidiaries decline any liability for the content of this message.
> Although the sender endeavors to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and will
> not be liable for any damages resulting from any virus transmitted.
>
> Ce message et toutes les pièces jointes (ci-après le "message") sont
> établis à l’intention exclusive des destinataires désignés. Il contient des
> informations confidentielles et pouvant être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de détruire le message. Toute utilisation de
> ce message non conforme à sa destination, toute diffusion ou toute
> publication, totale ou partielle, est interdite, sauf autorisation expresse
> de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message
> lors de son acheminement, Atos (et ses filiales) décline(nt) toute
> responsabilité au titre de son contenu. Bien que ce message ait fait
> l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut
> garantir l’absence totale de logiciels malveillants dans son contenu et ne
> pourrait être tenu pour responsable des dommages engendrés par la
> transmission de l’un d’eux.
>
> This message and any attachments (the "message") are intended solely for
> the addressee(s). It contains confidential information, that may be
> privileged. If you receive this message in error, please notify the sender
> immediately and delete the message. Any use of the message in violation of
> its purpose, any dissemination or disclosure, either wholly or partially is
> strictly prohibited, unless it has been explicitly authorized by the
> sender. As its integrity cannot be secured on the internet, Atos and its
> subsidiaries decline any liability for the content of this message.
> Although the sender endeavors to maintain a computer virus-free network,
> the sender does not warrant that this transmission is virus-free and will
> not be liable for any damages resulting from any virus transmitted.
>
RE: AFP with custom font TTF generates space-letter-space
Posted by "Jocelin HEINEN (ext)" <jo...@atos.net.INVALID>.
Hi,
I did request the creation of a Jira account following your reply.
As soon as my account is granted I will open a bug to track this problem.
Thank you again Simon
________________________________
De : Simon Steiner <si...@gmail.com>
Envoyé : jeudi 27 avril 2023 12:11
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
________________________________
De : Simon Steiner <si...@gmail.com>>
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org> <fo...@xmlgraphics.apache.org>>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>>
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by Simon Steiner <si...@gmail.com>.
Hi,
You may need to open a bug in jira for us to check this.
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 11:03
To: fop-users@xmlgraphics.apache.org
Subject: RE: AFP with custom font TTF generates space-letter-space
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
_____
De : Simon Steiner <simonsteiner1984@gmail.com <ma...@gmail.com> >
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> <fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org> >
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jocelin.heinen.external@atos.net.INVALID <ma...@atos.net.INVALID> >
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org <ma...@xmlgraphics.apache.org>
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform <http://www.w3.org/1999/XSL/Transform%22> ">
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format <http://www.w3.org/1999/XSL/Format%22> ">
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by "Jocelin HEINEN (ext)" <jo...@atos.net.INVALID>.
Hi,
Thank you for the quick answer.
Unfortunately I did try a while ago that attribute and I did retry after your answer but still the same. (result below with position-by-char).
I have also tried several others TTF but ended up with the exact same result.
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
________________________________
De : Simon Steiner <si...@gmail.com>
Envoyé : jeudi 27 avril 2023 11:50
À : fop-users@xmlgraphics.apache.org <fo...@xmlgraphics.apache.org>
Objet : RE: AFP with custom font TTF generates space-letter-space
Caution: External email. Do not open attachments or click links, unless this email comes from a known sender and you know the content is safe.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"<http://www.w3.org/1999/XSL/Transform%22>>
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"<http://www.w3.org/1999/XSL/Format%22>>
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
RE: AFP with custom font TTF generates space-letter-space
Posted by Simon Steiner <si...@gmail.com>.
Hi,
What about using:
<font kerning="yes" embed-url="arial.ttf" name="Arial" position-by-char="false">
Thanks
From: Jocelin HEINEN (ext) <jo...@atos.net.INVALID>
Sent: 27 April 2023 10:40
To: fop-users@xmlgraphics.apache.org
Subject: AFP with custom font TTF generates space-letter-space
Hi,
I am producing an AFP file with Apache FOP 2.8 and java 17.
In my fo.xconf file am using a custom font with the TTF format and I have using also a xsl file. (you can find them below)
Altough then file renders properly when viewed with a tool like "Papyrus AFP viewer",
I have noticed that the content has issues when analyzed using AFPexplorer.
In the example below you see that the words are not generated words by words but space-letter-space which is causing problems during printing.
AFPexplorer
MDR: 1= A r i a l 2= a r i a l N 3= a r i a l N
PTX tag:
A r i a l a r i a l N a r i a l N B
ESC
AMB 223
AMI 236
SCFL 1
SVI 11
I do not understand what is missing to produce an AFP file with the correct structure.
Any help is welcome 🙂
Thank you for your time.
Jo
fo.xconf
<?xml version="1.0" encoding="UTF-8"?>
<fop version="1.0">
<!-- Base URL for resolving relative URLs -->
<base>.</base>
<!-- <font-base> </font-base> -->
<font-base>./</font-base>
<strict-configuration>true</strict-configuration>
<default-page-settings height="297mm" width="210mm"/>
<renderers>
<renderer mime="application/x-afp">
<renderer-resolution>240</renderer-resolution>
<images mode="color"/>
<fonts>
<font kerning="yes" name="Arial" embed-url="fonts/arial.ttf" >
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialN" embed-url="fonts/arialn.ttf" >
<font-triplet name="arialN" style="normal" weight="normal"/>
<font-triplet name="sans-serif" style="normal" weight="normal"/>
<font-triplet name="Symbol" style="normal" weight="normal"/>
<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
<font-triplet name="any" style="normal" weight="normal"/>
</font>
<font kerning="yes" name="arialNB" embed-url="fonts/arialnb.ttf">
<font-triplet name="arialNB" style="normal" weight="bold"/>
<font-triplet name="SymbolNB" style="normal" weight="bold"/>
<font-triplet name="any" style="normal" weight="bold"/>
</font>
</fonts>
</renderer>
</renderers>
</fop>
XSL file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform <http://www.w3.org/1999/XSL/Transform%22> ">
<xsl:output />
<xsl:attribute-set name="borderActivity">
<xsl:attribute name="border">solid 0.1mm black</xsl:attribute>
</xsl:attribute-set>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format <http://www.w3.org/1999/XSL/Format%22> ">
<fo:layout-master-set>
<fo:simple-page-master master-name="first" page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="1cm"/>
<fo:region-before extent="1cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="first">
<fo:flow flow-name="xsl-region-body">
<fo:block font-family="Arial" font-size="12pt">Arial</fo:block>
<fo:block font-family="arialN" font-size="12pt">arialN</fo:block>
<fo:block font-family="arialNB" font-size="12pt">arialNB</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.
This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.