-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template.split_multcell() modifies document #238
Comments
Whenever a font is add with
It is certainly doable, but it would add quite some complexity to the code... Why don't you want to call In #228 (comment) you wrote:
What approach did you chose in the end? |
I do want to call it (have to, actually), but I don't want it to modify the document.
It uses a seperate instance now. |
FPDF.multi_cell(split_only=True)
is designed not to modify the file, and that's whatTemplate.Split_multicell()
uses.But...
To actually make it work, it needs to call
FPDF.set_font()
first. And that does modify the document, even if the effect is not immediately visible. Because it happens asynchronously to the actual rendering of the related template element, it will quite often lead to spurious data in PDF documents. Or doesFPDF()
check whether a font setting is actually used, before writing it into the file?If not, there would be a relatively simple solution on the
Template()
side. Since I'm fiddling in the area anyway: Would it make sense to create a seperate dummyFPDF()
instance for this purpose? Then the extra content would go there, and not unnecessarily pollute the target document.The text was updated successfully, but these errors were encountered: