Replies: 6 comments 11 replies
-
Did you look up the PDF reference if "leader line" is supported? If it isn't (what I would guess) then you have to create this with (multiple) line annotations: https://pypdf2.readthedocs.io/en/stable/user/adding-pdf-annotations.html#line Arrow heads might be directly supported though. |
Beta Was this translation helpful? Give feedback.
-
No it is not supported. But I am guessing that it shouldn't be too difficult to add this feature by editing the library. I extrapolate this because the independent objects are available (line and text box) |
Beta Was this translation helpful? Give feedback.
-
From your original comments, I understand that you are looking for adding Author, and the callout. Remember that the AnnotationBuilder creates a dictionnary that is in accordance with the PDF reference document. Therefore you can easily complete it: you will just need to have the type conversion adding: then you can add author easily: and for the callout (page 624-625 in pdf 1.7 reference): |
Beta Was this translation helpful? Give feedback.
-
@Kuma-99
|
Beta Was this translation helpful? Give feedback.
-
The before and after image shows the appearance of the leader line after the callout box is moved manually. Any explanation for this ? still cant figure this out @pubpub-zz |
Beta Was this translation helpful? Give feedback.
-
@pubpub-zz it looks like youre telling me that the rect is supposed to contain the /RD and /CL objects. But when i tried this i getting the following error: SyntaxError: expression cannot contain assignment, perhaps you meant "=="?. Could you please show me a demo of the proper code |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
I am writing to you to request a much needed update on PyPDF2 library. You see, I am a civil engineer, who has to deal with editing and commenting on layout plans from architects. This library comes so close to solving so many inefficiencies for me. I am aware that the pypdf2 library comes with the annotation builder which is exactly what I need to make comments but it does not have the leader line (callouts) that allows me to point out objects from the pdf drawing as well as include the authors name. After going through your code I am a little perplexed on how I can accomplish my idea by supplementing your library with what I think should be a few lines of code.
Please advise, the amount of back date work I have is overwhelming.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions