Skip to content
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

PPF-707: text field aligned to center #707

Open
vatsenko opened this issue Aug 17, 2024 · 2 comments · Fixed by #708
Open

PPF-707: text field aligned to center #707

vatsenko opened this issue Aug 17, 2024 · 2 comments · Fixed by #708
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@vatsenko
Copy link

Version

PyPDFForm=1.4.31

Issue Description

Need to create text field aligned to center (optionally right)

Code Snippet

new_form.create_widget(
        widget_type="text",
        name=id,
        page_number=1,
        x=x,
        y=y,
        width=w,  # optional
        height=h,  # optional
        #max_length=5,   # optional
        #font="Arial Narrow", # optional
        font_size=f,   # optional
        #font_color=(1, 0, 0),   # optional
        #bg_color=(0, 0, 1), # optional
        #border_color=(1, 1, 1), # optional
        border_width=0  # optional
        text_align="C"
    )

PDF Form Template

filled.pdf

Screenshots (if applicable)

Screenshot 2024-08-17 at 23 53 58
@vatsenko vatsenko changed the title PPF-<issue number>: <issue title> PPF-1: text field aligned to center Aug 17, 2024
@vatsenko vatsenko changed the title PPF-1: text field aligned to center PPF-707: text field aligned to center Aug 17, 2024
@chinapandaman chinapandaman self-assigned this Aug 21, 2024
@chinapandaman chinapandaman added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 21, 2024
@chinapandaman
Copy link
Owner

Hey thanks for posting. This is implemented in the newest version. Give v1.4.32 a try and let me know.

@chinapandaman
Copy link
Owner

Forgot to mention, the doc for this is also updated: https://chinapandaman.github.io/PyPDFForm/prepare/#create-a-text-field-widget

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants