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

Form fields in the wrong place #252

Closed
tiredelk opened this issue Jul 13, 2018 · 4 comments
Closed

Form fields in the wrong place #252

tiredelk opened this issue Jul 13, 2018 · 4 comments

Comments

@tiredelk
Copy link

Hi,

I'm converting a very simple html with a form (input text, textarea, checkbox and radio buttons) into PDF. The problem is the position of the fillable boxes in the final PDF, they are all to the left/top.

I tried to fix it with css but it doesn't seem to apply to the fillable boxes (or I don't know how to).

form.html.txt - form.pdf

Any suggestions?

@tiredelk
Copy link
Author

As sugested by @rototor the style @page { margin: 0.01mm } is a work around.

But if the content exceeds the first page then the fillable boxes of the second (I haven tested with more than 2 pages) go under the second page, out of it.

form-long.html.txt
print.css.txt
form-long-ohtp.pdf

@danfickle
Copy link
Owner

Both the page margin issue and the multiple pages issue were caused by failing to clone the page transform when we passed it to the form object to process later. Meaning that when we came to the end and processed all forms/controls we used the last page transform for each instead of the correct one.

Anyway, thanks for reporting this @tiredelk and both examples now work. Let us know if you find any other issues with form handling.

@danfickle
Copy link
Owner

I've documented form controls. It may be useful.

@msuvarna-web
Copy link

I am using form option in html but nothin is displaying in pdf. which version support form

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

No branches or pull requests

3 participants