Documentation? er... what's that? ;)
The -type arg is obviously not needed anymore and I think I can add back the -text label (it is important) just by sending that to the pdf document separately from the barcode, as I have working examples of sending text to the document. However...
while pdf->xo_codabar() now returns something, I need to place it on the page at a specific location. This used to be like this:
# encode string $code as codabar image $bar
my $bar = makebarcode ($code); # Working! Thank you!
# Place it at x,y page coordinates with scale and frame options.
# Doesn't work.
$gfx->barcode($bar, $x, $y, $scale, $frame);
# Don't work neither.
$gfx->xo_codabar($bar, $x, $y, $scale, $frame)
Now I get:
Can't locate object method "what_I_tried" via package "PDF::API2::Content"
Well, that's progress anyway. Just acquiring the barcode image was 80% of my battle. I will mull the meditations offered, but if you or anyone can just throw me the required "output $bar at coordinates" incantation, I have the rest of my legacy issues already wrapped. I found and tried:
$gfx->image($bar, $x, $y, $scale);
But $bar is not an image? (Anyway I get a blank document, which is better than an error message). Found it!
# Works!
$gfx->formimage($bar, $x, $y, $scale);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|