Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering or logging in.

[RT 133048] Documentation-liveware 'bug'

  • 3 Replies
  • 95 Views
*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 715
    • View Profile
[RT 133048] Documentation-liveware 'bug'
« July 25, 2020, 11:32:04 PM »
Sat Jul 25 18:33:26 2020 automata [...] 2cm.systems - Ticket created
Subject:    Documentation-liveware 'bug'
Date:    Sun, 26 Jul 2020 00:33:15 +0200
To:    bug-PDF-API2 [...] rt.cpan.org
From:    automata [...] 2cm.systems

Good evening,

Unlike the other listed methods with options, there is no 'Valid %options' list for the Barcode Methods in the module pod (nor an example for guidance).

I tried using similar syntax to other methods as well as digging into the modules themselves, but unfortunately I'm only an occasional Perl user and couldn't get the barcode feature to work. I did also try looking for examples through web search, but was also unsuccessful there.

This appears to be an inconsistency or omission in the pod only and I have no reason to think that the code is at fault.

Many thanks for your consideration.

Best regards,

Jules

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 715
    • View Profile
Re: [RT 133048] Documentation-liveware 'bug'
« Reply #1: July 25, 2020, 11:33:21 PM »
Sat Jul 25 23:29:04 2020 PMPERRY [...] cpan.org - Correspondence added

https://github.com/PhilterPaper/Perl-PDF-Builder/blob/master/examples/BarCode.pl (PDF::Builder package on CPAN) includes BarCode.pl that outputs a number of supported barcodes. You will need to change "PDF::Builder" to "PDF::API2" in the code to use PDF::API2. Hopefully they can serve as some examples.

That said, I have my suspicions about barcode support. Zooming in and out on the produced barcodes produces some unsightly results, such as bars clumping together, so I'm not absolutely sure that I implemented this barcode use correctly (assuming the library is correct), or (if I did) the library code might be wrong. Use with care. It's on my to-do list to rewrite PDF::Builder's barcode library in the near future.

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 715
    • View Profile
Re: [RT 133048] Documentation-liveware 'bug'
« Reply #2: August 17, 2020, 07:29:34 PM »
Mon Aug 17 19:26:06 2020 PMPERRY [...] cpan.org - Correspondence added

Jules,

Have you (or anyone else) had a chance to try running the PDF::Builder examples/BarCode.pl against either PDF::API2 or PDF::Builder? Note that you don't have to install PDF::Builder; you can just grab the file off of GitHub.

As I said, I don't know if I implemented the bar code program correctly, or if the problem is in the PDF::API2 (same code in Builder) bar code library. I would appreciate some feedback on whether the bar spacing changes/"clumping" is due to my example code or if it appears to be in the original library. Anyway, between the example code and maybe some changes in the PDF::Builder POD, you may be able to understand it better.

*

Offline Phil

  • Global Moderator
  • Hero Member
  • *****
  • 715
    • View Profile
Re: [RT 133048] Documentation-liveware 'bug'
« Reply #3: August 25, 2020, 07:15:49 PM »
Tue Aug 25 12:53:33 2020 automata [...] 2cm.systems - Correspondence added

Hi Phil,

I'm currently busy on another urgent project, so haven't had time to look further into this. I shall do so in due course though.