Im using borb librarie to attach a xlsx file into a pdf and it works well, but now i want to add an annotation link in some page of the pdf to get into the xlsx file attached
Here is my code that attaches the xlsx file into a pdf:
from borb.pdf import Document
from borb.pdf import PDF
import typing
doc: typing.Optional[Document] = None
with open("input.pdf", "rb") as fh:
doc = PDF.loads(fh)
# read the xlsx file and embed its contents in the PDF
with open("example.xlsx", "rb") as xlsx_file:
xlsx_contents = xlsx_file.read()
doc.add_embedded_file("example.xlsx", xlsx_contents)
# store
with open("output.pdf", "wb") as fh:
PDF.dumps(fh, doc)
I hope could you help me to create a link to get into the xlsx file.