1CDLABELGEN(1) User Contributed Perl Documentation CDLABELGEN(1)
2
3
4
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
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 --create-cdlabel --rotate-endcaps
19 --plaque-color <r,g,b> --category-color <r,g,b> --subcategory-color
20 <r,g,b> --text-color <r,g,b> -n <volume/number in set> --rows-columns
21 <row_count_for_items,column_count_for_items> --tray-overlay <over‐
22 lay_epsfile> --tray-overlay-scaleratio <tray_overlay_image_scalera‐
23 tio>[,<image_x_offset>,<image_y_offset_inches>]
24
26 Version 4.0.0, August 2007
27
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
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 --create-cdlabel
295 For directly printing on a CD or DVD. As of January 2005, there are
296 inkjets printers that can print on certain types of blank CD/DVD
297 discs. Only a small number of items can be printed on the CD, and
298 the number of characters in the title and subtitle is also limited.
299 Always check the output visually by using PostScript viewers or
300 printing on paper, before printing on the CD.
301
302 With this option, the top portion of the disc represents the
303 "cover" area - so arguments related to the cover: title (--cate‐
304 gory), subtitle (--subcategory), --no-cover-plaque, --cover-items,
305 --cover-image, etc all apply to the top area. The bottom portion
306 of the disc represents the "tray" area, so arguments related to the
307 tray: --no-tray-plaque, --tray-image, etc all apply to the bottom
308 area. The date (--date) string, if present, is printed along the
309 bottom curved edge of the disc.
310
311 Background images can be specified using the --cover-image option,
312 modified as need by the --cover-image-scaleratio. If --tray-image
313 is also specified, note that the cover image is printed first, then
314 the tray image overwrites the cover image. The title/items text is
315 then finally printed over all the images.
316
317 The --no-tray-plaque and/or --no-cover-plaque (along with
318 --cover-items) option is also recommended with --create-cdlabel,
319 otherwise there may be no space for any items to be printed on the
320 disc.
321
322 The --clip-items option is also recommended.
323
324 -p, --clip-items
325 Enables clipping of items; uses fixed font size for all items.
326 Normally, the template.ps used by cdlabelgen will try to fit an
327 item in a given column by reducing the font size if needed. This is
328 ok if done for one or two items, but if done too often, it makes
329 the tray card look ugly, with text of varying font sizes.
330
331 Use this option to use a fixed width font for all items. If the
332 item is too large to fit in a column, the text will be clipped
333 instead.
334
335 -y, --page-offset [<page_x_offset_inches,]<page_y_offset_inches
336 Use this to move the entire output up or down (y_offset), to make
337 the output fit on appropriate sized paper. For letter sized paper,
338 0.8 works well, and for A4 paper, 1.5 works well. The value is in
339 units of inches. An optional X-axis offset can also be specified.
340 Default values: 1 inch for X-axis, 0.8 inches for Y-axis.
341
342 -l, --line-width <line_width_points>
343 Specify size in points of the edge and interior lines of the cover
344 and tray card. If this is 0, then the lines are omitted for both
345 the cover and tray (but guide cut lines are still printed). The
346 size is specified in points (1 point is 1/72 inch).
347
348 --plaque-color <r,g,b>
349 Specify a color to fill plaque. Color must be specified using the
350 rgb components, each value should be between 0 and 255.
351
352 --category-color <r,g,b>
353 Specify a color for category. Color must be specified using the
354 rgb components, each value should be between 0 and 255.
355
356 --subcategory-color <r,g,b>
357 Specify a color for subcategory. Color must be specified using the
358 rgb components, each value should be between 0 and 255.
359
360 --text-color <r,g,b>
361 Specify a color for text - this is used for the list of items, and
362 the date display under the plaque and in the end-caps. Color must
363 be specified using the rgb components, each value should be between
364 0 and 255.
365
366 -n, --number-in-set <string>
367 Append volume information to the end of the date string. This
368 should be a single string. If used in conjuction with "-D", it
369 will be in place of the date; otherwise, it is appended to the date
370 as " - <number-in-set>"
371
372 --rows-columns <row_count_for_items,column_count_for_items>
373 The --rows-columns options forces the list of items to be printed
374 using that many rows, and that many columns. Both numbers have to
375 be provided, no spaces, for example: --rows-columns=11,3
376
377 The list of items is laid out in top-down, left-to-right fashion.
378 Use blank items in the input, to get appropriately aligned columns.
379
380 --rows-columns applies to the list of items wherever they are
381 printed - normally on the tray only, but may include cover, or the
382 top and bottom portions of the round printouts for direct CD label
383 printing. Same values apply to all these variations, so if you
384 need different number of rows/columns for cover vs tray, you can
385 use two different runs of cdlabelgen, to get two postscript files,
386 and pick the cover from one printout, and tray from the other.
387 This will work for jewel-case inserts, but may not work for direct
388 CD label printing.
389
390 --tray-overlay overlay_epsfile
391 Filename of eps file to print as overlay on traycard. This image is
392 printed over the background image (tray-image) as well as the list
393 of items. Therefore, this is useful for things like barcodes. In
394 terms of EPS file requirements, see the --tray-image option
395 description.
396
397 --tray-overlay-scaleratio tray_overlay_image_scaleratio[,image_x_off‐
398 set,image_y_offset_inches]
399 The ratio by which you want to scale the epsfile that is used with
400 the --tray-overlay option, and optionally to translate the overlay.
401 Normally overlay image is printed on the tray so that the bottom-
402 right of the image is anchored to the bottom-right of the tray. To
403 move the images away from the bottom and right borders, use this
404 option. For example, to leave 0.1 inches of gap between the image
405 and the bottom border, and 0.2 inches from the right border, and
406 use 1.0 scaleratio (no scaling), use this: --tray-overlay-scalera‐
407 tio 1.0,-0.2,0.1
408
410 cdlabelgen -c "My Filesystem"
411 -s "/usr/local/foo"
412 -e postscript/recycle.eps > foo.ps
413
414 cdlabelgen -c "title of cd"
415 -s "subtitle"
416 -i "Item 1%and Item 2%a third item here perhaps"
417 -e postscript/recycle.eps -o bar.ps
418
419 cdlabelgen -c "Fitz"
420 -s "home directory"
421 -o qux.ps
422
423 cdlabelgen -c "Backups"
424 -s "home directory"
425 -n "4 of 5"
426
427 Direct printing on a CD or DVD, if file "example5.txt" has list of items:
428 cdlabelgen --clip-items --no-tray-plaque --date "Jan 2005"
429 -c "Collections 12" -s "- english songs -"
430 --cover-image "music2.eps" --cover-image-scaleratio 0.0
431 --tray-image "mp3.eps" --tray-image-scaleratio 0.5,-0.5,2
432 --page-offset 0.5,0.5 -f example5.txt -o test.ps
433
435 cdlabelgen uses the Helvetica family of fonts for various text items,
436 using the default encoding of ISO-Latin1.
437
438 To use other encodings, the "ogonkify" program can be used; this is a
439 package available at http://www.pps.jussieu.fr/~jch/software/ogonkify/
440 The output from cdlabelgen can be piped into ogonkify, example for
441 Latin2 encoding:
442
443 cdlabelgen <args> ⎪ ogonkify -H -eL2 > <outputfilename>
444
445 See the man page for ogonkify for other possible values for the encod‐
446 ing.
447
448 Hint: if you always work with a particular encoding, you can just run
449 ogonkify on template.ps - and use the output as the new template.ps.
450
451 ogonkify -H -eL2 template.ps > template-enc.ps
452
453 This way ogonkify has to be run only once, cdlabelgen output will con‐
454 tain the correctly encoded fonts from the modified template.ps. Use the
455 -t cdlabelgen option to specify the new template-enc.ps file, or save
456 the old template.ps and renmae template-enc.ps to template.ps.
457
459 When using tools such as Adobe Acrobat to print the .ps or a .pdf file,
460 make sure that "Fit To Paper" option is unchecked. Also uncheck any
461 option that will perform scaling up or down of the cdlabelgen output
462 file.
463
464 Failure to do so will result in incorrect size printouts.
465
466 Paper Sizes: Normal CD cases, Slim CD cases, DVD inside inserts can be
467 printed on a letter or A4 sized page. CD/DVD Envelopes and DVD outside
468 inserts will not fit on a letter sized paper, a larger paper size will
469 be needed to make it fit.
470
471 When using different sized paper, experimentation with the -y (also:
472 --page-offset) [<page_x_offset_inches,]<page_y_offset_inches> option
473 may be required to place the image in the printable region of the
474 paper.
475
477 Avinash Chopde <avinash@aczoom.com>
478
479 Original author: B. W. Fitzpatrick <fitz@red-bean.com>
480
482 - Karl Fogel, for general encouragement and that free software vibe
483 - Adam Di Carlo, for bug testing, help and making the .deb
484 - Greg Gallagher, for bug testing, coding, and tons of suggestions
485 - Goran Larsson, for feedback and date fixes
486 - Jens Claussen, for the patch to allow arbitrary ISO-Latin1 characters
487 - Bernard Quatermass, for contributing several excellent new features
488 - Sebastian Wenzler <sick@home.and.drunk.at> for reports, tests, RPM ['01]
489 - Peter Bieringer <pb@bieringer.de> for RPM .spec file ['02]
490 - Ronald Rael Harvest <number6@cox.net> for original envelope template ['02]
491 - Alessandro Dotti Contra <alessandro.dotti@libero.it> for color support,
492 man page and other improvements ['02]
493 Mathias Herberts
494 - Mathias Herberts <Mathias.Herberts@iroise.net>, for slim cdcase foldout
495 - Stephan Grund <Stephan.Grund@isst.fraunhofer.de>, for monospaced
496 font and for rotated-end-caps text support
497 - Dominique Dumont <domi.dumont@free.fr>, for half-height DVD case support
498 (patch forwarded by Juan Manuel Garcia Molina <juanma@debian.org>)
499 - Peter Bieringer <pb@bieringer.de> for testing CD label printint ['05]
500
502 ** Word wrap does not work well at all. It will clip lines, or it will
503 auto-reduce the font size, both of which option look bad.
504
505 ** Ability to change the text style on a given line:
506 {#B}Track# {#P}Title {#I} Text...
507 [Workaround available: just use multi columns input, use blank
508 lines to spread out input items into columns]
509
510 ** Ability to select or specify fonts for the text/items
511
512
513
514perl v5.8.8 2007-08-26 CDLABELGEN(1)