1CDLABELGEN(1)         User Contributed Perl Documentation        CDLABELGEN(1)
2
3
4

NAME

6       cdlabelgen - CD/DVD labels, jewel case inserts, and envelopes creator.
7       Generates frontcards and traycards for CD cases, single-cd envelopes,
8       DVD case inserts, as well as output suitable for direct printing on
9       CD/DVD.
10

SYNOPSIS

12       cdlabelgen [ -c <category> -s <subcategory> -i <item1%item2%etc> -f
13       <itemsfile>  -v <num_items_cover> -e <cover_epsfile> -S
14       <cover_eps_scaleratio>[,<image_x_offset>,<image_y_offset_inches>] -E
15       <tray_epsfile> -T <tray_eps_scaleratio>[,<image_x_offset>,<image_y_off‐
16       set_inches>] -d <date> -D -o <outputfile> -t <template> -b -C -w -h -m
17       -M -O -p -y <page_offset_inches>  -l <line_width_points>] --cre‐
18       ate-dvd-inside --create-dvd-outside --double-case --create-cdlabel
19       --rotate-endcaps --plaque-color <r,g,b> --category-color <r,g,b> --sub‐
20       category-color <r,g,b> --text-color <r,g,b> -n <volume/number in set>
21       --rows-columns <row_count_for_items,column_count_for_items>
22       --tray-overlay <overlay_epsfile> --tray-overlay-scaleratio <tray_over‐
23       lay_image_scaleratio>[,<image_x_offset>,<image_y_offset_inches>]
24

VERSION

26       Version 4.1.0, October 2008
27

DESCRIPTION

29       cdlabelgen's purpose in life is twofold:
30
31       * To be run automatically and swiftly from a shell script and automati‐
32       cally generate a frontcard and a traycard for a cd--usually data ar‐
33       chive cd's. The traycard (which goes behind the CD itself) is U-shaped
34       and the ends of the CD case bear the label of what the CD is. Inside
35       inserts for DVDs are also supported.
36       * To have a minimum of dependencies--cdlabelgen only requires perl.
37
38       cdlabelgen was designed to simplify the process of generating labels
39       for CD's. It originated as a program to allow auto generation of front‐
40       cards and traycards for CD's burned via an automated mechanism (specif‐
41       ically for archiving data), but has now become popular for labelling CD
42       compilations of mp3's, and copies of CDs. Note that cdlabelgen does not
43       actually print anything--it just spits out postscript, which you can
44       then do with as you please. It can also be combined with output from
45       other programs such as "barcodegen" - to print a barcode as a tray
46       overlay image.
47
48       The latest version of cdlabelgen as well as this document can be found
49       at http://www.aczoom.com/tools/cdinsert/. The software package includes
50       CGI scripts that can be used to serve cdlabelgen over the internet.  An
51       older version may be available at: http://www.red-bean.com/~bwf/soft‐
52       ware/cdlabelgen/.
53
54       cdlabelgen comes with several eps images for you to use on your labels.
55       These images can be found in /usr/local/lib/cdlabelgen or
56       /usr/share/cdlabelgen or /opt/lib/cdlabelgen/ or /usr/local/share/cdla‐
57       belgen, depending on your installation. Included are a Recycling icon,
58       an mp3 icon, the Compact Disc icon (with and without 'Digital' on it),
59       Tux the penguin, and the new Debian 'swirl' logo. Two color background
60       images called Music Notes are also available.
61
62       CDs: cdlabelgen prints a 'tongue' as part of the traycard. This folds
63       around and is viewable from the front in jewel boxes that are entirely
64       clear (CD holder piece is not opaque). If you do not have a clear CD
65       holder in your jewel box, you may find it easier to just cut the
66       'tongue' off--it's a bit easier to fold without it.
67
68       Paper Sizes: Normal CD cases, Slim CD cases, DVD inside inserts can be
69       printed on a letter or A4 sized page.  CD/DVD Envelopes and DVD outside
70       inserts will not fit on a letter sized paper, a larger paper size will
71       be needed to make it fit.
72
73       cdlabelgen requires Perl Version 5.003 or greater. Ghostscript is not
74       required, but is recommended so that you can test out your labels with‐
75       out wasting paper.
76

SWITCHES

78       -c, --category <category>
79           Set the category (title) for the CD
80
81       -s, --subcategory <subcategory>
82           Set the subcategory (subtitle) for the CD
83
84       -i, --items <items>
85           'items' should be a '%' separated list of items to print on the
86           traycard of the CD.  Note that if the number of items are too many
87           to fit on the tray card, cdlabelgen will leave out some items at
88           the end.  cdlabelgen automatically flows the items into 2, 3, 4, or
89           5 columns and scales the fontsize accordingly, unless the "-P"
90           option is used.  You can insert blank lines by inserting 2 percent
91           signs in a row into the items list.
92
93       -f, --items-from-file <filename>
94           Get item names from file named filename. Each item should be on its
95           own line separated by carriage returns.  cdlabelgen automatically
96           flows the items into 2, 3, 4, or 5 columns and scales the fontsize
97           or clips the items as needed.  You can insert blank lines by plac‐
98           ing blank lines between items in this file.
99
100           Special commands can be embedded in the file, all of these commands
101           should be present starting at the first column of the line.  The
102           codes are used to change the font for an item, the code itself is
103           not printed in the output.
104
105            {#BI}     - make the item bold and italic
106            {#I}      - make the item italic
107            {#B}      - make the item bold
108            {#M}      - make the item mono-spaced (Courier font)
109            {#MB}     - make the item monospaced and bold (Courier-Bold font)
110
111           Example:
112
113            {#MB}    Text 1 Item
114           would print the line "    Text 1 Item" in a monospaced bold font.
115
116       -v, --cover-items <number_of_items_for_cover>
117           Normally, all the items are printed on the tray card.  But if you
118           have a large number of items, you may wish to print some items on
119           the cover, and rest on the tray card.  This option provides a way
120           of specifying how many items should be printed on the cover.
121           Default is 0 (i.e., print no item on the cover, print all items on
122           the tray). The items to be printed on the cover are taken from the
123           list of items, from the top of the list.  Note that if the number
124           of items is too many to fit on the cover, it will result in items
125           being dropped. As of Jan 2002, around 250-300 items can be fitted
126           on the cover or the tray, depending on whether a title/subti‐
127           tle/date is used or not.
128
129       -d, --date <date>
130           Set the date to be used as 'date' if not set or not overridden with
131           the -D flag, today's date will be used (default is today's date).
132           Use this option if you don't like cdlabelgen's default format of
133           YYCC-MM-YY, for example.
134
135       -D, --no-date
136           Do not print any date (overrides -d as well)
137
138       -e, --cover-image <cover_epsfile>
139           Filename of eps file to print on cover. Note that cdlabelgen
140           requires that the eps file contain a proper '%%BoundingBox LLx LLy
141           URx URy' declaration according to the PostScript Document Structur‐
142           ing Conventions. cdlabelgen uses this line to determine the dimen‐
143           sions of the eps graphic so that it can position it appropriately
144           on the cover. Note that cdlabelgen first looks for this file in
145           your working directory. If it doesn't find it there, it will look
146           in the list of directories where the default eps files are stored
147           (see @where_is_the_template). This makes it easy to use the images
148           shipped with cdlabgelgen without typing miles of pathnames.
149
150       -S, --cover-image-scaleratio <cover_eps_scaleratio [,image_x_off‐
151       set,image_y_offset_inches]>
152           The ratio by which you want to scale the epsfile that appears on
153           the cover. If you omit this flag, cdlabelgen assumes a scaleratio
154           of 1.0. This flag allows you to squeeze larger graphics into the
155           cover or expand smaller graphics to fill the cover. Scaleratio must
156           be a number (int or float).
157
158           If the scale value passed is 0 (or 0.0), then the logo is used as a
159           background image - it will be scaled as required to fit the entire
160           cover.
161
162           The -S option also takes optional translate arguments.  Normally
163           images are printed on the cover and the tray so that the bottom-
164           right of the image is anchored to the bottom-right of the cover or
165           tray. To move the images away from the bottom and right borders,
166           use this option. For example, to leave two inches of gap between
167           the image and the bottom border, and 0.5 inches from the left bor‐
168           der, and use 1.0 scaleratio, use this: -S 1.0,-2,0.5
169
170           This offset only applies when the image is being used as a logo -
171           i.e., image is not being used as background to fill the entire
172           cover or tray.
173
174       -E, --tray-image <tray_epsfile>
175           Filename of eps file to print on traycard. Note that cdlabelgen
176           requires that the eps file contain a proper '%%BoundingBox LLx LLy
177           URx URy' declaration according to the PostScript Document Structur‐
178           ing Conventions. cdlabelgen uses this line to determine the dimen‐
179           sions of the eps graphic so that it can position it appropriately
180           on the cover. Note that cdlabelgen first looks for this file in
181           your working directory. If it doesn't find it there, it will look
182           in the list of directories where the default eps files are stored
183           (see @where_is_the_template). This makes it easy to use the images
184           shipped with cdlabgelgen without typing miles of pathnames.
185
186       -T, --tray-image-scaleratio <tray_eps_scaleratio [,image_x_off‐
187       set,image_y_offset_inches]>
188           The ratio by which you want to scale the epsfile that appears on
189           the traycard. If you omit this flag, cdlabelgen assumes a scalera‐
190           tio of 1. This flag allows you to squeeze larger graphics into the
191           traycard or expand smaller graphics to fill the traycard. Scalera‐
192           tio must be a positive number (int or float) specifying the scale.
193
194           If the scale value passed is the word fill1, then the image is used
195           as a background - it is scaled so that it completely fills the
196           interior tray card region.  The value 0 (or 0.0) works same as the
197           fill1 argument.
198
199           If the value passed is the word fill2, then the image is used as a
200           background to fill more than just the tray.  For normal CD cases,
201           the image is scaled so that it completely fills both the tray card
202           region, and the two endcaps (but not the extreme right-hand
203           'tongue-cap') for normal cd cases.  For Slim CD cases or DVD
204           Inside/Outside covers, the tray image will fill both the tray and
205           cover regions (including any spines).  For directly printing on a
206           CD (--create-cdlabel), fill2 option works like the fill1 option.
207
208           The -T option also takes optional translate arguments.  Normally
209           images are printed on the cover and the tray so that the bottom-
210           right of the image is anchored to the bottom-right of the cover or
211           tray. To move the images away from the bottom and right borders,
212           use this option. For example, to leave two inches of gap between
213           the image and the bottom border, and 0.5 inches from the left bor‐
214           der, and use 1.0 scaleratio, use this: -T 1.0,-2,0.5
215
216           This offset only applies when the image is being used as a logo -
217           i.e., image is not being used as background to fill the entire
218           cover or tray.
219
220       -o, --output-file <outputfile>
221           If the -o flag is used, cdlabelgen prints to outputfile instead of
222           STDOUT.
223
224       -t, --template <template>
225           Specify explicitly which template to use. This is useful if you
226           need to debug the PostScript code in the template, use a different
227           template, or if you have created your own template to use in lieu
228           of the one provided with cdlabelgen.
229
230       -b, --no-tray-plaque
231           Suppresses printing of the Plaque on the traycard, thus allowing
232           you to either fit even more items on the traycard, or to use a
233           slightly larger font size for the items.
234
235       -C, --no-cover-plaque
236           Suppresses printing of the plaque on the front cover, thus allowing
237           a cover image that fills the front cover, but still displaying cat‐
238           egory and sub-category information in the other usual places.
239
240       -h, --help
241           print out the usage message
242
243       -w, --tray-word-wrap
244           Enables word wrapping of the items that print on the traycard. Note
245           that this is *not* extensively tested and may be buggy! Make sure
246           that you preview your label before printing it if you use this
247           flag.
248
249           If there is a problem with "-w", the best option right now is to
250           split lines in the input itself, and to omit the "-w" option.
251
252       -m, --slim-case
253           Creates covers suitable for use in slim cd-cases, this means no
254           tray card (the tray card is now the inside front cover).  This cre‐
255           ates a two page, folding cover insert. This could also be used in
256           normal cd cases as an inside insert.
257
258           Slim case option can be used with outside dvd inserts ( --cre‐
259           ate-dvd-outside ) also - in which case the outside insert is cre‐
260           ated for half-height DVD case.
261
262       -O, --outside-foldout
263           Output slim cd cover cases (or dvd inserts) with the order of the
264           pages switched so the folding line lies on the outside of a normal
265           case. Can be used when printing either the slim-cd-case or dvd-
266           inside inserts.
267
268           This option is best used along with option -m (--slim-case) or
269           --create-dvd-inside.
270
271       --rotate-endcaps
272           Endcap text is rotated by 180 degrees, to flip the text around.
273
274       -M, --create-envelope
275           Creates covers suitable for use as envelopes for a CD. Guide lines
276           are printed, to aid in folding the printout correctly.
277
278       --create-dvd-inside
279           Creates inserts suitable for use as inside insert for a normal DVD
280           case.  Guide lines are printed, to aid in folding the printout cor‐
281           rectly.  Note: DVD inserts may not print fully on Letter or A4
282           sized paper printers; it may require larger paper sizes.
283
284       --create-dvd-outside
285           Creates inserts suitable for use as outside cover inserts for a
286           normal DVD case.  Guide lines are printed, to aid in folding the
287           printout correctly.  Note: DVD inserts may not print fully on Let‐
288           ter or A4 sized paper printers; it may require larger paper sizes.
289
290           Slim case option ( --slim-case ) can be used with outside dvd
291           inserts also - in which case the outside insert is created for
292           half-height DVD case.
293
294       --double-case
295           Create covers for double-sided DVD cases that hold 6 DVDs.  Only
296           double-width DVD cases are support, double-width CD cases are not
297           supported.  Therefore, using --double-case also implies the --cre‐
298           ate-dvd-outside option.
299
300       --create-cdlabel
301           For directly printing on a CD or DVD. As of January 2005, there are
302           inkjets printers that can print on certain types of blank CD/DVD
303           discs.  Only a small number of items can be printed on the CD, and
304           the number of characters in the title and subtitle is also limited.
305           Always check the output visually by using PostScript viewers or
306           printing on paper, before printing on the CD.
307
308           With this option, the top portion of the disc represents the
309           "cover" area - so arguments related to the cover: title (--cate‐
310           gory), subtitle (--subcategory), --no-cover-plaque, --cover-items,
311           --cover-image, etc all apply to the top area.  The bottom portion
312           of the disc represents the "tray" area, so arguments related to the
313           tray: --no-tray-plaque, --tray-image, etc all apply to the bottom
314           area.  The date (--date) string, if present, is printed along the
315           bottom curved edge of the disc.
316
317           Background images can be specified using the --cover-image option,
318           modified as need by the --cover-image-scaleratio.  If --tray-image
319           is also specified, note that the cover image is printed first, then
320           the tray image overwrites the cover image. The title/items text is
321           then finally printed over all the images.
322
323           The --no-tray-plaque and/or --no-cover-plaque (along with
324           --cover-items) option is also recommended with --create-cdlabel,
325           otherwise there may be no space for any items to be printed on the
326           disc.
327
328           The --clip-items option is also recommended.
329
330       -p, --clip-items
331           Enables clipping of items; uses fixed font size for all items.
332           Normally, the template.ps used by cdlabelgen will try to fit an
333           item in a given column by reducing the font size if needed. This is
334           ok if done for one or two items, but if done too often, it makes
335           the tray card look ugly, with text of varying font sizes.
336
337           Use this option to use a fixed width font for all items. If the
338           item is too large to fit in a column, the text will be clipped
339           instead.
340
341       -y, --page-offset [<page_x_offset_inches,]<page_y_offset_inches
342           Use this to move the entire output up or down (y_offset), to make
343           the output fit on appropriate sized paper. For letter sized paper,
344           0.8 works well, and for A4 paper, 1.5 works well. The value is in
345           units of inches.  An optional X-axis offset can also be specified.
346           Default values: 1 inch for X-axis, 0.8 inches for Y-axis.
347
348       -l, --line-width <line_width_points>
349           Specify size in points of the edge and interior lines of the cover
350           and tray card.  If this is 0, then the lines are omitted for both
351           the cover and tray (but guide cut lines are still printed). The
352           size is specified in points (1 point is 1/72 inch).
353
354       --plaque-color <r,g,b>
355           Specify a color to fill plaque.  Color must be specified using the
356           rgb components, each value should be between 0 and 255.
357
358       --category-color <r,g,b>
359           Specify a color for category.  Color must be specified using the
360           rgb components, each value should be between 0 and 255.
361
362       --subcategory-color <r,g,b>
363           Specify a color for subcategory.  Color must be specified using the
364           rgb components, each value should be between 0 and 255.
365
366       --text-color <r,g,b>
367           Specify a color for text - this is used for the list of items, and
368           the date display under the plaque and in the end-caps.  Color must
369           be specified using the rgb components, each value should be between
370           0 and 255.
371
372       -n, --number-in-set <string>
373           Append volume information to the end of the date string.  This
374           should be a single string.  If used in conjuction with "-D", it
375           will be in place of the date; otherwise, it is appended to the date
376           as " - <number-in-set>"
377
378       --rows-columns <row_count_for_items,column_count_for_items>
379           The --rows-columns options forces the list of items to be printed
380           using that many rows, and that many columns.  Both numbers have to
381           be provided, no spaces, for example: --rows-columns=11,3
382
383           The list of items is laid out in top-down, left-to-right fashion.
384           Use blank items in the input, to get appropriately aligned columns.
385
386           --rows-columns applies to the list of items wherever they are
387           printed - normally on the tray only, but may include cover, or the
388           top and bottom portions of the round printouts for direct CD label
389           printing.  Same values apply to all these variations, so if you
390           need different number of rows/columns for cover vs tray, you can
391           use two different runs of cdlabelgen, to get two postscript files,
392           and pick the cover from one printout, and tray from the other.
393           This will work for jewel-case inserts, but may not work for direct
394           CD label printing.
395
396       --tray-overlay overlay_epsfile
397           Filename of eps file to print as overlay on traycard. This image is
398           printed over the background image (tray-image) as well as the list
399           of items. Therefore, this is useful for things like barcodes.  In
400           terms of EPS file requirements, see the --tray-image option
401           description.
402
403       --tray-overlay-scaleratio tray_overlay_image_scaleratio[,image_x_off‐
404       set,image_y_offset_inches]
405           The ratio by which you want to scale the epsfile that is used with
406           the --tray-overlay option, and optionally to translate the overlay.
407           Normally overlay image is printed on the tray so that the bottom-
408           right of the image is anchored to the bottom-right of the tray. To
409           move the images away from the bottom and right borders, use this
410           option. For example, to leave 0.1 inches of gap between the image
411           and the bottom border, and 0.2 inches from the right border, and
412           use 1.0 scaleratio (no scaling), use this: --tray-overlay-scalera‐
413           tio 1.0,-0.2,0.1
414

EXAMPLES

416           cdlabelgen -c "My Filesystem"
417                        -s "/usr/local/foo"
418                        -e postscript/recycle.eps > foo.ps
419
420           cdlabelgen -c "title of cd"
421                        -s "subtitle"
422                        -i "Item 1%and Item 2%a third item here perhaps"
423                        -e postscript/recycle.eps -o bar.ps
424
425           cdlabelgen -c "Fitz"
426                        -s "home directory"
427                        -o qux.ps
428
429           cdlabelgen -c "Backups"
430                        -s "home directory"
431                        -n "4 of 5"
432
433           Direct printing on a CD or DVD, if file "example5.txt" has list of items:
434           cdlabelgen --clip-items --no-tray-plaque --date "Jan 2005"
435             -c "Collections 12" -s "- english songs -"
436             --cover-image "music2.eps" --cover-image-scaleratio 0.0
437             --tray-image "mp3.eps" --tray-image-scaleratio 0.5,-0.5,2
438             --page-offset 0.5,0.5 -f example5.txt -o test.ps
439

CHARACTER ENCODINGS - using ogonkify

441       cdlabelgen uses the Helvetica family of fonts for various text items,
442       using the default encoding of ISO-Latin1.
443
444       To use other encodings, the "ogonkify" program can be used; this is a
445       package available at http://www.pps.jussieu.fr/~jch/software/ogonkify/
446       The output from cdlabelgen can be piped into ogonkify, example for
447       Latin2 encoding:
448
449          cdlabelgen <args>  ⎪ ogonkify -H -eL2    > <outputfilename>
450
451       See the man page for ogonkify for other possible values for the encod‐
452       ing.
453
454       Hint: if you always work with a particular encoding, you can just run
455       ogonkify on template.ps - and use the output as the new template.ps.
456
457          ogonkify -H -eL2 template.ps > template-enc.ps
458
459       This way ogonkify has to be run only once, cdlabelgen output will con‐
460       tain the correctly encoded fonts from the modified template.ps. Use the
461       -t cdlabelgen option to specify the new template-enc.ps file, or save
462       the old template.ps and renmae template-enc.ps to template.ps.
463

PRINTING

465       When using tools such as Adobe Acrobat to print the .ps or a .pdf file,
466       make sure that "Fit To Paper" option is unchecked.  Also uncheck any
467       option that will perform scaling up or down of the cdlabelgen output
468       file.
469
470       Failure to do so will result in incorrect size printouts.
471
472       Paper Sizes: Normal CD cases, Slim CD cases, DVD inside inserts can be
473       printed on a letter or A4 sized page.  CD/DVD Envelopes and DVD outside
474       inserts will not fit on a letter sized paper, a larger paper size will
475       be needed to make it fit.
476
477       When using different sized paper, experimentation with the -y (also:
478       --page-offset) [<page_x_offset_inches,]<page_y_offset_inches> option
479       may be required to place the image in the printable region of the
480       paper.
481

AUTHOR

483       Avinash Chopde <avinash@aczoom.com>
484
485       Original author: B. W. Fitzpatrick <fitz@red-bean.com>
486

THANKS

488           - Karl Fogel, for general encouragement and that free software vibe
489           - Adam Di Carlo, for bug testing, help and making the .deb
490           - Greg Gallagher, for bug testing, coding, and tons of suggestions
491           - Goran Larsson, for feedback and date fixes
492           - Jens Claussen, for the patch to allow arbitrary ISO-Latin1 characters
493           - Bernard Quatermass, for contributing several excellent new features
494           - Sebastian Wenzler <sick@home.and.drunk.at> for reports, tests, RPM ['01]
495           - Peter Bieringer <pb@bieringer.de> for RPM .spec file ['02]
496           - Ronald Rael Harvest <number6@cox.net> for original envelope template ['02]
497           - Alessandro Dotti Contra <alessandro.dotti@libero.it> for color support,
498               man page and other improvements ['02]
499               Mathias Herberts
500           - Mathias Herberts <Mathias.Herberts@iroise.net>, for slim cdcase foldout
501           - Stephan Grund <Stephan.Grund@isst.fraunhofer.de>, for monospaced
502             font and for rotated-end-caps text support
503           - Dominique Dumont <domi.dumont@free.fr>, for half-height DVD case support
504               (patch forwarded by Juan Manuel Garcia Molina <juanma@debian.org>)
505           - Peter Bieringer <pb@bieringer.de> for testing CD label printint ['05]
506           - Andras Salamon <asalamon@chello.hu> for double-width DVD support ['08]
507

TODO

509        ** Word wrap does not work well at all. It will clip lines, or it will
510           auto-reduce the font size, both of which option look bad.
511
512        ** Ability to change the text style on a given line:
513           {#B}Track#  {#P}Title   {#I} Text...
514           [Workaround available: just use multi columns input, use blank
515            lines to spread out input items into columns]
516
517        ** Ability to select or specify fonts for the text/items
518
519
520
521perl v5.8.8                       2008-10-25                     CDLABELGEN(1)
Impressum