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 Michael Mest <mi...@gmx.de> on 2013/12/03 10:56:51 UTC

Problem with FOP, Barcode4J and AreaTreeModel

Hi @all.

At first, i want to introduce me. I'm Michael from germany and i'm working as software developer.

At the moment, we are in a project which include producing barcodes.

We are using barcode4j in combination with FOP Ver. 1.1 in a WebApplication hosted in a apache tomcat environment.

Everything worked fine with creating files including the barcode until we got a new feature request. because of this feature request, we are not able to produce PDF-Files ans more. Instead, we have to produce pcl-files.

Because of the measurement differences between pdf and pcl, we decides to produce an AreaTree file first with overriding the renderer.
So the measurment is done in PDF-Style and after that, we convert the AreaTree-File to a PCL-File.

The problem is that we cannot produce the AreaTree file using saxon. Everything works fine when whe use xalan, but wit saxon, we get a NullPointerException inside the Methode "getNameCode" in Class "net.sf.saxon.event.ReceivingContentHandler"

The Namespace-URI seems to be Null!

The Code-Snippet inside the FO-File is: 
<barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" orientation="90" message="440180">
<barcode:intl2of5>
<barcode:height>10mm</barcode:height>
<barcode:module-width>0.5mm</barcode:module-width>
<barcode:wide-factor>3.0</barcode:wide-factor>
<barcode:quiet-zone enabled="true">10mw
</barcode:quiet-zone>
<barcode:checksum>auto</barcode:checksum>
<barcode:human-readable>
<barcode:placement>none</barcode:placement>
<barcode:display-checksum>false</barcode:display-checksum>
</barcode:human-readable>
</barcode:intl2of5>
</barcode:barcode>

Can anyone tell me what's wrong with it?

Thanks!

Michael

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


Re: Aw: Re: Problem with FOP, Barcode4J and AreaTreeModel

Posted by Martin Edge <Ma...@intellimail.com.au>.
That can be done with post script by editing intermediate layer. Although commands change for each printer you can control most printer driven functions. You can either find a pdl (printer definition language) or reverse it via a postscript printer driver and saving to file versus sending to printer. I've run a mail house where we integrated with multiple print houses using this technique. I was also able to selectively duplex, staple and fold.

Let me know if you need help



> On 4 Dec 2013, at 9:52 pm, "Michael Mest" <mi...@gmx.de> wrote:
> 
> We need to use PCL because we have to define the paper-tray for the printer inside the document.
> 
> 
> 
>> Gesendet: Mittwoch, 04. Dezember 2013 um 10:47 Uhr
>> Von: "Martin Edge" <Ma...@intellimail.com.au>
>> An: "fop-users@xmlgraphics.apache.org" <fo...@xmlgraphics.apache.org>
>> Betreff: Re: Problem with FOP, Barcode4J and AreaTreeModel
>> 
>> Why pcl? I thought I was trapped in a pcl world and jeremias set me straight :) maybe I can offer some guidance?
>> 
>> 
>> 
>>> On 3 Dec 2013, at 8:56 pm, "Michael Mest" <mi...@gmx.de> wrote:
>>> 
>>> Hi @all.
>>> 
>>> At first, i want to introduce me. I'm Michael from germany and i'm working as software developer.
>>> 
>>> At the moment, we are in a project which include producing barcodes.
>>> 
>>> We are using barcode4j in combination with FOP Ver. 1.1 in a WebApplication hosted in a apache tomcat environment.
>>> 
>>> Everything worked fine with creating files including the barcode until we got a new feature request. because of this feature request, we are not able to produce PDF-Files ans more. Instead, we have to produce pcl-files.
>>> 
>>> Because of the measurement differences between pdf and pcl, we decides to produce an AreaTree file first with overriding the renderer.
>>> So the measurment is done in PDF-Style and after that, we convert the AreaTree-File to a PCL-File.
>>> 
>>> The problem is that we cannot produce the AreaTree file using saxon. Everything works fine when whe use xalan, but wit saxon, we get a NullPointerException inside the Methode "getNameCode" in Class "net.sf.saxon.event.ReceivingContentHandler"
>>> 
>>> The Namespace-URI seems to be Null!
>>> 
>>> The Code-Snippet inside the FO-File is: 
>>> <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" orientation="90" message="440180">
>>> <barcode:intl2of5>
>>> <barcode:height>10mm</barcode:height>
>>> <barcode:module-width>0.5mm</barcode:module-width>
>>> <barcode:wide-factor>3.0</barcode:wide-factor>
>>> <barcode:quiet-zone enabled="true">10mw
>>> </barcode:quiet-zone>
>>> <barcode:checksum>auto</barcode:checksum>
>>> <barcode:human-readable>
>>> <barcode:placement>none</barcode:placement>
>>> <barcode:display-checksum>false</barcode:display-checksum>
>>> </barcode:human-readable>
>>> </barcode:intl2of5>
>>> </barcode:barcode>
>>> 
>>> Can anyone tell me what's wrong with it?
>>> 
>>> Thanks!
>>> 
>>> Michael
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

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


Aw: Re: Problem with FOP, Barcode4J and AreaTreeModel

Posted by Michael Mest <mi...@gmx.de>.
We need to use PCL because we have to define the paper-tray for the printer inside the document.



> Gesendet: Mittwoch, 04. Dezember 2013 um 10:47 Uhr
> Von: "Martin Edge" <Ma...@intellimail.com.au>
> An: "fop-users@xmlgraphics.apache.org" <fo...@xmlgraphics.apache.org>
> Betreff: Re: Problem with FOP, Barcode4J and AreaTreeModel
>
> Why pcl? I thought I was trapped in a pcl world and jeremias set me straight :) maybe I can offer some guidance?
> 
> 
> 
> > On 3 Dec 2013, at 8:56 pm, "Michael Mest" <mi...@gmx.de> wrote:
> > 
> > Hi @all.
> > 
> > At first, i want to introduce me. I'm Michael from germany and i'm working as software developer.
> > 
> > At the moment, we are in a project which include producing barcodes.
> > 
> > We are using barcode4j in combination with FOP Ver. 1.1 in a WebApplication hosted in a apache tomcat environment.
> > 
> > Everything worked fine with creating files including the barcode until we got a new feature request. because of this feature request, we are not able to produce PDF-Files ans more. Instead, we have to produce pcl-files.
> > 
> > Because of the measurement differences between pdf and pcl, we decides to produce an AreaTree file first with overriding the renderer.
> > So the measurment is done in PDF-Style and after that, we convert the AreaTree-File to a PCL-File.
> > 
> > The problem is that we cannot produce the AreaTree file using saxon. Everything works fine when whe use xalan, but wit saxon, we get a NullPointerException inside the Methode "getNameCode" in Class "net.sf.saxon.event.ReceivingContentHandler"
> > 
> > The Namespace-URI seems to be Null!
> > 
> > The Code-Snippet inside the FO-File is: 
> > <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" orientation="90" message="440180">
> > <barcode:intl2of5>
> > <barcode:height>10mm</barcode:height>
> > <barcode:module-width>0.5mm</barcode:module-width>
> > <barcode:wide-factor>3.0</barcode:wide-factor>
> > <barcode:quiet-zone enabled="true">10mw
> > </barcode:quiet-zone>
> > <barcode:checksum>auto</barcode:checksum>
> > <barcode:human-readable>
> > <barcode:placement>none</barcode:placement>
> > <barcode:display-checksum>false</barcode:display-checksum>
> > </barcode:human-readable>
> > </barcode:intl2of5>
> > </barcode:barcode>
> > 
> > Can anyone tell me what's wrong with it?
> > 
> > Thanks!
> > 
> > Michael
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 

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


Re: Problem with FOP, Barcode4J and AreaTreeModel

Posted by Martin Edge <Ma...@intellimail.com.au>.
Why pcl? I thought I was trapped in a pcl world and jeremias set me straight :) maybe I can offer some guidance?



> On 3 Dec 2013, at 8:56 pm, "Michael Mest" <mi...@gmx.de> wrote:
> 
> Hi @all.
> 
> At first, i want to introduce me. I'm Michael from germany and i'm working as software developer.
> 
> At the moment, we are in a project which include producing barcodes.
> 
> We are using barcode4j in combination with FOP Ver. 1.1 in a WebApplication hosted in a apache tomcat environment.
> 
> Everything worked fine with creating files including the barcode until we got a new feature request. because of this feature request, we are not able to produce PDF-Files ans more. Instead, we have to produce pcl-files.
> 
> Because of the measurement differences between pdf and pcl, we decides to produce an AreaTree file first with overriding the renderer.
> So the measurment is done in PDF-Style and after that, we convert the AreaTree-File to a PCL-File.
> 
> The problem is that we cannot produce the AreaTree file using saxon. Everything works fine when whe use xalan, but wit saxon, we get a NullPointerException inside the Methode "getNameCode" in Class "net.sf.saxon.event.ReceivingContentHandler"
> 
> The Namespace-URI seems to be Null!
> 
> The Code-Snippet inside the FO-File is: 
> <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" orientation="90" message="440180">
> <barcode:intl2of5>
> <barcode:height>10mm</barcode:height>
> <barcode:module-width>0.5mm</barcode:module-width>
> <barcode:wide-factor>3.0</barcode:wide-factor>
> <barcode:quiet-zone enabled="true">10mw
> </barcode:quiet-zone>
> <barcode:checksum>auto</barcode:checksum>
> <barcode:human-readable>
> <barcode:placement>none</barcode:placement>
> <barcode:display-checksum>false</barcode:display-checksum>
> </barcode:human-readable>
> </barcode:intl2of5>
> </barcode:barcode>
> 
> Can anyone tell me what's wrong with it?
> 
> Thanks!
> 
> Michael
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 

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


Re: Problem with FOP, Barcode4J and AreaTreeModel

Posted by Pascal Sancho <ps...@gmail.com>.
Hi,

did you ask on Saxon mailing list at [1]?
That should be the right place for such question.
The NPE is thrown during Saxon stage.
Then FOP stage runs after the Saxon one (as it takes XSL-FO as input).

[1] https://lists.sourceforge.net/lists/listinfo/saxon-help

2013/12/3 Michael Mest <mi...@gmx.de>:
> Hi @all.
>
> At first, i want to introduce me. I'm Michael from germany and i'm working as software developer.
>
> At the moment, we are in a project which include producing barcodes.
>
> We are using barcode4j in combination with FOP Ver. 1.1 in a WebApplication hosted in a apache tomcat environment.
>
> Everything worked fine with creating files including the barcode until we got a new feature request. because of this feature request, we are not able to produce PDF-Files ans more. Instead, we have to produce pcl-files.
>
> Because of the measurement differences between pdf and pcl, we decides to produce an AreaTree file first with overriding the renderer.
> So the measurment is done in PDF-Style and after that, we convert the AreaTree-File to a PCL-File.
>
> The problem is that we cannot produce the AreaTree file using saxon. Everything works fine when whe use xalan, but wit saxon, we get a NullPointerException inside the Methode "getNameCode" in Class "net.sf.saxon.event.ReceivingContentHandler"
>
> The Namespace-URI seems to be Null!
>
> The Code-Snippet inside the FO-File is:
> <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" orientation="90" message="440180">
> <barcode:intl2of5>
> <barcode:height>10mm</barcode:height>
> <barcode:module-width>0.5mm</barcode:module-width>
> <barcode:wide-factor>3.0</barcode:wide-factor>
> <barcode:quiet-zone enabled="true">10mw
> </barcode:quiet-zone>
> <barcode:checksum>auto</barcode:checksum>
> <barcode:human-readable>
> <barcode:placement>none</barcode:placement>
> <barcode:display-checksum>false</barcode:display-checksum>
> </barcode:human-readable>
> </barcode:intl2of5>
> </barcode:barcode>
>
> Can anyone tell me what's wrong with it?
>
> Thanks!
>
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



-- 
pascal

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