%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/reportlab/graphics/barcode/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/reportlab/graphics/barcode/__pycache__/test.cpython-312.pyc

�

��e�-�	���ddlZddlZddlmZddl�ddl�ddl�ddl�ddl	�ddl
mZddlm
Z
ddlmZmZddlmZmZmZddlmZdd	lmZdd
lmZddlmZddlmZmZdd
l m!Z!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'd�Z(d(d�Z)e*dk(r[e(�e)�d�Z+e+de'dd���e+de'ddd���e+de'dddd �!��e+d"e'd#d$d%d&�'��yy))�N)�Version)�*)�USPS_4State)�QrCodeWidget)�DataMatrixWidget�	pylibdmtx)�Spacer�SimpleDocTemplate�	PageBreak)�inch)�colors)�getSampleStyleSheet)�	Paragraph)�XBox�KeepTogether)�Drawing�Rect�Line)�getCodeNames�createBarcodeDrawing�createBarcodeImageInMemoryc�n�t�}|d}|d}g}|j}|td|��|tdtdzd���|tdtdzd	���|td
tdzd���|tdtdzd	d���|td
|��|td��|td|��|t
dtdz���|td|��|td��|td|��|td��|td|��|td��|td|��|td��|td|��|td��|td|��|td��|td|��|td��|td|��|td ��|td!|��|td"��|td#|��|t!d$d%��dd&lm}|td'|��||d'd(�)��|td*|��||d'd(d+�,��|td-|��||d-d.�)��|t'��|td/|��||d0d1d�2��|td3|��||d0d1dd+�4��|td5|��||d0d1d+�2��|td6|��||d7d8�)��|td9|��||d7d8d:�2��|td;|��||d7d8d:d+�4��|td<|��||d<d=�)��|td>|��||d>d$d%�?��|td@|��||d@d$�)��|td@|��||d@d$dAdB�C��d]dF�}|tdG|��t)dHdH�}|j+t-dddHdHd	t.j0d�I��|j+t3d$�)��||�|tdJ|��t)dHdH�}|j+t-dddHdHd	t.j0d�I��||dKdK�|j+t3d$dKdK�C��||�|tdL|��|t5dMtzd	tzdN��|tdL|��|t5dOtzdEtzdP��t6�r�|t'��|tdQ|��t)dHdH�}|j+t-dddHdHd	t.j0d�I��||dKdK�|j+t9dRdKdK�C��||�|tdQ|��t)dHdH�}|j+t-dddHdHd	t.j0d�I��||dKdK�|j+t9dRdKdKdDdS�T��||�|tdU|��t)dHdH�}|j+t-dddHdHd	t.j0d�I��||dVdV�|j+t9dRdVdVdWdXdY�Z��||�t;d[�j=|�t?d\�y)^N�Normal�Heading1�I2of5�05400141288766g{�G�z�?r)�barWidth�checksum�
0001234567890��00012345678905T)rr�	bearerBox�MSIi��Codabar�A012345B)rzCode 11�01234545634563zCode 39z
A012345B%RzExtended Code 39z	A012345B}�Code93zCODE 93zExtended Code93zL@@K! Code 93 :-)zCode 128zAB-12345678z
Code 128 AutozUSPS FIM�AzUSPS POSTNETz
78247-1043zUSPS 4 State�01234567094987654321�01234567891)r�EAN13�123456789012��valuezEAN13 quiet=FalseF)r.�quiet�EAN8�1234567zEAN5 price=True�EAN5�11299)r.�pricezEAN5 price=True quiet=False)r.r4r/zEAN5 price=Falsez
ISBN alone�ISBN�
9781565924796zISBN  with ean5 price�01299z"ISBN  with ean5 price, quiet=False�UPCA�03600029145r)r.�routing�QR��2)r.�x�y�black��?c
���|dz}|dz}|jt||z
|||z|dtj���|jt|||z
|||zdtj���y)NrA)�strokeWidth�strokeColor)�addrr
�blue)�dr>r?�w�hrDrCs       �A/usr/lib/python3/dist-packages/reportlab/graphics/barcode/test.py�addCrosszrun.<locals>.addCrossxsb��	�S���	�S���	���d�1�Q�3�q��1��Q�3�6�;�;�G�H�	���d�1�a��c�1�a��c�c�f�k�k�J�K�zQR in drawing at (0,0)�d)rCrD�	fillColorzQR in drawing at (10,10)�
z
Label Sizeg@z1x2-5/8"g�?z
1/2x1-3/4"z DataMatrix in drawing at (10,10)�
1234567890�lime)r.r>r?�color�bgColorz*DataMatrix in drawing at (90,90) anchor=ne�Z�darkblue�yellow�ne)r.r>r?rRrS�anchorzout.pdfz
saved out.pdf)�rYr@rA) r�appendrrrr#r$�Code11�
Standard39�
Extended39�
Standard93�
Extended93�Code128�Code128Auto�FIM�POSTNETr�reportlab.graphics.barcoderrrrErr
�redrrrrr
�build�print)�styles�styleN�styleH�story�storyAddrrKrGs        rJ�runrms2��
 �
"�F�
�H�
�F�
�J�
�F��E��|�|�H�
�Y�w��
'�(��U�#��T�	�A�
F�G��U�?�t�D�y�1�
E�F��U�#��T�	�A�
F�G��U�?�t�D�y�1�RV�
W�X�
�Y�u�f�
%�&��S��Y���Y�y�&�
)�*��W�Z�D��I�
6�7��Y�y�&�
)�*��V�$�
%�&��Y�y�&�
)�*��Z��
%�&��Y�)�6�
2�3��Z��
$�%��Y�x��
(�)��Z�	�
"�#��Y�(�&�
1�2��Z�+�
,�-��Y�z�6�
*�+��W�]�
#�$��Y���
/�0��[��
'�(��Y�z�6�
*�+��S��X���Y�~�v�
.�/��W�\�
"�#��Y�~�v�
.�/��[�/�
�
>�?�?��Y�w��
'�(��
!�'��
@�A��Y�*�F�
3�4��
!�'��u�
M�N��Y�v�v�
&�'��
!�&�	�
:�;��Y�[���Y�(�&�
1�2��
!�&��t�
D�E��Y�4�f�
=�>��
!�&��t�5�
Q�R��Y�)�6�
2�3��
!�&��u�
E�F��Y�|�V�
,�-��
!�&��
@�A��Y�.��
7�8��
!�&��g�
N�O��Y�;�V�
D�E��
!�&��g�TY�
Z�[��Y�v�v�
&�'��
!�&�
�
>�?��Y�}�f�
-�.��
!�-�7M�Vc�
d�e��Y�t�V�
$�%��
!�$�.D�
E�F��Y�t�V�
$�%��
!�$�.D�r�B�
O�P�L�

�Y�/��
8�9���C��A��E�E�$�q��3�s�q�V�Z�Z�$�
O�P��E�E�,�3�
4�5��Q�K��Y�1�6�
:�;���C��A��E�E�$�q��3�s�q�V�Z�Z�$�
O�P��Q�r�"���E�E�,�3�b�2�
>�?��Q�K��Y�|�V�
,�-��T�=�$�&��D��*�
=�>��Y�|�V�
,�-��T�4��+�r�D�y�,�
7�8��������=�v�F�G��C����	���d�1�Q�s�3�1����d�S�T���2�b��	����\�B��<�=������=�v�F�G��C����	���d�1�Q�s�3�1����d�S�T���2�b��	����\�B��'�RX�Y�Z������G��P�Q��C����	���d�1�Q�s�3�1����d�S�T���2�b��	����\�B��*�U]�fj�k�l�����i� �&�&�u�-�	�/�rLc	���g}t�}|d}|d}|d}g}|jtdtz|��|jtdt	j
t	j��z|��|jtd|��|jtd|��|jtd|��|jtd	|��|jtd
|��|jtd|��|jtd|��|jtd
|��|jtd|��|jtd|��|jtd|��t
�}ddlm}tjD�cgc]"}|jd�s�t|dd���$}	}tjD�cgc]"}|jd�s�t|dd���$}
}tjD�cgc]"}|jd�s�t|dd���$}}i}|	r|	d|d<|
r|
d|d<|r|d|d<tjD�cgc](}|jd�s�|ddjd���*}
}tt!t|
xr||
�xsdg��}
tt!t|
xr||
�xsdg��}
|
D�]}|jt#��|jtd |z|��|jt%d!d"��|D]�}td#|z|�g}d$D]^}|jt%d!d"��t'|fd%|i|��}||_|j|�|jt%d!d"���`|jtd&j*j,z|��|jt/|������t1|�j3|�t5d'|�ycc}wcc}wcc}wcc}w)(z<Creates large-ish test document with a variety of parametersrr�Heading2z-ReportLab %s Barcode Test Suite - full outputzGenerated at %szAbout this documentzHistory and Statuszf
        This is the test suite and docoumentation for the ReportLab open source barcode API.
        a�
        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.
        aq
        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.
        a�
        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".  
        a�
        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.
        zUsage examplesz!
        To be completed
        z	The codesaV
        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.
        r)�flattenz--width=�Nz	--height=�	z--isoscale=��width�height�isoScalez--scale=�,r zScale = %.1f�$�zCode: )rr �
humanReadablezBarcode should say: �created)rrZr�__RL_Version__�time�ctimer�reportlab.lib.utilsrp�sys�argv�
startswith�float�int�split�list�maprr	r�renderScale�_bcr.rr
rfrg)�fileNamerkrhrirj�styleH2�	codeNamesrpr>rtrurv�options�scales�scale�codeName�s�hr�drs                   rJ�fullTestr��s���
�E�
 �
"�F�
�H�
�F�
�J�
�F��Z� �G��E�	�L�L��J�^�[�\b�c�d�	�L�L��,�t�z�z�$�)�)�+�/F�F��O�P�	�L�L��0�'�:�;�	�L�L��/��9�:�	�L�L���
���
�L�L����
��
�L�L���
���
�L�L���
���
�L�L����
��
�L�L��+�W�5�6�	�L�L���
���
�L�L��;��0�1�	�L�L��������I�+�#&�8�8�H�a�q�|�|�J�/G�U�1�Q�R�5�\�H�E�H�$'�H�H�
J�q����[�0I�e�A�a�b�E�l�
J�F�
J�%(�X�X�M�����m�1L��A�b�c�F��M�H�M��G���q��g�g��
�6�!�9�w�x� ��x��{���$�(+���
M�1�A�L�L��4L�a���e�k�k�#��
M�F�
M�
�#�e�F�6�w�v��=�1�#�>�
?�F�
�#�e�F�6�w�v��=�1�#�>�
?�F��
*��
���Y�[�!�
���Y�~�e�3�W�=�>�
���V�B��^�$�!�		*�H��8�h�.��8�9�A��
)�������B��(�)�(�O�"�O�w�O��!&�������������B��(�
)�
�H�H�Y�5������D�f�M�N��L�L��a��)�		*�	
*��h��%�%�e�,�	�)�X���5
I��
J��M��
Ns0�Q&�%Q&�	Q+� Q+�Q0�Q0�Q5�6Q5�__main__c�^�t|d�}|j|�|j�y)N�wb)�open�write�close)�name�memory�fs   rJ�createSampler�s!����d�O��	�����	���	rLztest_cbcim.pngr+r,r-ztest_cbcim.gifr0r1�gif)r.�formatztest_cbcim.pdfr8r9�pdf�()r.r��	barHeightztest_cbcim.tiffrr)r*�tiff)r.r:r�)z
test_full.pdf),r�r}�	reportlabrr|�!reportlab.graphics.barcode.common�!reportlab.graphics.barcode.code39�!reportlab.graphics.barcode.code93�"reportlab.graphics.barcode.code128�reportlab.graphics.barcode.usps�!reportlab.graphics.barcode.usps4sr�reportlab.graphics.barcode.qrr�reportlab.graphics.barcode.dmtxrr�reportlab.platypusr	r
r�reportlab.lib.unitsr�
reportlab.libr
�reportlab.lib.stylesr�reportlab.platypus.paragraphr�reportlab.platypus.flowablesrr�reportlab.graphics.shapesrrrrdrrrrmr��__name__r��rLrJ�<module>r�s����/�/�/�/�0�-�9�6�G�C�C�$� �4�2�;�9�9�e�e�N�`_�B�Z���E��J���!�"<�W�N�"[�\��!�"<�V�9�]b�"c�d��!�"<�V�=�`e�qs�"t�u��"�#=�m�Si�r�HN�$O�P�rL

Zerion Mini Shell 1.0