Code39 doesn't scan on Paper but on PDF

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Code39 doesn't scan on Paper but on PDF

sandeepsangole
Hi All,

 I am using Apache FOP and barcode4j to generate barcode.The number of letters in my barcode is 18 and page width is 5.5cm. When I reduce the width barcode fits into the page and barcode is still scannable from pdf.But when its printed on paper its not printing propertly, lines are to dark and doesnt look clear. Could you please help me if there is any workaround ?
Find below XSL template,
<xsl:param name="message" as="xs:string"/>
<xsl:param name="height" as="xs:double" select="10"/>
<xsl:param name="width" as="xs:double" select="0.15"/>

<xsl:param name="text-align" as="xs:string" select="$TEXT_ALIGN_CENTER"/>
<xsl:param name="inter-char-gap-width" as="xs:integer" select="1"/>
<xsl:param name="quiet-zone" as="xs:integer" select="10"/>
<fo:block text-align="{$text-align}" padding-top="0.2cm" padding-left="0.5cm" padding-right="0.5cm">

    <fo:instream-foreign-object>
        <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"
                         orientation="0"
                         message="{$message}">
            <barcode:code39>
                <barcode:height>
                    <xsl:value-of select="concat($height, 'mm')" />
                </barcode:height>
                <barcode:module-width>
                    <xsl:value-of select="concat($width, 'mm')" />
                </barcode:module-width>

                <barcode:human-readable>
                    <barcode:placement>none</barcode:placement>
                </barcode:human-readable>
            </barcode:code39>
        </barcode:barcode>
    </fo:instream-foreign-object>
</fo:block>

Have tried different combinations of wide factor, interchangable gaps but doesnt help.Using code39 is mandatory, works fine with Code128.
Reply | Threaded
Open this post in threaded view
|

Re: Code39 doesn't scan on Paper but on PDF

Szeak (Register Man)
Hi,

Did you test it by above:
Try printing the document from the right PDF, and try scanning from
this. If scanning from paper (which printed from PDF) is ALSO WRONG,
than problem is related to your printer.

Szeak

2017-02-16 16:13 keltezéssel, sandeepsangole írta:

> Hi All,
>
>   I am using Apache FOP and barcode4j to generate barcode.The number of
> letters in my barcode is 18 and page width is 5.5cm. When I reduce the width
> barcode fits into the page and barcode is still scannable from pdf.But when
> its printed on paper its not printing propertly, lines are to dark and
> doesnt look clear. Could you please help me if there is any workaround ?
> Find below XSL template,
> <xsl:param name="message" as="xs:string"/>
> <xsl:param name="height" as="xs:double" select="10"/>
> <xsl:param name="width" as="xs:double" select="0.15"/>
>
> <xsl:param name="text-align" as="xs:string" select="$TEXT_ALIGN_CENTER"/>
> <xsl:param name="inter-char-gap-width" as="xs:integer" select="1"/>
> <xsl:param name="quiet-zone" as="xs:integer" select="10"/>
> <fo:block text-align="{$text-align}" padding-top="0.2cm"
> padding-left="0.5cm" padding-right="0.5cm">
>
>      <fo:instream-foreign-object>
>          <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"
>                           orientation="0"
>                           message="{$message}">
>              <barcode:code39>
>                  <barcode:height>
>                      <xsl:value-of select="concat($height, 'mm')" />
>                  </barcode:height>
>                  <barcode:module-width>
>                      <xsl:value-of select="concat($width, 'mm')" />
>                  </barcode:module-width>
>
>                  <barcode:human-readable>
>                      <barcode:placement>none</barcode:placement>
>                  </barcode:human-readable>
>              </barcode:code39>
>          </barcode:barcode>
>      </fo:instream-foreign-object>
> </fo:block>
>
> Have tried different combinations of wide factor, interchangable gaps but
> doesnt help.Using code39 is mandatory, works fine with Code128.
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/Code39-doesn-t-scan-on-Paper-but-on-PDF-tp44891.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Code39 doesn't scan on Paper but on PDF

Szeak (Register Man)
In reply to this post by sandeepsangole
Hi, again

I think there are some things you may need to check:
- Your scanner capabilities (the minimum for modul-size in code39)
- Your FOP configuration (target-resolution: i think for good quality,
it needs 600 dpi also for PCL and PS output)
- Your printer actual quality. It must be clean and good condition (May
need a cleaning by service).

Szeak

2017-02-16 16:13 keltezéssel, sandeepsangole írta:

> Hi All,
>
>   I am using Apache FOP and barcode4j to generate barcode.The number of
> letters in my barcode is 18 and page width is 5.5cm. When I reduce the width
> barcode fits into the page and barcode is still scannable from pdf.But when
> its printed on paper its not printing propertly, lines are to dark and
> doesnt look clear. Could you please help me if there is any workaround ?
> Find below XSL template,
> <xsl:param name="message" as="xs:string"/>
> <xsl:param name="height" as="xs:double" select="10"/>
> <xsl:param name="width" as="xs:double" select="0.15"/>
>
> <xsl:param name="text-align" as="xs:string" select="$TEXT_ALIGN_CENTER"/>
> <xsl:param name="inter-char-gap-width" as="xs:integer" select="1"/>
> <xsl:param name="quiet-zone" as="xs:integer" select="10"/>
> <fo:block text-align="{$text-align}" padding-top="0.2cm"
> padding-left="0.5cm" padding-right="0.5cm">
>
>      <fo:instream-foreign-object>
>          <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"
>                           orientation="0"
>                           message="{$message}">
>              <barcode:code39>
>                  <barcode:height>
>                      <xsl:value-of select="concat($height, 'mm')" />
>                  </barcode:height>
>                  <barcode:module-width>
>                      <xsl:value-of select="concat($width, 'mm')" />
>                  </barcode:module-width>
>
>                  <barcode:human-readable>
>                      <barcode:placement>none</barcode:placement>
>                  </barcode:human-readable>
>              </barcode:code39>
>          </barcode:barcode>
>      </fo:instream-foreign-object>
> </fo:block>
>
> Have tried different combinations of wide factor, interchangable gaps but
> doesnt help.Using code39 is mandatory, works fine with Code128.
>
>
>
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/Code39-doesn-t-scan-on-Paper-but-on-PDF-tp44891.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Code39 doesn't scan on Paper but on PDF

sandeepsangole
This post was updated on .
Hi Szeak,

Thanks for you reply.

For this case we are using Zebra Printer.When content is printed on 5.5 cm paper the barcode is getting squeezed , bar codes lines are too dark though looks fine on pdf.

As you mentioned, I will update fop resolution and verify printer and scanner conditions.

Thanks again.

Regards,
Sandeep


Added  600 dpi as below in xsl.
<barcode:target-resolution><xsl:value-of select="600"/></barcode:target-resolution>

PDF:


Printout on Zebra Printer - 5.5 cm page width, content - 18 characters


Also tried itext pdf , bar code on paper is printing fine.



Reply | Threaded
Open this post in threaded view
|

Re: Code39 doesn't scan on Paper but on PDF

sandeepsangole
In reply to this post by Szeak (Register Man)
Tested PDF generated from itext on same printer and scanner.Its working fine. Not sure whats making it different on FOP and iText.
Reply | Threaded
Open this post in threaded view
|

Re: Code39 doesn't scan on Paper but on PDF

Szeak (Register Man)
Hi,

After a short research, i think the recommended minimum module-width value for Code39 is 0.19mm.

Let's try :)

2017-02-19 20:44 GMT+01:00 sandeepsangole <[hidden email]>:
Tested PDF generated from itext on same printer and scanner.Its working fine.
Not sure whats making it different on FOP and iText.



--
View this message in context: http://apache-fop.1065347.n5.nabble.com/Code39-doesn-t-scan-on-Paper-but-on-PDF-tp44891p44895.html
Sent from the FOP - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Code39 doesn't scan on Paper but on PDF

sandeepsangole
This post was updated on .
Hi Szeak,
 
Paper width limitation is 5.5cm only so 0.19mm doesnt fit into it.And number of characters in barcode are 18.

I have tried generating barcode using ZPL too and it worked :(

Regards,
Sandeep