Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
338e9593
Commit
338e9593
authored
Mar 02, 2021
by
irving
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cambiado tamaño de imagenes en pdf
parent
d5f0769c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
aside.html
reports/templates/aside.html
+1
-1
views.py
reports/views.py
+11
-5
No files found.
reports/templates/aside.html
View file @
338e9593
...
...
@@ -183,7 +183,7 @@
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"{% url 'PDF' purchaseID %}"
target=
"_blank"
download=
"{{ searchInfo.
title }} ({{ searchInfo.purchase_dat
e }}).pdf"
>
<a
class=
"treeview submenu"
href=
"{% url 'PDF' purchaseID %}"
target=
"_blank"
download=
"{{ searchInfo.
pdf_nam
e }}).pdf"
>
<i
class=
"fa fa-file-pdf-o"
></i>
<span>
Export to PDF
</span>
<span
class=
"pull-right-container"
>
...
...
reports/views.py
View file @
338e9593
...
...
@@ -68,7 +68,8 @@ def report_L2ASCL(request, purchase_id):
image_path
=
email
+
"/"
+
purchase_id
+
"/"
+
"out/"
+
reporteDir
+
"/TCI/thumbnails/"
SCL_path
=
email
+
"/"
+
purchase_id
+
"/"
+
"out/"
+
reporteDir
+
"/SCL/"
pdfName
=
purchase
[
'name'
]
.
replace
(
","
,
""
)
.
replace
(
" "
,
"_"
)
+
"_"
+
purchase
[
'aggreg_date'
]
.
strftime
(
'
%
Y-
%
m-
%
d-
%
H:
%
M:
%
S'
)
+
".pdf"
#print(pdfName)
searchInfo
=
{
"title"
:
purchase
[
'name'
],
...
...
@@ -82,7 +83,8 @@ def report_L2ASCL(request, purchase_id):
"productLevel"
:
dataProduct
[
'productLevel'
],
"polygon"
:
dataProduct
[
'wkt'
],
"description"
:
purchase
[
'description'
],
"report_name"
:
"SCL Image Classification Data(Km²)"
"report_name"
:
"SCL Image Classification Data(Km²)"
,
"pdf_name"
:
pdfName
}
...
...
@@ -213,7 +215,8 @@ def Reports(request):
Data
=
True
pdfName
=
producto
[
'name'
]
.
replace
(
","
,
""
)
.
replace
(
" "
,
"_"
)
+
"_"
+
producto
[
'aggreg_date'
]
.
strftime
(
'
%
Y-
%
m-
%
d-
%
H:
%
M:
%
S'
)
+
".pdf"
print
(
pdfName
)
#print(pdfName)
productList
.
append
({
"search_name"
:
producto
[
'name'
],
...
...
@@ -427,7 +430,7 @@ def myTable(path1, path2, basefile):
if
image1
.
imageWidth
<
image1
.
imageHeight
:
image2
=
Image
(
path1
,
height
=
300
,
width
=
200
,
mask
=
'auto'
)
else
:
image2
=
Image
(
path1
,
height
=
150
,
width
=
4
00
,
mask
=
'auto'
)
image2
=
Image
(
path1
,
height
=
150
,
width
=
2
00
,
mask
=
'auto'
)
path
,
dirs
,
files
=
next
(
os
.
walk
(
path2
))
for
file
in
files
:
...
...
@@ -437,7 +440,7 @@ def myTable(path1, path2, basefile):
if
image1
.
imageWidth
<
image1
.
imageHeight
:
image3
=
Image
(
mergeimages
(
path2
,
file
),
height
=
300
,
width
=
200
,
mask
=
'auto'
)
else
:
image3
=
Image
(
mergeimages
(
path2
,
file
),
height
=
150
,
width
=
4
00
,
mask
=
'auto'
)
image3
=
Image
(
mergeimages
(
path2
,
file
),
height
=
150
,
width
=
2
00
,
mask
=
'auto'
)
if
image1
.
imageWidth
<
image1
.
imageHeight
:
data
=
[[
'TCI'
,
'SCL'
],
[
image2
,
image3
]]
...
...
@@ -656,6 +659,9 @@ def PDFGenerator(request,purchase_id):
story
.
append
(
Spacer
(
1
,
.3
*
inch
))
print
(
path1
)
print
(
SCL
)
print
(
file
)
# table with images
story
.
append
(
myTable
(
path1
,
SCL
,
file
))
story
.
append
(
Spacer
(
1
,
.2
*
inch
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment