Barcode fonts not displaying correctly when generating PCL

View: New views
16 Messages — Rating Filter:   Alert me  

Barcode fonts not displaying correctly when generating PCL

by Martin Edge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Guys,

Just wanted to check I’m doing everything correctly.

I am having some problems displaying barcodes in PCL.

http://www.asmorphic.net.au/images/barcodes.jpg is an example of what I’m
seeing.

As I edit the intermediate file, I have performed two tests:

- Generate AT using application/pdf then run –atin –pdf etc – and the
barcodes are displayed properly and scannable.
- Generate AT using application/vnd…..pcl etc – and the barcodes appear very
different and cannot be scanned.

I figure given the PDF renders the fonts partially, the fonts are being
properly loaded into the FOP engine.

My fop.xconf portions for PDF and PCL has:
      <fonts>
                      <directory>c:\pdfbin\fonts\</directory>
      </fonts>

.. and given you can see in the image the font partially works its
definitely loading OK .. Both fonts are True Type Fonts.

The FO content which displays the barcodes:

         <fo:block-container reference-orientation="90"
inline-progression-dimension="680pt">
            <fo:block font-family="3 of 9 Barcode" font-size="18pt"
background-color="white" text-align="start">*1234567890MLQIS*</fo:block>
         </fo:block-container>
      </fo:static-content>

And

                <fo:block text-align="start" margin-top="115pt"
margin-bottom="8pt">
                        <fo:inline font-family="Barcode 4-state"
font-size="12pt"
width="65mm">1301012211021200220022303333301003013</fo:inline>
                        <fo:inline font-family="Helvetica" font-size="6pt"
min-height="16pt"
                                  
border-top-width="-20mm">001/000001</fo:inline>
                     </fo:block>

Is there any thing I’m obviously doing wrong here – or is there a potential
problem? If as per the research below I have to create an image it’s
possible I guess – but a bit of a pain ..

Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
possible now!

http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html

;)

Thanks
Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Barcode fonts not displaying correctly when generating PCL

by Jeremias Maerki-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've already spent more time on free FOP support this week than I wanted
so I won't be taking a closer look just now. I hope you understand. If I
were you I'd switch to Barcode4J for the barcodes.

Do you generate the PDF and the PCL from the same intermediate file?
Please realize that these two renderers use diffferent font metrics
sources which could explain the bad output in PCL if the AT file was
generated mimicing the PDF renderer.

SVG in PCL works fine in newer releases, BTW.

On 11.07.2008 11:26:20 Martin Edge wrote:

> Hey Guys,
>
> Just wanted to check I’m doing everything correctly.
>
> I am having some problems displaying barcodes in PCL.
>
> http://www.asmorphic.net.au/images/barcodes.jpg is an example of what I’m
> seeing.
>
> As I edit the intermediate file, I have performed two tests:
>
> - Generate AT using application/pdf then run –atin –pdf etc – and the
> barcodes are displayed properly and scannable.
> - Generate AT using application/vnd…..pcl etc – and the barcodes appear very
> different and cannot be scanned.
>
> I figure given the PDF renders the fonts partially, the fonts are being
> properly loaded into the FOP engine.
>
> My fop.xconf portions for PDF and PCL has:
>       <fonts>
>                       <directory>c:\pdfbin\fonts\</directory>
>       </fonts>
>
> .. and given you can see in the image the font partially works its
> definitely loading OK .. Both fonts are True Type Fonts.
>
> The FO content which displays the barcodes:
>
>          <fo:block-container reference-orientation="90"
> inline-progression-dimension="680pt">
>             <fo:block font-family="3 of 9 Barcode" font-size="18pt"
> background-color="white" text-align="start">*1234567890MLQIS*</fo:block>
>          </fo:block-container>
>       </fo:static-content>
>
> And
>
>                 <fo:block text-align="start" margin-top="115pt"
> margin-bottom="8pt">
>                         <fo:inline font-family="Barcode 4-state"
> font-size="12pt"
> width="65mm">1301012211021200220022303333301003013</fo:inline>
>                         <fo:inline font-family="Helvetica" font-size="6pt"
> min-height="16pt"
>                                   
> border-top-width="-20mm">001/000001</fo:inline>
>                      </fo:block>
>
> Is there any thing I’m obviously doing wrong here – or is there a potential
> problem? If as per the research below I have to create an image it’s
> possible I guess – but a bit of a pain ..
>
> Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
> possible now!
>
> http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
> http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html
>
> ;)
>
> Thanks
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


RE: Barcode fonts not displaying correctly when generating PCL

by Martin Edge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey Jeremias,

No, I generated each from separate intermediate files generated
appropriately for the format it was destined for. It was part of my test
case to isolate the problem to the PCL render.

I'm using different barcode types with the fonts (3 of 9 and Australian
Postal Mail DPID barcodes) so I'm not sure the 4J will do it if it is purely
a font. Isn't each barcode type EAN, UPC13, 3of9, 4-State a different font?

Perhaps the way the PCL renderer interprets "auto registration of fonts"
differently than the PDF renderer. This was a new feature was it not? [which
meant no need to set metrics]

I appreciate that you have donated more time on free support - I'm sure
everyone who gets your help appreciates it! I was initially just asking for
confirmation that there is no major functionality limitation on why what I'm
trying is not working. I'm running on a pretty short timeline [not your
problem of course] and I didn't want to waste time testing all sorts of
tricks if the issue simply wasn't solvable.

I figured I need to give enough information to explain my situation. That
said it would be nice to know whether it is possible to get commercial
assistance in the future. (and if I cannot solve this problem). This last
challenge is pretty much the last one left before my product is ready!

I will of course dig further now I know what I'm trying to do in theory
should work - I guess I should probably start by trying to define a specific
font metric (assuming you still can) for these barcode fonts to see if it
makes any difference.

I noticed some of the emails from you dating back for ages.. Good job on
sticking with it.. All the guys have done a marvelous job.

Thanks again.
Martin.

-----Original Message-----
From: Jeremias Maerki [mailto:dev at jeremias-maerki.ch]
Sent: Friday, 11 July 2008 9:00 PM
To: fop-users@...
Subject: Re: Barcode fonts not displaying correctly when generating PCL

I've already spent more time on free FOP support this week than I wanted
so I won't be taking a closer look just now. I hope you understand. If I
were you I'd switch to Barcode4J for the barcodes.

Do you generate the PDF and the PCL from the same intermediate file?
Please realize that these two renderers use diffferent font metrics
sources which could explain the bad output in PCL if the AT file was
generated mimicing the PDF renderer.

SVG in PCL works fine in newer releases, BTW.

On 11.07.2008 11:26:20 Martin Edge wrote:

> Hey Guys,
>
> Just wanted to check I’m doing everything correctly.
>
> I am having some problems displaying barcodes in PCL.
>
> http://www.asmorphic.net.au/images/barcodes.jpg is an example of what I’m
> seeing.
>
> As I edit the intermediate file, I have performed two tests:
>
> - Generate AT using application/pdf then run –atin –pdf etc – and the
> barcodes are displayed properly and scannable.
> - Generate AT using application/vnd…..pcl etc – and the barcodes appear
very

> different and cannot be scanned.
>
> I figure given the PDF renders the fonts partially, the fonts are being
> properly loaded into the FOP engine.
>
> My fop.xconf portions for PDF and PCL has:
>       <fonts>
>                       <directory>c:\pdfbin\fonts\</directory>
>       </fonts>
>
> .. and given you can see in the image the font partially works its
> definitely loading OK .. Both fonts are True Type Fonts.
>
> The FO content which displays the barcodes:
>
>          <fo:block-container reference-orientation="90"
> inline-progression-dimension="680pt">
>             <fo:block font-family="3 of 9 Barcode" font-size="18pt"
> background-color="white" text-align="start">*1234567890MLQIS*</fo:block>
>          </fo:block-container>
>       </fo:static-content>
>
> And
>
>                 <fo:block text-align="start" margin-top="115pt"
> margin-bottom="8pt">
>                         <fo:inline font-family="Barcode 4-state"
> font-size="12pt"
> width="65mm">1301012211021200220022303333301003013</fo:inline>
>                         <fo:inline font-family="Helvetica" font-size="6pt"
> min-height="16pt"
>                                   
> border-top-width="-20mm">001/000001</fo:inline>
>                      </fo:block>
>
> Is there any thing I’m obviously doing wrong here – or is there a
potential

> problem? If as per the research below I have to create an image it’s
> possible I guess – but a bit of a pain ..
>
> Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
> possible now!
>
> http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
> http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html
>
> ;)
>
> Thanks
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Barcode fonts not displaying correctly when generating PCL

by Jeremias Maerki-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11.07.2008 13:40:04 Martin Edge wrote:
> Hey Jeremias,
>
> No, I generated each from separate intermediate files generated
> appropriately for the format it was destined for. It was part of my test
> case to isolate the problem to the PCL render.

Ok, so the different font metrics can be ruled out then. Could be that
AWT reports bad metrics for the barcode fonts (they are known to be a
bit problematic sometimes).

> I'm using different barcode types with the fonts (3 of 9 and Australian
> Postal Mail DPID barcodes) so I'm not sure the 4J will do it if it is purely
> a font.

Barcode4J doesn't support the Australian postal barcode. I've started
implementing it at some point but didn't finish.

> Isn't each barcode type EAN, UPC13, 3of9, 4-State a different font?

Using barcode fonts, yes. But Barcode4J doesn't use barcode fonts at all.
It paints the barcodes using drawing primitives.

> Perhaps the way the PCL renderer interprets "auto registration of fonts"
> differently than the PDF renderer. This was a new feature was it not? [which
> meant no need to set metrics]

Yes, but the font metrics still come from AWT/Java2D for PCL whereas
they come from FOP's own font library in the case of PDF.

> I appreciate that you have donated more time on free support - I'm sure
> everyone who gets your help appreciates it! I was initially just asking for
> confirmation that there is no major functionality limitation on why what I'm
> trying is not working. I'm running on a pretty short timeline [not your
> problem of course] and I didn't want to waste time testing all sorts of
> tricks if the issue simply wasn't solvable.

The reason for my reaction was that I don't have an idea what could be
wrong. I'd have to set up the same environment as you have (same font,
basically) to reproduce the problem and find out what goes wrong. Takes
time, obviously.

> I figured I need to give enough information to explain my situation. That
> said it would be nice to know whether it is possible to get commercial
> assistance in the future. (and if I cannot solve this problem). This last
> challenge is pretty much the last one left before my product is ready!
>
> I will of course dig further now I know what I'm trying to do in theory
> should work - I guess I should probably start by trying to define a specific
> font metric (assuming you still can) for these barcode fonts to see if it
> makes any difference.
>
> I noticed some of the emails from you dating back for ages.. Good job on
> sticking with it.. All the guys have done a marvelous job.

Thanks! Always feels good to hear that.

> Thanks again.
> Martin.
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev at jeremias-maerki.ch]
> Sent: Friday, 11 July 2008 9:00 PM
> To: fop-users@...
> Subject: Re: Barcode fonts not displaying correctly when generating PCL
>
> I've already spent more time on free FOP support this week than I wanted
> so I won't be taking a closer look just now. I hope you understand. If I
> were you I'd switch to Barcode4J for the barcodes.
>
> Do you generate the PDF and the PCL from the same intermediate file?
> Please realize that these two renderers use diffferent font metrics
> sources which could explain the bad output in PCL if the AT file was
> generated mimicing the PDF renderer.
>
> SVG in PCL works fine in newer releases, BTW.
>
> On 11.07.2008 11:26:20 Martin Edge wrote:
> > Hey Guys,
> >
> > Just wanted to check I’m doing everything correctly.
> >
> > I am having some problems displaying barcodes in PCL.
> >
> > http://www.asmorphic.net.au/images/barcodes.jpg is an example of what I’m
> > seeing.
> >
> > As I edit the intermediate file, I have performed two tests:
> >
> > - Generate AT using application/pdf then run –atin –pdf etc – and the
> > barcodes are displayed properly and scannable.
> > - Generate AT using application/vnd…..pcl etc – and the barcodes appear
> very
> > different and cannot be scanned.
> >
> > I figure given the PDF renders the fonts partially, the fonts are being
> > properly loaded into the FOP engine.
> >
> > My fop.xconf portions for PDF and PCL has:
> >       <fonts>
> >                       <directory>c:\pdfbin\fonts\</directory>
> >       </fonts>
> >
> > .. and given you can see in the image the font partially works its
> > definitely loading OK .. Both fonts are True Type Fonts.
> >
> > The FO content which displays the barcodes:
> >
> >          <fo:block-container reference-orientation="90"
> > inline-progression-dimension="680pt">
> >             <fo:block font-family="3 of 9 Barcode" font-size="18pt"
> > background-color="white" text-align="start">*1234567890MLQIS*</fo:block>
> >          </fo:block-container>
> >       </fo:static-content>
> >
> > And
> >
> >                 <fo:block text-align="start" margin-top="115pt"
> > margin-bottom="8pt">
> >                         <fo:inline font-family="Barcode 4-state"
> > font-size="12pt"
> > width="65mm">1301012211021200220022303333301003013</fo:inline>
> >                         <fo:inline font-family="Helvetica" font-size="6pt"
> > min-height="16pt"
> >                                   
> > border-top-width="-20mm">001/000001</fo:inline>
> >                      </fo:block>
> >
> > Is there any thing I’m obviously doing wrong here – or is there a
> potential
> > problem? If as per the research below I have to create an image it’s
> > possible I guess – but a bit of a pain ..
> >
> > Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
> > possible now!
> >
> > http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
> > http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html
> >
> > ;)
> >
> > Thanks
> > Martin
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@...
> > For additional commands, e-mail: fop-users-help@...
> >
>
>
>
>
> Jeremias Maerki
>
>




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


RE: Barcode fonts not displaying correctly when generating PCL

by Martin Edge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey -

AWT - From what I can see (I'm still only new to all of this) looks like the
java class that generates these metrics??

So - in regards to the 4J what you are saying is the main barcode I'm
printing is probably reproducible (assuming I can figure out how to use it)
- but the postal portion isn't - how far did you get along with it ?

With the origin of the fonts for the PCL renderer - is this something that
could be feasibly developed [this is not a request, more a question of
feasibility ;)]

As for setting up an environment, If the need arose I could easily supply
the font and a snippet of FO which utilizes it, and a c# program which will
generate each format.  I'm more than happy to prepare a you-hit-one-button-
to-see-what-I-mean test case.

I assume whether we utilize the intermediate format or not will not make any
difference, effectively any FO file which utilizes these fonts would have
the same output even if we went direct.. Don't you think?

Thanks again,
Martin

On 11.07.2008 13:40:04 Martin Edge wrote:
> Hey Jeremias,
>
> No, I generated each from separate intermediate files generated
> appropriately for the format it was destined for. It was part of my test
> case to isolate the problem to the PCL render.

Ok, so the different font metrics can be ruled out then. Could be that
AWT reports bad metrics for the barcode fonts (they are known to be a
bit problematic sometimes).

> I'm using different barcode types with the fonts (3 of 9 and Australian
> Postal Mail DPID barcodes) so I'm not sure the 4J will do it if it is
purely
> a font.

Barcode4J doesn't support the Australian postal barcode. I've started
implementing it at some point but didn't finish.

> Isn't each barcode type EAN, UPC13, 3of9, 4-State a different font?

Using barcode fonts, yes. But Barcode4J doesn't use barcode fonts at all.
It paints the barcodes using drawing primitives.

> Perhaps the way the PCL renderer interprets "auto registration of fonts"
> differently than the PDF renderer. This was a new feature was it not?
[which
> meant no need to set metrics]

Yes, but the font metrics still come from AWT/Java2D for PCL whereas
they come from FOP's own font library in the case of PDF.

> I appreciate that you have donated more time on free support - I'm sure
> everyone who gets your help appreciates it! I was initially just asking
for
> confirmation that there is no major functionality limitation on why what
I'm
> trying is not working. I'm running on a pretty short timeline [not your
> problem of course] and I didn't want to waste time testing all sorts of
> tricks if the issue simply wasn't solvable.

The reason for my reaction was that I don't have an idea what could be
wrong. I'd have to set up the same environment as you have (same font,
basically) to reproduce the problem and find out what goes wrong. Takes
time, obviously.

> I figured I need to give enough information to explain my situation. That
> said it would be nice to know whether it is possible to get commercial
> assistance in the future. (and if I cannot solve this problem). This last
> challenge is pretty much the last one left before my product is ready!
>
> I will of course dig further now I know what I'm trying to do in theory
> should work - I guess I should probably start by trying to define a
specific
> font metric (assuming you still can) for these barcode fonts to see if it
> makes any difference.
>
> I noticed some of the emails from you dating back for ages.. Good job on
> sticking with it.. All the guys have done a marvelous job.

Thanks! Always feels good to hear that.

> Thanks again.
> Martin.
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev at jeremias-maerki.ch]
> Sent: Friday, 11 July 2008 9:00 PM
> To: fop-users@...
> Subject: Re: Barcode fonts not displaying correctly when generating PCL
>
> I've already spent more time on free FOP support this week than I wanted
> so I won't be taking a closer look just now. I hope you understand. If I
> were you I'd switch to Barcode4J for the barcodes.
>
> Do you generate the PDF and the PCL from the same intermediate file?
> Please realize that these two renderers use diffferent font metrics
> sources which could explain the bad output in PCL if the AT file was
> generated mimicing the PDF renderer.
>
> SVG in PCL works fine in newer releases, BTW.
>
> On 11.07.2008 11:26:20 Martin Edge wrote:
> > Hey Guys,
> >
> > Just wanted to check I’m doing everything correctly.
> >
> > I am having some problems displaying barcodes in PCL.
> >
> > http://www.asmorphic.net.au/images/barcodes.jpg is an example of what
I’m

> > seeing.
> >
> > As I edit the intermediate file, I have performed two tests:
> >
> > - Generate AT using application/pdf then run –atin –pdf etc – and the
> > barcodes are displayed properly and scannable.
> > - Generate AT using application/vnd…..pcl etc – and the barcodes appear
> very
> > different and cannot be scanned.
> >
> > I figure given the PDF renders the fonts partially, the fonts are being
> > properly loaded into the FOP engine.
> >
> > My fop.xconf portions for PDF and PCL has:
> >       <fonts>
> >                       <directory>c:\pdfbin\fonts\</directory>
> >       </fonts>
> >
> > .. and given you can see in the image the font partially works its
> > definitely loading OK .. Both fonts are True Type Fonts.
> >
> > The FO content which displays the barcodes:
> >
> >          <fo:block-container reference-orientation="90"
> > inline-progression-dimension="680pt">
> >             <fo:block font-family="3 of 9 Barcode" font-size="18pt"
> > background-color="white" text-align="start">*1234567890MLQIS*</fo:block>
> >          </fo:block-container>
> >       </fo:static-content>
> >
> > And
> >
> >                 <fo:block text-align="start" margin-top="115pt"
> > margin-bottom="8pt">
> >                         <fo:inline font-family="Barcode 4-state"
> > font-size="12pt"
> > width="65mm">1301012211021200220022303333301003013</fo:inline>
> >                         <fo:inline font-family="Helvetica"
font-size="6pt"

> > min-height="16pt"
> >                                   
> > border-top-width="-20mm">001/000001</fo:inline>
> >                      </fo:block>
> >
> > Is there any thing I’m obviously doing wrong here – or is there a
> potential
> > problem? If as per the research below I have to create an image it’s
> > possible I guess – but a bit of a pain ..
> >
> > Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
> > possible now!
> >
> > http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
> > http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html
> >
> > ;)
> >
> > Thanks
> > Martin
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@...
> > For additional commands, e-mail: fop-users-help@...
> >
>
>
>
>
> Jeremias Maerki
>
>




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Barcode fonts not displaying correctly when generating PCL

by Jeremias Maerki-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 11.07.2008 14:21:17 Martin Edge wrote:
> Hey -
>
> AWT - From what I can see (I'm still only new to all of this) looks like the
> java class that generates these metrics??

It's not a single class that does that. AWT is a subsystem of the Java
class library. Part of AWT deals with fonts which are available through
the operating system. Since the PCL renderer uses Java2D for painting
custom fonts, these fonts have to be installed in the OS and Graphics2D
routines are used to paint the fonts to bitmaps which are then put in
the PCL file. PCL supports TrueType directly but this is not implemented
and would be quite difficult to implement as far as I've seen. Did I
mention that PCL is the one printer format I like least? ;-)

> So - in regards to the 4J what you are saying is the main barcode I'm
> printing is probably reproducible (assuming I can figure out how to use it)
> - but the postal portion isn't - how far did you get along with it ?

Maybe 1 - 1.5 days left. I don't have all the details present anymore.

> With the origin of the fonts for the PCL renderer - is this something that
> could be feasibly developed [this is not a request, more a question of
> feasibility ;)]

Do you refer to Barcode4J? As I said earlier, fonts are not involed when
when painting barcodes using Barcode4J, at least not for the bars.

> As for setting up an environment, If the need arose I could easily supply
> the font and a snippet of FO which utilizes it, and a c# program which will
> generate each format.  I'm more than happy to prepare a you-hit-one-button-
> to-see-what-I-mean test case.

The original FO file, the intermediate file you produced with your
barcodes plus the barcode font should suffice to reproduce the problem.

> I assume whether we utilize the intermediate format or not will not make any
> difference, effectively any FO file which utilizes these fonts would have
> the same output even if we went direct.. Don't you think?

Well, there could be side-effects from using the intermediate format
which we haven't encountered, yet. But ideally not, of course. If you
generate an FO file and


> Thanks again,
> Martin
>
> On 11.07.2008 13:40:04 Martin Edge wrote:
> > Hey Jeremias,
> >
> > No, I generated each from separate intermediate files generated
> > appropriately for the format it was destined for. It was part of my test
> > case to isolate the problem to the PCL render.
>
> Ok, so the different font metrics can be ruled out then. Could be that
> AWT reports bad metrics for the barcode fonts (they are known to be a
> bit problematic sometimes).
>
> > I'm using different barcode types with the fonts (3 of 9 and Australian
> > Postal Mail DPID barcodes) so I'm not sure the 4J will do it if it is
> purely
> > a font.
>
> Barcode4J doesn't support the Australian postal barcode. I've started
> implementing it at some point but didn't finish.
>
> > Isn't each barcode type EAN, UPC13, 3of9, 4-State a different font?
>
> Using barcode fonts, yes. But Barcode4J doesn't use barcode fonts at all.
> It paints the barcodes using drawing primitives.
>
> > Perhaps the way the PCL renderer interprets "auto registration of fonts"
> > differently than the PDF renderer. This was a new feature was it not?
> [which
> > meant no need to set metrics]
>
> Yes, but the font metrics still come from AWT/Java2D for PCL whereas
> they come from FOP's own font library in the case of PDF.
>
> > I appreciate that you have donated more time on free support - I'm sure
> > everyone who gets your help appreciates it! I was initially just asking
> for
> > confirmation that there is no major functionality limitation on why what
> I'm
> > trying is not working. I'm running on a pretty short timeline [not your
> > problem of course] and I didn't want to waste time testing all sorts of
> > tricks if the issue simply wasn't solvable.
>
> The reason for my reaction was that I don't have an idea what could be
> wrong. I'd have to set up the same environment as you have (same font,
> basically) to reproduce the problem and find out what goes wrong. Takes
> time, obviously.
>
> > I figured I need to give enough information to explain my situation. That
> > said it would be nice to know whether it is possible to get commercial
> > assistance in the future. (and if I cannot solve this problem). This last
> > challenge is pretty much the last one left before my product is ready!
> >
> > I will of course dig further now I know what I'm trying to do in theory
> > should work - I guess I should probably start by trying to define a
> specific
> > font metric (assuming you still can) for these barcode fonts to see if it
> > makes any difference.
> >
> > I noticed some of the emails from you dating back for ages.. Good job on
> > sticking with it.. All the guys have done a marvelous job.
>
> Thanks! Always feels good to hear that.
>
> > Thanks again.
> > Martin.
> >
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev at jeremias-maerki.ch]
> > Sent: Friday, 11 July 2008 9:00 PM
> > To: fop-users@...
> > Subject: Re: Barcode fonts not displaying correctly when generating PCL
> >
> > I've already spent more time on free FOP support this week than I wanted
> > so I won't be taking a closer look just now. I hope you understand. If I
> > were you I'd switch to Barcode4J for the barcodes.
> >
> > Do you generate the PDF and the PCL from the same intermediate file?
> > Please realize that these two renderers use diffferent font metrics
> > sources which could explain the bad output in PCL if the AT file was
> > generated mimicing the PDF renderer.
> >
> > SVG in PCL works fine in newer releases, BTW.
> >
> > On 11.07.2008 11:26:20 Martin Edge wrote:
> > > Hey Guys,
> > >
> > > Just wanted to check I’m doing everything correctly.
> > >
> > > I am having some problems displaying barcodes in PCL.
> > >
> > > http://www.asmorphic.net.au/images/barcodes.jpg is an example of what
> I’m
> > > seeing.
> > >
> > > As I edit the intermediate file, I have performed two tests:
> > >
> > > - Generate AT using application/pdf then run –atin –pdf etc – and the
> > > barcodes are displayed properly and scannable.
> > > - Generate AT using application/vnd…..pcl etc – and the barcodes appear
> > very
> > > different and cannot be scanned.
> > >
> > > I figure given the PDF renders the fonts partially, the fonts are being
> > > properly loaded into the FOP engine.
> > >
> > > My fop.xconf portions for PDF and PCL has:
> > >       <fonts>
> > >                       <directory>c:\pdfbin\fonts\</directory>
> > >       </fonts>
> > >
> > > .. and given you can see in the image the font partially works its
> > > definitely loading OK .. Both fonts are True Type Fonts.
> > >
> > > The FO content which displays the barcodes:
> > >
> > >          <fo:block-container reference-orientation="90"
> > > inline-progression-dimension="680pt">
> > >             <fo:block font-family="3 of 9 Barcode" font-size="18pt"
> > > background-color="white" text-align="start">*1234567890MLQIS*</fo:block>
> > >          </fo:block-container>
> > >       </fo:static-content>
> > >
> > > And
> > >
> > >                 <fo:block text-align="start" margin-top="115pt"
> > > margin-bottom="8pt">
> > >                         <fo:inline font-family="Barcode 4-state"
> > > font-size="12pt"
> > > width="65mm">1301012211021200220022303333301003013</fo:inline>
> > >                         <fo:inline font-family="Helvetica"
> font-size="6pt"
> > > min-height="16pt"
> > >                                   
> > > border-top-width="-20mm">001/000001</fo:inline>
> > >                      </fo:block>
> > >
> > > Is there any thing I’m obviously doing wrong here – or is there a
> > potential
> > > problem? If as per the research below I have to create an image it’s
> > > possible I guess – but a bit of a pain ..
> > >
> > > Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
> > > possible now!
> > >
> > > http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
> > > http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html
> > >
> > > ;)
> > >
> > > Thanks
> > > Martin
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: fop-users-unsubscribe@...
> > > For additional commands, e-mail: fop-users-help@...
> > >
> >
> >
> >
> >
> > Jeremias Maerki
> >
> >
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Barcode fonts not displaying correctly when generating PCL

by David Gerdt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just in case it could be this simple...
 
I've only played with barcodes and I used Barcode4J, not fonts, but I had similar trouble with how barcodes were rendered when I first started playing with FOP because I didn't specify the target resolution for the PCL renderer. When I set it to 300 my barcodes came out right.

>>> "Martin Edge" <Martin.Edge@...> 7/11/2008 5:26 AM >>>
Hey Guys,

Just wanted to check I’m doing everything correctly.

I am having some problems displaying barcodes in PCL.

http://www.asmorphic.net.au/images/barcodes.jpg is an example of what I’m
seeing.

As I edit the intermediate file, I have performed two tests:

- Generate AT using application/pdf then run –atin –pdf etc – and the
barcodes are displayed properly and scannable.
- Generate AT using application/vnd…..pcl etc – and the barcodes appear very
different and cannot be scanned.

I figure given the PDF renders the fonts partially, the fonts are being
properly loaded into the FOP engine.

My fop.xconf portions for PDF and PCL has:
      <fonts>
                      <directory>c:\pdfbin\fonts\</directory>
      </fonts>

.. and given you can see in the image the font partially works its
definitely loading OK .. Both fonts are True Type Fonts.

The FO content which displays the barcodes:

         <fo:block-container reference-orientation="90"
inline-progression-dimension="680pt">
            <fo:block font-family="3 of 9 Barcode" font-size="18pt"
background-color="white" text-align="start">*1234567890MLQIS*</fo:block>
         </fo:block-container>
      </fo:static-content>

And

                <fo:block text-align="start" margin-top="115pt"
margin-bottom="8pt">
                        <fo:inline font-family="Barcode 4-state"
font-size="12pt"
width="65mm">1301012211021200220022303333301003013</fo:inline>
                        <fo:inline font-family="Helvetica" font-size="6pt"
min-height="16pt"
                                 
border-top-width="-20mm">001/000001</fo:inline>
                     </fo:block>

Is there any thing I’m obviously doing wrong here – or is there a potential
problem? If as per the research below I have to create an image it’s
possible I guess – but a bit of a pain ..

Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
possible now!

http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html

;)

Thanks
Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


RE: Barcode fonts not displaying correctly when generating PCL

by Martin Edge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Subject: Re: Barcode fonts not displaying correctly when generating PCL
On 11.07.2008 14:21:17 Martin Edge wrote:
> Hey -
>
> AWT - From what I can see (I'm still only new to all of this) looks like
the
> java class that generates these metrics??

It's not a single class that does that. AWT is a subsystem of the Java
class library. Part of AWT deals with fonts which are available through
the operating system. Since the PCL renderer uses Java2D for painting
custom fonts, these fonts have to be installed in the OS and Graphics2D
routines are used to paint the fonts to bitmaps which are then put in
the PCL file. PCL supports TrueType directly but this is not implemented
and would be quite difficult to implement as far as I've seen. Did I
mention that PCL is the one printer format I like least? ;-)

- Fair enough - so there is a good chance it won't be easy for me to solve
this myself :-)
- The people I'm working with may not be fully aware of the capabilities of
their printer hardware, they use commercial high speed Xerox machines - they
have said it _doesn't_ support postscript - but surely this would be
strange?? I thought postscript was the most generic supported by everything
format??

> So - in regards to the 4J what you are saying is the main barcode I'm
> printing is probably reproducible (assuming I can figure out how to use
it)
> - but the postal portion isn't - how far did you get along with it ?

Maybe 1 - 1.5 days left. I don't have all the details present anymore.

> With the origin of the fonts for the PCL renderer - is this something that
> could be feasibly developed [this is not a request, more a question of
> feasibility ;)]

Do you refer to Barcode4J? As I said earlier, fonts are not involed when
when painting barcodes using Barcode4J, at least not for the bars.

- OK so given it isn't a font - where would I start in learning how to drive
it (knowing nothing about it at this point) to build my appropriate barcode
in the required format [excluding the aust post one of course]

> As for setting up an environment, If the need arose I could easily supply
> the font and a snippet of FO which utilizes it, and a c# program which
will
> generate each format.  I'm more than happy to prepare a
you-hit-one-button-
> to-see-what-I-mean test case.

The original FO file, the intermediate file you produced with your
barcodes plus the barcode font should suffice to reproduce the problem.

- OK - I'll fiddle on Sunday my time with it anyway - but will send the FO
file etc then as well. (if you don't mind looking of course)

> I assume whether we utilize the intermediate format or not will not make
any
> difference, effectively any FO file which utilizes these fonts would have
> the same output even if we went direct.. Don't you think?

Well, there could be side-effects from using the intermediate format
which we haven't encountered, yet. But ideally not, of course. If you
generate an FO file and

- ....and..  ? ;) Providing we're on the same page, I guess what I'm saying
is whether I actually create the intermediate file or just bypass it
shouldn't change the outcome.

- In a funny twist I raided google to try and isolate more information about
my issue - found the keywords which looked like it might be the answer -
turned out to be one of my own questions to this forum on a slightly
different topic - I guess I wasn't much help to me haha.

Cheers
Martin.


