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

Rect is missing from the type informations #3683

Closed
MartinX3 opened this issue Jan 3, 2024 · 5 comments
Closed

Rect is missing from the type informations #3683

MartinX3 opened this issue Jan 3, 2024 · 5 comments

Comments

@MartinX3
Copy link

MartinX3 commented Jan 3, 2024

const checkBox = new AcroFormCheckBox()

checkBox.Rect = [params.leftMargin, params.topMargin - checkboxTextHeight, checkboxLength, checkboxLength]

results into

error TS2339: Property 'Rect' does not exist on type 'AcroFormCheckBox'.

Looking into the code the Rect is missing from the type information.

@Setha77
Copy link

Setha77 commented Jan 9, 2024

Hi, I would like to work on this issue. Can you assign it to me ?
@MartinX3 is it in the src/modules/acroform.js that we have to check ?

@MartinX3
Copy link
Author

I don't know where to look and I also can't assign issue tickets since I'm not the owner of this project.

I also replaced the code with

checkBox.x = params.leftMargin
checkBox.y = params.topMargin - checkboxTextHeight
checkBox.width = checkboxLength
checkBox.height = checkboxLength

according to the documentation.
I don't know why online tutorials use Rect. It works, but it is not part of the documentation or the type information.
Maybe a remnant of an earlier version?

Copy link

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

@MartinX3
Copy link
Author

A comment from the devs would be nice.
Maybe this issue can be closed because it works as intended.

Copy link

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants