Marthee commited on
Commit
fb16a58
·
1 Parent(s): 80f07c2

Update pixelconversion.py

Browse files
Files changed (1) hide show
  1. pixelconversion.py +2 -3
pixelconversion.py CHANGED
@@ -59,11 +59,10 @@ def openDrawPDF(path):
59
  rectText=fitz.Rect(500, 200, (page.rect.height-80),( page.rect.height+80) )
60
  rotate=90
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()
 
59
  rectText=fitz.Rect(500, 200, (page.rect.height-80),( page.rect.height+80) )
60
  rotate=90
61
 
 
62
  if page.rotation !=0:
63
+ page.draw_rect([shape[3][0]-20,shape[3][1]-20,shape[1][0]+20,shape[1][1]+20], color = (75/255,0,130/255), width = 1,fill=(75/255,0,130/255),fill_opacity=0.9 )
64
  else:
65
+ page.draw_rect([shape[0][0]-20,shape[0][1]-20,shape[2][0]+20,shape[2][1]+20], color = (75/255,0,130/255), width = 1,fill=(75/255,0,130/255),fill_opacity=0.9 )
66
  text = """Scale Document"""
67
  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)
68
  annot1.update()