[reportlab-users] Reportlab Platypus Links and setAuthor...
Trevor Manson
trevortmanson at outlook.com
Wed May 11 15:33:31 EDT 2022
Dear Madam or Sirs,
I sincerely apologise as I am new to Python, and new to Reportlab, but I
am stumped...
I am making a Python app that produces a document (using Reportlab and
Platypus -which seems to answer my needs).
I managed to get a toc to work in my main document with links to the
relevant pages, and then sought to find a way to add page x of y.
Eventually, I managed to get this to work in my document, but then my
toc had zero contents.
Today, I managed to get the toc to work with the page x of y, which I
was really chuffed with. However, the links from the index all go to page 1.
I had also inserted a "manual" link that used the data generated by the
"doHeading" routine that provides a long hexadecimal(??) unique
reference, and had the source of the link(i.e.where I was jumping from)
at the end of the document, and confirmed this link was the same as I
would have from the toc - and the destination was midway through the
document.
However, now all the links, without exception jump to page 1.
Clearly I have made a basic error, but I am completely lost as to what I
am doing wrong, so any pointers would be most appreciated.
My second issue is that I have seen lots of samples showing how to set
e.g. setAuthor, setTitle and setSubject, which I would like to use,
since currently my pdfs, appear as "anonymous", which makes it hard to
see which document is which.
Each example shows how to use these metadata outside of Platypus, but
every attempt I try to use these results in failure.
In some examples of performing the page x of y, there is a reference to
a canvas, so I tried to add the metadata there without success (i.e. the
metadata wasn't changed).
Again, I feel I am missing something really obvious, and was hoping
someone may put me out of my misery and let me know how to set the
metadata in platypus!
My sincere thanks for any help - and help stop me tearing my (limited)
hair out!
Yours faithfully,
TM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20220511/70f20040/attachment.htm>
More information about the reportlab-users
mailing list