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 Richard King <ri...@allfinanz.com> on 2006/11/01 12:48:16 UTC

Bar code font

Heya,
Appologies for posting on this list but I am unsure where the barcode list is.

I am using barcode4J to generate a barcode for FOP 0.92.
This is all working fine.

However, I have had a request from the client to use
Bar code font = IDAutomationC39M
Bar code size = 18'
Bar code style = Normal

I am assuming this means a barcode of "code39".  Is this correct?
However, this will not allow me to use exclamation marks.  I have found that I can only have exclamation marks when I use "code128".  They have stated however that using the above font allows exclamation marks.

Can someone point me in the right direction?

Cheers,
Richard

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


Re: Bar code font

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 01.11.2006 12:48:16 Richard King wrote:
> Heya,
> Appologies for posting on this list but I am unsure where the barcode list is.

Is that so difficult to find out? Go to the Barcode4J website, open the
"Support" menu item and you'll see a link to the mailing lists.

> I am using barcode4J to generate a barcode for FOP 0.92.
> This is all working fine.
> 
> However, I have had a request from the client to use
> Bar code font = IDAutomationC39M
> Bar code size = 18'
> Bar code style = Normal
> 
> I am assuming this means a barcode of "code39".  Is this correct?

Probably.

> However, this will not allow me to use exclamation marks.  I have found
> that I can only have exclamation marks when I use "code128".  They have
> stated however that using the above font allows exclamation marks.
> 
> Can someone point me in the right direction?

If you study the Barcode4J documentation for Code39, you'll see the
note: "The implementation currently doesn't support the extended character set."
That's the problem. So far, nobody needed it, so it isn't implemented.
You're welcome to send a patch to one of the Barcode4J mailing lists. Or
we can talk about an arrangement off-list that I implement it for you.

Jeremias Maerki


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


Re: MIME_TIFF format

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I don't think TIFF output from 0.92 will satisfy you. There have been
substantial improvements since 0.92 in FOP Trunk. I suggest you use that.

Configuration of the output compression to make the file smaller:
    <renderer mime="image/tiff">
      <compression>CCITT T.6</compression>
    </renderer>

Use "CCITT T.6"as value if you don't need grayscales, just 1bit images.
Use "PackBits" or "Deflate" otherwise.

0.92 did not compress the images, but FOP Trunk compresses with PackBits
by default, so just upgrading to FOP Trunk will shrink the image size.

I'll see to it that the website is updated. I've already documented the
compression options but have not since redeployed the website.

Here's the section of the documentation that describes this:
    <section id="tiff-configuration">
      <title>TIFF-specific Configuration</title>
      <p>
        In addition to the above values the TIFF renderer configuration allows some additional
        settings:
      </p>
<source><![CDATA[<renderer mime="image/tiff">
  <transparent-page-background>true</transparent-page-background>
  <compression>CCITT T.6</compression>
  <fonts><!-- described elsewhere --></fonts>
</renderer>]]></source>
      <p>
        The default value for the "compression" setting is "PackBits" which 
        which is a widely supported RLE compression scheme for TIFF. The set of compression
        names to be used here matches the set that the Image I/O API uses. Note that
        not all compression schemes may be available during runtime. This depends on the
        actual codecs being available. Here is a list of possible values:
      </p>
      <ul>
        <li>NONE (no compression)</li>
        <li>PackBits (RLE, run-length encoding)</li>
        <li>JPEG</li>
        <li>Deflate</li>
        <li>LZW</li>
        <li>ZLib</li>
        <li>CCITT T.4 (Fax Group 3)</li>
        <li>CCITT T.6 (Fax Group 4)</li>
      </ul>
      <note>
        If you want to use CCITT compression, please make sure you've got a J2SE 1.4 or later and
        <a href="http://java.sun.com/products/java-media/jai/current.html">
          Java Advanced Imaging Image I/O Tools
        </a>
        in your classpath. The Sun JRE doesn't come with a TIFF codec built in, so it has to be
        added separately. The internal TIFF codec from XML Graphics Commons only supports PackBits,
        Deflate and JPEG compression for writing.
      </note>
    </section>