> Thanks again,
> Martin
>
> On 11.07.2008 13:40:04 Martin Edge wrote:
> > Hey Jeremias,
> >
> > No, I generated each from separate intermediate files generated
> > appropriately for the format it was destined for. It was part of my test
> > case to isolate the problem to the PCL render.
>
> Ok, so the different font metrics can be ruled out then. Could be that
> AWT reports bad metrics for the barcode fonts (they are known to be a
> bit problematic sometimes).
>
> > I'm using different barcode types with the fonts (3 of 9 and Australian
> > Postal Mail DPID barcodes) so I'm not sure the 4J will do it if it is
> purely
> > a font.
>
> Barcode4J doesn't support the Australian postal barcode. I've started
> implementing it at some point but didn't finish.
>
> > Isn't each barcode type EAN, UPC13, 3of9, 4-State a different font?
>
> Using barcode fonts, yes. But Barcode4J doesn't use barcode fonts at all.
> It paints the barcodes using drawing primitives.
>
> > Perhaps the way the PCL renderer interprets "auto registration of fonts"
> > differently than the PDF renderer. This was a new feature was it not?
> [which
> > meant no need to set metrics]
>
> Yes, but the font metrics still come from AWT/Java2D for PCL whereas
> they come from FOP's own font library in the case of PDF.
>
> > I appreciate that you have donated more time on free support - I'm sure
> > everyone who gets your help appreciates it! I was initially just asking
> for
> > confirmation that there is no major functionality limitation on why what
> I'm
> > trying is not working. I'm running on a pretty short timeline [not your
> > problem of course] and I didn't want to waste time testing all sorts of
> > tricks if the issue simply wasn't solvable.
>
> The reason for my reaction was that I don't have an idea what could be
> wrong. I'd have to set up the same environment as you have (same font,
> basically) to reproduce the problem and find out what goes wrong. Takes
> time, obviously.
>
> > I figured I need to give enough information to explain my situation.
That
> > said it would be nice to know whether it is possible to get commercial
> > assistance in the future. (and if I cannot solve this problem). This
last
> > challenge is pretty much the last one left before my product is ready!
> >
> > I will of course dig further now I know what I'm trying to do in theory
> > should work - I guess I should probably start by trying to define a
> specific
> > font metric (assuming you still can) for these barcode fonts to see if
it

> > makes any difference.
> >
> > I noticed some of the emails from you dating back for ages.. Good job on
> > sticking with it.. All the guys have done a marvelous job.
>
> Thanks! Always feels good to hear that.
>
> > Thanks again.
> > Martin.
> >
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev at jeremias-maerki.ch]
> > Sent: Friday, 11 July 2008 9:00 PM
> > To: fop-users@...
> > Subject: Re: Barcode fonts not displaying correctly when generating PCL
> >
> > I've already spent more time on free FOP support this week than I wanted
> > so I won't be taking a closer look just now. I hope you understand. If I
> > were you I'd switch to Barcode4J for the barcodes.
> >
> > Do you generate the PDF and the PCL from the same intermediate file?
> > Please realize that these two renderers use diffferent font metrics
> > sources which could explain the bad output in PCL if the AT file was
> > generated mimicing the PDF renderer.
> >
> > SVG in PCL works fine in newer releases, BTW.
> >
> > On 11.07.2008 11:26:20 Martin Edge wrote:
> > > Hey Guys,
> > >
> > > Just wanted to check I’m doing everything correctly.
> > >
> > > I am having some problems displaying barcodes in PCL.
> > >
> > > http://www.asmorphic.net.au/images/barcodes.jpg is an example of what
> I’m
> > > seeing.
> > >
> > > As I edit the intermediate file, I have performed two tests:
> > >
> > > - Generate AT using application/pdf then run –atin –pdf etc – and the
> > > barcodes are displayed properly and scannable.
> > > - Generate AT using application/vnd…..pcl etc – and the barcodes
appear
> > very
> > > different and cannot be scanned.
> > >
> > > I figure given the PDF renders the fonts partially, the fonts are
being

> > > properly loaded into the FOP engine.
> > >
> > > My fop.xconf portions for PDF and PCL has:
> > >       <fonts>
> > >                       <directory>c:\pdfbin\fonts\</directory>
> > >       </fonts>
> > >
> > > .. and given you can see in the image the font partially works its
> > > definitely loading OK .. Both fonts are True Type Fonts.
> > >
> > > The FO content which displays the barcodes:
> > >
> > >          <fo:block-container reference-orientation="90"
> > > inline-progression-dimension="680pt">
> > >             <fo:block font-family="3 of 9 Barcode" font-size="18pt"
> > > background-color="white"
text-align="start">*1234567890MLQIS*</fo:block>

> > >          </fo:block-container>
> > >       </fo:static-content>
> > >
> > > And
> > >
> > >                 <fo:block text-align="start" margin-top="115pt"
> > > margin-bottom="8pt">
> > >                         <fo:inline font-family="Barcode 4-state"
> > > font-size="12pt"
> > > width="65mm">1301012211021200220022303333301003013</fo:inline>
> > >                         <fo:inline font-family="Helvetica"
> font-size="6pt"
> > > min-height="16pt"
> > >                                   
> > > border-top-width="-20mm">001/000001</fo:inline>
> > >                      </fo:block>
> > >
> > > Is there any thing I’m obviously doing wrong here – or is there a
> > potential
> > > problem? If as per the research below I have to create an image it’s
> > > possible I guess – but a bit of a pain ..
> > >
> > > Jeremias – I found some  of your emails from 2002/2003 – I hope it’s
> > > possible now!
> > >
> > > http://osdir.com/ml/krysalis.devel/2003-12/msg00010.html
> > > http://osdir.com/ml/text.xml.fop.devel/2002-11/msg00231.html
> > >
> > > ;)
> > >
> > > Thanks
> > > Martin
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: fop-users-unsubscribe@...
> > > For additional commands, e-mail: fop-users-help@...
> > >
> >
> >
> >
> >
> > Jeremias Maerki
> >
> >
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


RE: Barcode fonts not displaying correctly when generating PCL

by Martin Edge-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK - Just tried the test by changing the source and target DPI to 300. The
filesize of course doubled, but unfortunately using my trial version of
RedTitan EscapeE (I hope the viewer is behaving as well) shows the barcode
fonts still weirdly rendered.

I'm guessing I'm going to have to learn the Barcode4J thing.

Thanks for the help
Martin.


-----Original Message-----
From: Martin Edge [mailto:Martin.Edge@...]
Sent: Friday, 11 July 2008 11:06 PM
To: fop-users@...
Subject: RE: Barcode fonts not displaying correctly when generating PCL


Subject: Re: Barcode fonts not displaying correctly when generating PCL
On 11.07.2008 14:21:17 Martin Edge wrote:
> Hey -
>
> AWT - From what I can see (I'm still only new to all of this) looks like
the
> java class that generates these metrics??

It's not a single class that does that. AWT is a subsystem of the Java
class library. Part of AWT deals with fonts which are available through
the operating system. Since the PCL renderer uses Java2D for painting
custom fonts, these fonts have to be installed in the OS and Graphics2D
routines are used to paint the fonts to bitmaps which are then put in
the PCL file. PCL supports TrueType directly but this is not implemented
and would be quite difficult to implement as far as I've seen. Did I
mention that PCL is the one printer format I like least? ;-)

- Fair enough - so there is a good chance it won't be easy for me to solve
this myself :-)
- The people I'm working with may not be fully aware of the capabilities of
their printer hardware, they use commercial high speed Xerox machines - they
have said it _doesn't_ support postscript - but surely this would be
strange?? I thought postscript was the most generic supported by everything
format??

> So - in regards to the 4J what you are saying is the main barcode I'm
> printing is probably reproducible (assuming I can figure out how to use
it)
> - but the postal portion isn't - how far did you get along with it ?

Maybe 1 - 1.5 days left. I don't have all the details present anymore.

> With the origin of the fonts for the PCL renderer - is this something that
> could be feasibly developed [this is not a request, more a question of
> feasibility ;)]

Do you refer to Barcode4J? As I said earlier, fonts are not involed when
when painting barcodes using Barcode4J, at least not for the bars.

- OK so given it isn't a font - where would I start in learning how to drive
it (knowing nothing about it at this point) to build my appropriate barcode
in the required format [excluding the aust post one of course]

> As for setting up an environment, If the need arose I could easily supply
> the font and a snippet of FO which utilizes it, and a c# program which
will
> generate each format.  I'm more than happy to prepare a
you-hit-one-button-
> to-see-what-I-mean test case.

The original FO file, the intermediate file you produced with your
barcodes plus the barcode font should suffice to reproduce the problem.

- OK - I'll fiddle on Sunday my time with it anyway - but will send the FO
file etc then as well. (if you don't mind looking of course)

> I assume whether we utilize the intermediate format or not will not make
any
> difference, effectively any FO file which utilizes these fonts would have
> the same output even if we went direct.. Don't you think?

Well, there could be side-effects from using the intermediate format
which we haven't encountered, yet. But ideally not, of course. If you
generate an FO file and

- ....and..  ? ;) Providing we're on the same page, I guess what I'm saying
is whether I actually create the intermediate file or just bypass it
shouldn't change the outcome.

- In a funny twist I raided google to try and isolate more information about
my issue - found the keywords which looked like it might be the answer -
turned out to be one of my own questions to this forum on a slightly
different topic - I guess I wasn't much help to me haha.

Cheers
Martin.


> Thanks again,
> Martin
>
> On 11.07.2008 13:40:04 Martin Edge wrote:
> > Hey Jeremias,
> >
> > No, I generated each from separate intermediate files generated
> > appropriately for the format it was destined for. It was part of my test
> > case to isolate the problem to the PCL render.
>
> Ok, so the different font metrics can be ruled out then. Could be that
> AWT reports bad metrics for the barcode fonts (they are known to be a
> bit problematic sometimes).
>
> > I'm using different barcode types with the fonts (3 of 9 and Australian
> > Postal Mail DPID barcodes) so I'm not sure the 4J will do it if it is
> purely
> > a font.
>
> Barcode4J doesn't support the Australian postal barcode. I've started
> implementing it at some point but didn't finish.
>
> > Isn't each barcode type EAN, UPC13, 3of9, 4-State a different font?
>
> Using barcode fonts, yes. But Barcode4J doesn't use barcode fonts at all.
> It paints the barcodes using drawing primitives.
>
> > Perhaps the way the PCL renderer interprets "auto registration of fonts"
> > differently than the PDF renderer. This was a new feature was it not?
> [which
> > meant no need to set metrics]
>
> Yes, but the font metrics still come from AWT/Java2D for PCL whereas
> they come from FOP's own font library in the case of PDF.
>
> > I appreciate that you have donated more time on free support - I'm sure
> > everyone who gets your help appreciates it! I was initially just asking
> for
> > confirmation that there is no major functionality limitation on why what
> I'm
> > trying is not working. I'm running on a pretty short timeline [not your
> > problem of course] and I didn't want to waste time testing all sorts of
> > tricks if the issue simply wasn't solvable.
>
> The reason for my reaction was that I don't have an idea what could be
> wrong. I'd have to set up the same environment as you have (same font,
> basically) to reproduce the problem and find out what goes wrong. Takes
> time, obviously.
>
> > I figured I need to give enough information to explain my situation.
That
> > said it would be nice to know whether it is possible to get commercial
> > assistance in the future. (and if I cannot solve this problem). This
last
> > challenge is pretty much the last one left before my product is ready!
> >
> > I will of course dig further now I know what I'm trying to do in theory
> > should work - I guess I should probably start by trying to define a
> specific
> > font metric (assuming you still can) for these barcode fonts to see if
it

> > makes any difference.
> >
> > I noticed some of the emails from you dating back for ages.. Good job on
> > sticking with it.. All the gu