14 lines
515 B
Python
14 lines
515 B
Python
|
from flask_app.main.format_change import docx2pdf, pdf2docx
|
||
|
from flask_app.货物标.货物标截取pdf import truncate_pdf_main
|
||
|
def main_processing(output_folder,file_path,file_type, unique_id):
|
||
|
if file_type==1:
|
||
|
docx_path=file_path
|
||
|
pdf_path = docx2pdf(file_path)
|
||
|
elif file_type==2:
|
||
|
pdf_path=file_path
|
||
|
docx_path=pdf2docx(file_path)
|
||
|
else:
|
||
|
print("未传入指定格式的文件!")
|
||
|
return None
|
||
|
truncate_file=truncate_pdf_main(pdf_path,output_folder,1)
|