;ò
·0sDc           @   sT  d  k  Z  d  k Z d  k Z d k Td k Td k Td k Td k Td k l	 Z	 d k
 l Z l Z l Z d k l Z l Z l Z l Z l Z l Z d k l Z l Z d k l Z d k l Z d k l Z d	 k l Z d
 k  l! Z! d k" l# Z# l$ Z$ d k% l& Z& d k' l( Z( l) Z) l* Z* d „  Z+ d d „ Z, e- d j o e+ ƒ  e, ƒ  n d  S(   N(   s   *(   s   unittest(   s   makeSuiteForClassess
   outputfiles   printLocation(   s   Spacers   SimpleDocTemplates   Tables
   TableStyles   Preformatteds	   PageBreak(   s   inchs   cm(   s   colors(   s   Canvas(   s   getSampleStyleSheet(   s	   Paragraph(   s   Frame(   s   XBoxs   KeepTogether(   s   Drawing(   s   getCodess   getCodeNamess   createBarcodeDrawingc          C   sE  t  ƒ  } | d } | d } g  } | i t d | ƒ ƒ | i t d d t d d d ƒƒ | i t d	 | ƒ ƒ | i t	 d ƒ ƒ | i t d
 | ƒ ƒ | i t
 d d t d ƒƒ | i t d | ƒ ƒ | i t d ƒ ƒ | i t d | ƒ ƒ | i t d ƒ ƒ | i t d | ƒ ƒ | i t d ƒ ƒ | i t d | ƒ ƒ | i t d ƒ ƒ | i t d | ƒ ƒ | i t d ƒ ƒ | i t d | ƒ ƒ t d ƒ } | i | ƒ | i t d | ƒ ƒ | i t d ƒ ƒ | i t d | ƒ ƒ | i t d ƒ ƒ d k l }  | i t d | ƒ ƒ |  d d d ƒ} | i | ƒ | i t d  | ƒ ƒ |  d  d d! ƒ} | i | ƒ | i t d" | ƒ ƒ | i t d# d$ d% t d& t d' ƒ ƒ | i t d" | ƒ ƒ | i t d( t d) t d* ƒ ƒ t d+ ƒ } t t t d, t d- t d. d& ƒ} | i | | ƒ | i ƒ  d/ GHd  S(0   Ns   Normals   Heading1s   I2of5iÒ  s   barWidthf0.02s   checksumi    s   MSIs   Codabars   A012345Bs   Code 11s   01234545634563s   Code 39s
   A012345B%Rs   Extended Code 39s	   A012345B}s   Code93s   CODE 93s   Extended Code93s   L@@K! Code 93 :-)s   Code 128s   AB-12345678s   USPS FIMs   As   USPS POSTNETs
   78247-1043(   s   createBarcodeDrawings   EAN13s   values   123456789012s   EAN8s   1234567s
   Label Sizef2.0f5.0f8.0i   s   1x2-5/8"f1.75f0.5s
   1/2x1-3/4"s   out.pdfi   i	   s   showBoundarys   saved out.pdf(   s   getSampleStyleSheets   styless   styleNs   styleHs   storys   appends	   Paragraphs   I2of5s   inchs   MSIs   Codabars   Code11s
   Standard39s
   Extended39s
   Standard93s
   Extended93s   Code128s   cs   FIMs   POSTNETs   reportlab.graphics.barcodes   createBarcodeDrawings   bcds   XBoxs   Canvass   Frames   fs   addFromLists   save(   s   createBarcodeDrawings   storys   styless   cs   styleHs   fs   bcds   styleN(    (    s	   ./test.pys   run   sV    	

#)!#
s   test_full.pdfc         C   s  g  } t ƒ  } | d } | d } | d } g  } | i t d | ƒ ƒ | i t d t i	 t i ƒ  ƒ | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ t
 i i t
 i ƒ  ƒ d d	 j o t
 i i d
 ƒ o3 t
 i d ƒ i ƒ  } | i t | | d ƒ ƒ n | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ | i t d | ƒ ƒ t ƒ  } d k l } g  i } t i D]. } | i d ƒ o | t | d ƒ ƒ q q ~ }
 g  i } t i D]. } | i d ƒ o | t | d ƒ ƒ qhqh~ } g  i } t i D]. } | i d ƒ o | t | d ƒ ƒ q°q°~ } h  } |
 o |
 d | d  <n | o | d | d! <n | o | d | d" <n g  i } t i D]1 } | i d# ƒ o | | d i d$ ƒ ƒ qIqI~ } t# t | o
 | | ƒ p d% g ƒ } t# t | o
 | | ƒ p d% g ƒ } x| D]} | i t% ƒ  ƒ | i t d& | | ƒ ƒ | i t& d' d( ƒ ƒ xÅ | D]½ } t d) | | ƒ g }	 xk d d% f D]] } |	 i t& d' d( ƒ ƒ t* | d* | | } | | _, |	 i | ƒ |	 i t& d' d( ƒ ƒ qLW|	 i t d+ | i- i. | ƒ ƒ | i t/ |	 ƒ ƒ q#WqÖWt0 |  ƒ i2 | ƒ d, G|  GHd- S(.   s<   Creates large-ish test document with a variety of parameterss   Normals   Heading1s   Heading2s*   ReportLab Barcode Test Suite - full outputs   Generated on %ss    s&   Repository information for this build:iÿÿÿÿs   barcodes   .svns   svn infos   Codes   About this documents   History and Statuss²   
        This is the test suite and docoumentation for the ReportLab open source barcode API,
        being re-released as part of the forthcoming ReportLab 2.0 release.
        s²  
        Several years ago Ty Sarna contributed a barcode module to the ReportLab community.
        Several of the codes were used by him in hiw work and to the best of our knowledge
        this was correct.  These were written as flowable objects and were available in PDFs,
        but not in our graphics framework.  However, we had no knowledge of barcodes ourselves
        and did not advertise or extend the package.
        sq  
        We "wrapped" the barcodes to be usable within our graphics framework; they are now available
        as Drawing objects which can be rendered to EPS files or bitmaps.  For the last 2 years this
        has been available in our Diagra and Report Markup Language products.  However, we did not
        charge separately and use was on an "as is" basis.
        s†  
        A major licensee of our technology has kindly agreed to part-fund proper productisation
        of this code on an open source basis in Q1 2006.  This has involved addition of EAN codes
        as well as a proper testing program.  Henceforth we intend to publicise the code more widely,
        gather feedback, accept contributions of code and treat it as "supported".  
        së  
        This involved making available both downloads and testing resources.  This PDF document
        is the output of the current test suite.  It contains codes you can scan (if you use a nice sharp
        laser printer!), and will be extended over coming weeks to include usage examples and notes on
        each barcode and how widely tested they are.  This is being done through documentation strings in
        the barcode objects themselves so should always be up to date.
        s   Usage exampless!   
        To be completed
        s	   The codessV  
        Below we show a scannable code from each barcode, with and without human-readable text.
        These are magnified about 2x from the natural size done by the original author to aid
        inspection.  This will be expanded to include several test cases per code, and to add
        explanations of checksums.  Be aware that (a) if you enter numeric codes which are too
        short they may be prefixed for you (e.g. "123" for an 8-digit code becomes "00000123"),
        and that the scanned results and readable text will generally include extra checksums
        at the end.
        (   s   flattens   --width=i   s	   --height=i	   s   --isoscale=i   i    s   widths   heights   isoScales   --scale=s   ,i   s   Scale = %.1fi$   i   s   Code: s   humanReadables   Barcode should say: s   createdN(3   s   storys   getSampleStyleSheets   styless   styleNs   styleHs   styleH2s   appends	   Paragraphs   times   ctimes   oss   paths   splits   getcwds   isdirs   popens   reads	   infoLiness   Preformatteds   getCodeNamess	   codeNamess   reportlab.lib.utilss   flattens   _[1]s   syss   argvs   xs
   startswiths   floats   widths   heights   ints   isoScales   optionss   scaless   maps   scales	   PageBreaks   Spacers   codeNames   ss   hrs   createBarcodeDrawings   drs   renderScales   _bcs   values   KeepTogethers   SimpleDocTemplates   fileNames   build(   s   fileNames   styleH2s   scaless   heights	   infoLiness   flattens   codeNames   storys   scales   ss   widths   styless   hrs	   codeNamess   drs   optionss   _[1]s   isoScales   xs   styleHs   styleN(    (    s	   ./test.pys   fullTestM   sv     	


)6
	HHH   K&&   	 s   __main__(.   s   oss   syss   times!   reportlab.graphics.barcode.commons!   reportlab.graphics.barcode.code39s!   reportlab.graphics.barcode.code93s"   reportlab.graphics.barcode.code128s   reportlab.graphics.barcode.uspss   reportlab.tests   unittests   reportlab.test.utilss   makeSuiteForClassess
   outputfiles   printLocations   reportlab.platypuss   Spacers   SimpleDocTemplates   Tables
   TableStyles   Preformatteds	   PageBreaks   reportlab.lib.unitss   inchs   cms   reportlab.libs   colorss   reportlab.pdfgen.canvass   Canvass   reportlab.lib.styless   getSampleStyleSheets   reportlab.platypus.paragraphs	   Paragraphs   reportlab.platypus.framess   Frames   reportlab.platypus.flowabless   XBoxs   KeepTogethers   reportlab.graphics.shapess   Drawings   reportlab.graphics.barcodes   getCodess   getCodeNamess   createBarcodeDrawings   runs   fullTests   __name__(   s   Canvass   createBarcodeDrawings   cms   unittests   Preformatteds   colorss   makeSuiteForClassess   SimpleDocTemplates   printLocations
   outputfiles   getCodeNamess   getCodess   XBoxs   inchs   runs   syss	   Paragraphs   KeepTogethers   Tables   Drawings
   TableStyles   Frames   Spacers	   PageBreaks   times   getSampleStyleSheets   oss   fullTest(    (    s	   ./test.pys   ?   s,   +	3j