Skip to content

Freetext annot not showing text #4210

@pablodm00

Description

@pablodm00

Description of the bug

Hello everyone,

I am currently developing an application on the Viktor.ai platform. During the development phase, the app runs locally in a virtual environment (Windows). However, after publishing, it runs on Linux servers managed by the platform.

I am using PyMuPDF to add FreeText annotations to a PDF document. While everything functions perfectly during local development, I’ve encountered an issue after publishing the app to their Linux servers:

The freetext annot gets created, but it does not show the text.
image

In a PDF editor (I am using Bluebeam Revu) I can resize the textbox, and it shows the text but in red
image

If I resize again, it now shows the text in the correct colour (black)
image

I’d appreciate any insights or suggestions on what could be causing this issue. Has anyone encountered a similar problem or can point me in the right direction?

Thank you in advance for your help!

How to reproduce the bug

annot_text = page_export.add_freetext_annot(rect=rect, text=text, fontsize= text_size, align=1)
annot_text.set_oc(oc_names)
annot_text.update()

PyMuPDF version

1.24.14

Operating system

Linux

Python version

3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions