Exemple #1
0
#!/usr/bin/python2
# -*- coding: utf-8 -*-


from fonts import fonts
from data import adv_text
from data import reg_text
from templates import horeca
import grid.generic
import frame.generic
import generator.page_layout
import os
from reportlab.lib.units import mm


page_size = [210,297]
pdf_dir = (os.path.join(os.getcwd(),'out/pdf'))

offer_data = reg_text.init('/home/raven/gen_projects/horeca_24/imageDB/','/home/raven/gen_projects/horeca_24/data')

fonts.init()

for page_number,page_offers in offer_data.iteritems():
	print page_offers
	template = horeca.init(page_size)
	template = grid.generic.init(template,page_offers)
	template = frame.generic.init(template)
	generator.page_layout.layout(template,page_size,'/home/raven/git/pages/imageDb/','/home/raven/git/pages/out/pdf2/',str(page_number) + '_test_1.pdf')

#command = 'pdfunite $(ls ' + '/home/raven/git/pages/out/pdf2/' + ') out.pdf && gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dTextAlphaBits=2 -dGridFitTT=1 -dColorImageResolution=320 -sOutputFile=out_light.pdf out.pdf'
#os.popen(command)
Exemple #2
0
import os
from reportlab.lib.units import mm

import utils.layout.preflight
import utils.text.preflight
import utils.image.rate
import utils.image.fit_to_box
import flow.text_string
import flow.price_std
import flow.rectangle

mult = 2
page_size = [(192 / mm) * mult, (128 / mm) * mult]
pdf_dir = (os.path.join(os.getcwd(), 'out/pdf'))

offer_data = reg_text.init('/home/raven/gen_projects/horeca_23/images/done/',
                           '/home/raven/gen_projects/horeca_23')
offer = offer_data[offer_data.keys()[0][0]][0]
#print offer[0]
#print offer[0]['price']
fonts.init()
for stamp in range(0, 80):
    frame_template = {}
    for page_number, page_offers in offer_data.iteritems():
        template = video_blank.init(page_size)
        template = grid.generic.init(template, page_offers)
    print 'timestamp:', stamp

    #init stage
    width, height = page_size
    h_border = height * 0.025
    v_border = height * 0.025
Exemple #3
0
import os
from reportlab.lib.units import mm

import utils.layout.preflight
import utils.text.preflight
import utils.image.rate
import utils.image.fit_to_box
import flow.text_string
import flow.price_std
import flow.rectangle

mult = 2
page_size = [(192/mm)*mult,(128/mm)*mult]
pdf_dir = (os.path.join(os.getcwd(),'out/pdf'))

offer_data = reg_text.init('/home/raven/gen_projects/horeca_23/images/done/','/home/raven/gen_projects/horeca_23')
offer = offer_data[offer_data.keys()[0][0]][0]
#print offer[0]
#print offer[0]['price']
fonts.init()
for stamp in range(0,80):
	frame_template = {}
	for page_number,page_offers in offer_data.iteritems():
		template = video_blank.init(page_size)
		template = grid.generic.init(template,page_offers)
	print 'timestamp:',stamp

	#init stage
	width,height = page_size
	h_border = height * 0.025
	v_border = height * 0.025