trying to fix pdf generation bug
This commit is contained in:
parent
b8cbc66e9d
commit
f08407c3b9
|
@ -17,7 +17,7 @@ from settings import MEDIA_ROOT, SITE_BASE, UPLOAD_ROOT, PROJECT_PATH
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import os
|
import os
|
||||||
from print_pdf import print_url_list
|
from print_pdf import print_url_list
|
||||||
|
import math
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def editor(request):
|
def editor(request):
|
||||||
|
@ -626,7 +626,7 @@ def product_pdf(request):
|
||||||
width_mm = request.GET['width']
|
width_mm = request.GET['width']
|
||||||
else:
|
else:
|
||||||
width_mm = product.typ.print_width
|
width_mm = product.typ.print_width
|
||||||
height_mm = int(width_mm // product.typ.aspect_ratio)
|
height_mm = math.ceil(width_mm // product.typ.aspect_ratio)
|
||||||
pages = product.get_page_list()
|
pages = product.get_page_list()
|
||||||
m = product.get_print_multiplier(dpi)
|
m = product.get_print_multiplier(dpi)
|
||||||
url_list = []
|
url_list = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user