On 01.11.2006 17:41:33 Richard King wrote:
> Hi all,
> I currently use fop 0.92 to product PDF documents but have had a
> request to also produce a TIFF documents.  To this end I updated my java code so
> MIME_TIFF is used.
> 
> The file produced is very large.
> The PDF created is 145KB
> The equivalent tiff file is 9650KB!
> 
> Is there any way to reduce this file size?
> Are there any other alternatives I could consider?
> 
> Many thanks,
> Richard



Jeremias Maerki


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


Re: MIME_TIFF format

Posted by Abel Braaksma <ab...@xs4all.nl>.
Richard King wrote:
> Hi all,
> I currently use fop 0.92 to product PDF documents but have had a request to also produce a TIFF documents.  To this end I updated my java code so MIME_TIFF is used.
>
> The file produced is very large.
> The PDF created is 145KB
> The equivalent tiff file is 9650KB!
>
> Is there any way to reduce this file size?
> Are there any other alternatives I could consider?
I understand that Batik only supports Deflate algorithm. But you may try 
this extension of Apache Fop: TIFFRenderer. It is made to add 
compression capabilities. Not sure if it works with the 0.92 version, though
http://www.tkachenko.com/fop/tiffrenderer.html

Other libraries are around, like LibTIFF (a C library that does what you 
want) and Sun's library for TIFF (com.sun.media.imageio.plugins.tiff, 
not sure of the version). Commercial libs are around too, look for tiff 
compression in google.

-- Abel Braaksma
   http://www.nuntia.com

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


Re: MIME_TIFF format

Posted by "Fernando T. Martins Mano" <fe...@cpts.pucrs.br>.
Ok, my confusion here. I said "input TIFF files", forget it, hehe.
There is only TIFF output, then.

I don't know about TIFF compression options INSIDE FOP, but the "plan B" 
solution would be to compress it after you have produced this TIFF 
output in an external tool, such as Gimp or Photoshop.

Does anyone know about TIFF compression options inside FOP?

Thanks,
Fernando

Richard King wrote:
> Heya,
> Thanks for your quick response.
> I am new to all this so may have missed something.
>
> My input consists of some initial XML, XSL:FO and some small JPG images.  I am using exactly the same source for both generating PDF's as I am to generate TIFF files.
>
> The only thing I am changing is the java implementation so the output will be in TIFF format.
>
> Do I have to specify anything in the java or XSL which is specific for TIFF files and will help me here?
>
> Cheers,
> Richard
>
> Java implementation is as follows:
>             OutputStream out = new java.io.FileOutputStream(fopOutputDir + fileRoot + ".tiff");
>             out = new java.io.BufferedOutputStream(out);
>             try {
>                 Fop fop = fopFactory.newFop(MimeConstants.MIME_TIFF, userAgent, out);
>
>                 //Setup Transformer
>                 Source xsltSrc = new StreamSource(fopDirectory + xslName);
>                 TransformerFactory transformerFactory = TransformerFactory.newInstance();
>                 Transformer transformer = transformerFactory.newTransformer(xsltSrc);
>                 Source src = new StreamSource(fopOutputDir + fileRoot + ".xml");
>
>                 //Make sure the XSL transformation's result is piped through to FOP
>                 Result res = new SAXResult(fop.getDefaultHandler());
>
>                 //Start the transformation and rendering process
>                 transformer.transform(src, res);
>
>
> -----Original Message-----
> From: Fernando T. Martins Mano [mailto:fernando@cpts.pucrs.br]
> Sent: 01 November 2006 17:03
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: MIME_TIFF format
>
>
> Hi,
>
> Have you already tried to compress your input TIFF files? I never used 
> this FOP's version, but check if there is any compression options for 
> this kind of output.
>
> Using tools as Gimp or Photoshop could easily do this job, as well. 
> Using LZW compression would cause a minor impact in the loss of quality 
> than JPEG, in your compressed TIFF files.
>
> Probably better suggestions may arise in the list.
>
> Good luck ;-)
> Fernando
>
>
>
>
> Richard King wrote:
>   
>> Hi all,
>> I currently use fop 0.92 to product PDF documents but have had a request to also produce a TIFF documents.  To this end I updated my java code so MIME_TIFF is used.
>>
>> The file produced is very large.
>> The PDF created is 145KB
>> The equivalent tiff file is 9650KB!
>>
>> Is there any way to reduce this file size?
>> Are there any other alternatives I could consider?
>>
>> Many thanks,
>> Richard
>>
>> ---------------------------------------------------------------------
>> 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


RE: MIME_TIFF format

Posted by Richard King <ri...@allfinanz.com>.
Heya,
Thanks for your quick response.
I am new to all this so may have missed something.

My input consists of some initial XML, XSL:FO and some small JPG images.  I am using exactly the same source for both generating PDF's as I am to generate TIFF files.

The only thing I am changing is the java implementation so the output will be in TIFF format.

Do I have to specify anything in the java or XSL which is specific for TIFF files and will help me here?

Cheers,
Richard

Java implementation is as follows:
            OutputStream out = new java.io.FileOutputStream(fopOutputDir + fileRoot + ".tiff");
            out = new java.io.BufferedOutputStream(out);
            try {
                Fop fop = fopFactory.newFop(MimeConstants.MIME_TIFF, userAgent, out);

                //Setup Transformer
                Source xsltSrc = new StreamSource(fopDirectory + xslName);
                TransformerFactory transformerFactory = TransformerFactory.newInstance();
                Transformer transformer = transformerFactory.newTransformer(xsltSrc);
                Source src = new StreamSource(fopOutputDir + fileRoot + ".xml");

                //Make sure the XSL transformation's result is piped through to FOP
                Result res = new SAXResult(fop.getDefaultHandler());

                //Start the transformation and rendering process
                transformer.transform(src, res);


-----Original Message-----
From: Fernando T. Martins Mano [mailto:fernando@cpts.pucrs.br]
Sent: 01 November 2006 17:03
To: fop-users@xmlgraphics.apache.org
Subject: Re: MIME_TIFF format


Hi,

Have you already tried to compress your input TIFF files? I never used 
this FOP's version, but check if there is any compression options for 
this kind of output.

Using tools as Gimp or Photoshop could easily do this job, as well. 
Using LZW compression would cause a minor impact in the loss of quality 
than JPEG, in your compressed TIFF files.

Probably better suggestions may arise in the list.

Good luck ;-)
Fernando




Richard King wrote:
> Hi all,
> I currently use fop 0.92 to product PDF documents but have had a request to also produce a TIFF documents.  To this end I updated my java code so MIME_TIFF is used.
>
> The file produced is very large.
> The PDF created is 145KB
> The equivalent tiff file is 9650KB!
>
> Is there any way to reduce this file size?
> Are there any other alternatives I could consider?
>
> Many thanks,
> Richard
>
> ---------------------------------------------------------------------
> 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: MIME_TIFF format

Posted by "Fernando T. Martins Mano" <fe...@cpts.pucrs.br>.
Hi,

Have you already tried to compress your input TIFF files? I never used 
this FOP's version, but check if there is any compression options for 
this kind of output.

Using tools as Gimp or Photoshop could easily do this job, as well. 
Using LZW compression would cause a minor impact in the loss of quality 
than JPEG, in your compressed TIFF files.

Probably better suggestions may arise in the list.

Good luck ;-)
Fernando




Richard King wrote:
> Hi all,
> I currently use fop 0.92 to product PDF documents but have had a request to also produce a TIFF documents.  To this end I updated my java code so MIME_TIFF is used.
>
> The file produced is very large.
> The PDF created is 145KB
> The equivalent tiff file is 9650KB!
>
> Is there any way to reduce this file size?
> Are there any other alternatives I could consider?
>
> Many thanks,
> Richard
>
> ---------------------------------------------------------------------
> 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


MIME_TIFF format

Posted by Richard King <ri...@allfinanz.com>.
Hi all,
I currently use fop 0.92 to product PDF documents but have had a request to also produce a TIFF documents.  To this end I updated my java code so MIME_TIFF is used.

The file produced is very large.
The PDF created is 145KB
The equivalent tiff file is 9650KB!

Is there any way to reduce this file size?
Are there any other alternatives I could consider?

Many thanks,
Richard

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