Spaces:
Sleeping
Sleeping
Update pixelconversion.py
Browse files- pixelconversion.py +3 -3
pixelconversion.py
CHANGED
|
@@ -61,13 +61,13 @@ def openDrawPDF(path):
|
|
| 61 |
|
| 62 |
|
| 63 |
if page.rotation !=0:
|
| 64 |
-
page.draw_rect([shape[3][0]
|
| 65 |
else:
|
| 66 |
-
page.draw_rect([shape[0][0]
|
| 67 |
text = """Scale Document"""
|
| 68 |
annot1=page.add_freetext_annot(rectText, text, fontsize=45, fontname='helv', border_color=(1,1,1), text_color=(1,1,1), rotate=rotate, align=1)
|
| 69 |
annot1.update()
|
| 70 |
-
doc.save('k.pdf')
|
| 71 |
return doc
|
| 72 |
"""### Extract color"""
|
| 73 |
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
if page.rotation !=0:
|
| 64 |
+
page.draw_rect([shape[3][0]+30,shape[3][1]+30,shape[1][0]-30,shape[1][1]-30], color = (75/255,0,130/255), width = 1,fill=(75/255,0,130/255),fill_opacity=0.9 )
|
| 65 |
else:
|
| 66 |
+
page.draw_rect([shape[0][0]+30,shape[0][1]+30,shape[2][0]-30,shape[2][1]-30], color = (75/255,0,130/255), width = 1,fill=(75/255,0,130/255),fill_opacity=0.9 )
|
| 67 |
text = """Scale Document"""
|
| 68 |
annot1=page.add_freetext_annot(rectText, text, fontsize=45, fontname='helv', border_color=(1,1,1), text_color=(1,1,1), rotate=rotate, align=1)
|
| 69 |
annot1.update()
|
| 70 |
+
# doc.save('k.pdf')
|
| 71 |
return doc
|
| 72 |
"""### Extract color"""
|
| 73 |
|