coves y edocuments
This commit is contained in:
13
examples/test_extract_file.py
Normal file
13
examples/test_extract_file.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import os
|
||||
from utils.peticiones import extract_pdf_bytes_from_xml
|
||||
|
||||
xml_path = os.path.abspath("./test.xml")
|
||||
|
||||
result = extract_pdf_bytes_from_xml(xml_path)
|
||||
|
||||
if result and result["pdf_bytes"]:
|
||||
with open("output_test.pdf", "wb") as f:
|
||||
f.write(result["pdf_bytes"])
|
||||
print("PDF extraído y guardado como output_test.pdf")
|
||||
else:
|
||||
print("No se pudo extraer el PDF del XML.")
|
||||
Reference in New Issue
Block a user