Server IP : 127.0.0.2 / Your IP : 3.144.103.205 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.7/dist-packages/reportlab/lib/ |
Upload File : |
#! /usr/bin/python #Copyright ReportLab Europe Ltd. 2000-2016 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/pagesizes.py """This module defines a few common page sizes in points (1/72 inch). To be expanded to include things like label sizes, envelope windows etc.""" __version__='3.3.0' from reportlab.lib.units import cm, inch _W, _H = (21*cm, 29.7*cm) A6 = (_W*.5, _H*.5) A5 = (_H*.5, _W) A4 = (_W, _H) A3 = (_H, _W*2) A2 = (_W*2, _H*2) A1 = (_H*2, _W*4) A0 = (_W*4, _H*4) LETTER = (8.5*inch, 11*inch) LEGAL = (8.5*inch, 14*inch) ELEVENSEVENTEEN = (11*inch, 17*inch) # lower case is deprecated as of 12/2001, but here # for compatability letter=LETTER legal=LEGAL elevenSeventeen = ELEVENSEVENTEEN _BW, _BH = (25*cm, 35.3*cm) B6 = (_BW*.5, _BH*.5) B5 = (_BH*.5, _BW) B4 = (_BW, _BH) B3 = (_BH*2, _BW) B2 = (_BW*2, _BH*2) B1 = (_BH*4, _BW*2) B0 = (_BW*4, _BH*4) def landscape(pagesize): """Use this to get page orientation right""" a, b = pagesize if a < b: return (b, a) else: return (a, b) def portrait(pagesize): """Use this to get page orientation right""" a, b = pagesize if a >= b: return (b, a) else: return (a, b)