-
Notifications
You must be signed in to change notification settings - Fork 683
Closed
Labels
not a bugnot a bug / user error / unable to reproducenot a bug / user error / unable to reproduce
Description
my code:
@app.route('/fill', methods=['POST'])
def fill_field():
suffix = str(uuid.uuid1())
file_path = request.form.get('file_path')
form = request.form.get('form_data')
jd = json.loads(form)
with open(file_path, 'rb') as reader:
doc = mu.open(reader)
for index in range(len(doc)):
page = doc[index]
for field in page.widgets():
fn = field.field_name
if jd.get(fn):
field.field_value = jd[fn]
field.update()
doc.ez_save(file_path + "." + suffix + ".pdf" ,
deflate=False,
deflate_images=False,
deflate_fonts=False,
) # 优化文件结构)
doc.close()
return 'ok'
and run the code, i see the widget content is replaced, but the widget still can see it and edit it. how can i just show the content, but not the widget.
Thanks!
Metadata
Metadata
Assignees
Labels
not a bugnot a bug / user error / unable to reproducenot a bug / user error / unable to reproduce