-
Notifications
You must be signed in to change notification settings - Fork 555
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
Turn off print statements in utils.py #2345
Comments
You can exclude annotations and / or links from being copied alongside their pages: doc.insert_pdf(src, from_page=f, to_page=t, annots=False, links=False) Then copying these objects will be suppressed and no messages will be issued. The default is copying these object types. |
Again thinking about it: |
Previously we displayed error messages (Python `print()`) if a link could not be replicated on the target page within method `doc.insert_pdf()`. As the method has no way to provide more information on the problem's cause, and hence cannot provide information on how to fix the problems, the messages make no sense and will be omitted.
Previously we displayed error messages (Python `print()`) if a link could not be replicated on the target page within method `doc.insert_pdf()`. As the method has no way to provide more information on the problem's cause, and hence cannot provide information on how to fix the problems, the messages make no sense and will be omitted.
Previously we displayed error messages (Python `print()`) if a link could not be replicated on the target page within method `doc.insert_pdf()`. As the method has no way to provide more information on the problem's cause, and hence cannot provide information on how to fix the problems, the messages make no sense and will be omitted.
Fixed in PyMuPDF-1.22.1. |
How do we debug this? agree with @JorjMcKie |
I cant suppress the logging with or without the |
…intentionally reverted. Previously we displayed error messages (Python `print()`) if a link could not be replicated on the target page within method `doc.insert_pdf()`. As the method has no way to provide more information on the problem's cause, and hence cannot provide information on how to fix the problems, the messages make no sense and will be omitted.
…onally reverted. Previously we displayed error messages (Python `print()`) if a link could not be replicated on the target page within method `doc.insert_pdf()`. As the method has no way to provide more information on the problem's cause, and hence cannot provide information on how to fix the problems, the messages make no sense and will be omitted.
…intentionally reverted. Previously we displayed error messages (Python `print()`) if a link could not be replicated on the target page within method `doc.insert_pdf()`. As the method has no way to provide more information on the problem's cause, and hence cannot provide information on how to fix the problems, the messages make no sense and will be omitted.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Potentially add an issue reference.
When I run the insert_pdf() method on a pdf, I sometimes get hundreds of print statements like these:
print("cannot create /Annot for kind: " + str(l["kind"]))
Describe the solution you'd like
A clear and concise description of what you want to happen.
I want to be able to turn them off, so that my terminal is not overloaded.
Describe alternatives you've considered
Are there several options for how your request could be met?
Maybe logging could be used instead of print statements
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: