You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by Maruan Sahyoun <sa...@fileaffairs.de> on 2015/03/27 09:02:44 UTC

PDFBox AcroForms and Barcode

Hi,

to enhance the coverage of acroforms wrt to the PDF specification we'd need to support barcode fields. A lib we could use as a base is Barcode4J [1] which is ASL licensed. As it has features and dependencies we don't need/want I'd think we'd need to rip it apart and reuse what's needed and add what's missing.

The other option is adding that as a dependency and add a custom Canvas implementation but this means that we'd also need Avalon … - which would add a lot to PDFBox. So I'd tend towards taking the code as a base.

How could we proceed?

BR
Maruan

[1] http://barcode4j.sourceforge.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: PDFBox AcroForms and Barcode

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,

> Am 27.03.2015 um 12:36 schrieb Andreas Lehmkühler <an...@lehmi.de>:
> 
> Hi,
> 
>> Maruan Sahyoun <sa...@fileaffairs.de> hat am 27. März 2015 um 09:02
>> geschrieben:
>> 
>> 
>> Hi,
>> 
>> to enhance the coverage of acroforms wrt to the PDF specification we'd need to
>> support barcode fields. A lib we could use as a base is Barcode4J [1] which is
>> ASL licensed. As it has features and dependencies we don't need/want I'd think
>> we'd need to rip it apart and reuse what's needed and add what's missing.
>> 
>> The other option is adding that as a dependency and add a custom Canvas
>> implementation but this means that we'd also need Avalon … - which would add a
>> lot to PDFBox. So I'd tend towards taking the code as a base.
>> 
>> How could we proceed?
> I'm not familiar with that acroform option. What exactly do we have to
> implement? Transforming a text into a barcode I guess, but what output format,
> bitmap?

it's part of PDF 2 specified by the PMD entry in the fields dictionary.

{quote}
(Required; barcode fields only; PDF 2.0) The PaperMetaData generation parameters dictionary. The entries of this dictionary are instructions to a barcode encoding module of an interactive PDF processor on how to generate the barcode image.
{quote}

Barcode symbologies are PDF417, QRCode, or DataMatrix.

The output format generated by Adobe (with a quick test - so might not be generally the case) is a bitmap but quickly scanning through the spec I couldn't find if that is required by the spec or if it could als be vectors.

BR
Maruan

> 
> BR
> Andreas
> 
>> BR
>> Maruan
>> 
>> [1] http://barcode4j.sourceforge.net
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: PDFBox AcroForms and Barcode

Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,

> Maruan Sahyoun <sa...@fileaffairs.de> hat am 27. März 2015 um 09:02
> geschrieben:
> 
> 
> Hi,
> 
> to enhance the coverage of acroforms wrt to the PDF specification we'd need to
> support barcode fields. A lib we could use as a base is Barcode4J [1] which is
> ASL licensed. As it has features and dependencies we don't need/want I'd think
> we'd need to rip it apart and reuse what's needed and add what's missing.
> 
> The other option is adding that as a dependency and add a custom Canvas
> implementation but this means that we'd also need Avalon … - which would add a
> lot to PDFBox. So I'd tend towards taking the code as a base.
> 
> How could we proceed?
I'm not familiar with that acroform option. What exactly do we have to
implement? Transforming a text into a barcode I guess, but what output format,
bitmap?

BR
Andreas

> BR
> Maruan
> 
> [1] http://barcode4j.sourceforge.net
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: PDFBox AcroForms and Barcode

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
No - it's for Barcode fields specified in the upcoming PDF 2 specification (and already used by Adobe)

In addition we could also use it to allow people to create barcodes as graphics wo using a barcode font (obviously this would be an added benefit and not required).

BR
Maruan


> Am 27.03.2015 um 09:38 schrieb Tilman Hausherr <TH...@t-online.de>:
> 
> Am 27.03.2015 um 09:02 schrieb Maruan Sahyoun:
>> we'd need to support barcode fields
> 
> Are you talking about "BarcodePlaintext" from the spec?
> 
> Tilman
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: PDFBox AcroForms and Barcode

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 27.03.2015 um 09:02 schrieb Maruan Sahyoun:
> we'd need to support barcode fields

Are you talking about "BarcodePlaintext" from the spec?

Tilman



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: PDFBox AcroForms and Barcode

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
> Am 27.03.2015 um 12:54 schrieb Andreas Lehmkühler <an...@lehmi.de>:
> 
> Hi,
> 
>> Maruan Sahyoun <sa...@fileaffairs.de> hat am 27. März 2015 um 09:02
>> geschrieben:
>> 
>> 
>> Hi,
>> 
>> to enhance the coverage of acroforms wrt to the PDF specification we'd need to
>> support barcode fields. A lib we could use as a base is Barcode4J [1] which is
>> ASL licensed. As it has features and dependencies we don't need/want I'd think
>> we'd need to rip it apart and reuse what's needed and add what's missing.
>> 
>> The other option is adding that as a dependency and add a custom Canvas
>> implementation but this means that we'd also need Avalon … - which would add a
>> lot to PDFBox. So I'd tend towards taking the code as a base.
>> 
>> How could we proceed?
> Barcode4J contains a lot of ancient software. IMHO it would be a good idea to
> strip it down to the needed parts to avoid some old stuff if possible.

I'd go for stripping it down to the bare minimum needed - the benefit of Barcode4J is the ASL license.

> Or we
> should try to update Barcode4J to use newer versions of the dependencies.

There are a lot of dependencies such as Avalon, commons-cli, Xalan which we shouldn't need from a first glance.

> 
> BR
> Andreas
> 
>> BR
>> Maruan
>> 
>> [1] http://barcode4j.sourceforge.net
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: PDFBox AcroForms and Barcode

Posted by Andreas Lehmkühler <an...@lehmi.de>.
Hi,

> Maruan Sahyoun <sa...@fileaffairs.de> hat am 27. März 2015 um 09:02
> geschrieben:
> 
> 
> Hi,
> 
> to enhance the coverage of acroforms wrt to the PDF specification we'd need to
> support barcode fields. A lib we could use as a base is Barcode4J [1] which is
> ASL licensed. As it has features and dependencies we don't need/want I'd think
> we'd need to rip it apart and reuse what's needed and add what's missing.
> 
> The other option is adding that as a dependency and add a custom Canvas
> implementation but this means that we'd also need Avalon … - which would add a
> lot to PDFBox. So I'd tend towards taking the code as a base.
> 
> How could we proceed?
Barcode4J contains a lot of ancient software. IMHO it would be a good idea to
strip it down to the needed parts to avoid some old stuff if possible. Or we
should try to update Barcode4J to use newer versions of the dependencies.

BR
Andreas

> BR
> Maruan
> 
> [1] http://barcode4j.sourceforge.net
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: PDFBox AcroForms and Barcode

Posted by Maruan Sahyoun <sa...@fileaffairs.de>.
Hi,
> Am 27.03.2015 um 09:11 schrieb Ganesan <kg...@invest2care.com>:
> 
> Hi,
> Could you please help me changing the Default appearance of Text Fields in Pdf AcroForm using Pdf Box. Most of the time I am using 
>    COSDictionary.setString(COSName.DA, "/Helv 9 Tf") or COSDictionary.setString(COSName.DA, PDFType1Font.HELVETICA)  but I want the Default appearance to have the specified font when immediately the form loaded.
> Please help me.
> 

I'm happy to help but
- could you post your question to the users mailing list [users@pdfbox.apache.org] as this is the list where HowTo questions shall be posted
- don't ask off topic questions on an existing thread as this will make it difficult to follow?

Thanks you for your help

BR Maruan



> -----Original Message-----
> From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de] 
> Sent: Friday, March 27, 2015 1:33 PM
> To: dev@pdfbox.apache.org
> Subject: PDFBox AcroForms and Barcode
> 
> Hi,
> 
> to enhance the coverage of acroforms wrt to the PDF specification we'd need to support barcode fields. A lib we could use as a base is Barcode4J [1] which is ASL licensed. As it has features and dependencies we don't need/want I'd think we'd need to rip it apart and reuse what's needed and add what's missing.
> 
> The other option is adding that as a dependency and add a custom Canvas implementation but this means that we'd also need Avalon … - which would add a lot to PDFBox. So I'd tend towards taking the code as a base.
> 
> How could we proceed?
> 
> BR
> Maruan
> 
> [1] http://barcode4j.sourceforge.net
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


RE: PDFBox AcroForms and Barcode

Posted by Ganesan <kg...@invest2care.com>.
Hi,
 Could you please help me changing the Default appearance of Text Fields in Pdf AcroForm using Pdf Box. Most of the time I am using 
    COSDictionary.setString(COSName.DA, "/Helv 9 Tf") or COSDictionary.setString(COSName.DA, PDFType1Font.HELVETICA)  but I want the Default appearance to have the specified font when immediately the form loaded.
Please help me.

-----Original Message-----
From: Maruan Sahyoun [mailto:sahyoun@fileaffairs.de] 
Sent: Friday, March 27, 2015 1:33 PM
To: dev@pdfbox.apache.org
Subject: PDFBox AcroForms and Barcode

Hi,

to enhance the coverage of acroforms wrt to the PDF specification we'd need to support barcode fields. A lib we could use as a base is Barcode4J [1] which is ASL licensed. As it has features and dependencies we don't need/want I'd think we'd need to rip it apart and reuse what's needed and add what's missing.

The other option is adding that as a dependency and add a custom Canvas implementation but this means that we'd also need Avalon … - which would add a lot to PDFBox. So I'd tend towards taking the code as a base.

How could we proceed?

BR
Maruan

[1] http://barcode4j.sourceforge.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org