Skip to content

Question: How can I remove annotation border? #750

@chanhlt12

Description

@chanhlt12

I am trying to add a rect annot to PDF file.
And I don't want to see its border.
I tried to set border to None, but it does not work.
Here is my code:

import fitz

doc = fitz.open()
page = doc.newPage()
rect = fitz.Rect(0,0, 100, 100)
annot = page.addRectAnnot(rect)
fill = (0.3, 0.6, 1.0)
annot.setColors(fill=fill)
annot.setBorder(border=None)
annot.update()
doc.save("out.pdf")

There is always a red border around the rect annot as below.

image

Please teach me how to make it disappear.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions