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

PDF generation issue when html contains form fields #47

Open
rupalirhatol opened this issue Nov 8, 2016 · 3 comments
Open

PDF generation issue when html contains form fields #47

rupalirhatol opened this issue Nov 8, 2016 · 3 comments

Comments

@rupalirhatol
Copy link

Hi,

The PDF being generated has form fields like first name , last name but the value of form fields overflows the text box border. I am trying to convert PDF for below string which has HTML form field and PDF generated is attached. It does not look good
sample.pdf
java codepng

String str2 = " "+
"

"+
"Student: "
+"
"
+""
+""
+" ";
converter.convertToPdf(str2,
IHtmlToPdfTransformer.A4L,
headerFooterList,
null,
out9,
properties);
sample9.pdf

@allcolor
Copy link
Owner

allcolor commented Nov 9, 2016

Hi, set the size via stylesheet and specify the unit, or simply replace the
input field by a span with a style that specify a border.

like: value

Regards,
Quentin

Le 9 nov. 2016 12:54 AM, "rupalirhatol" notifications@github.com a écrit :

Hi,

The PDF being generated has form fields like first name , last name but
the value of form fields overflows the text box border. I am trying to
convert PDF for below string which has HTML form field and PDF generated is
attached. It does not look good
sample.pdf
https://github.com/allcolor/YaHP-Converter/files/579624/sample.pdf
[image: java codepng]
https://cloud.githubusercontent.com/assets/23347875/20122306/a3e0aab8-a5cb-11e6-8d94-d1141a93ae29.png

String str2 = " "+
"


"+
"Student: "
+"
"
+""
+""
+" ";
converter.convertToPdf(str2,
IHtmlToPdfTransformer.A4L,
headerFooterList,
null,
out9,
properties);
sample9.pdf
https://github.com/allcolor/YaHP-Converter/files/579619/sample9.pdf


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#47, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABJ5B_mw6dMCWVaqDBeugKQSxBCGAEqaks5q8Qu-gaJpZM4KtDNZ
.

@rupalirhatol
Copy link
Author

Ok thanks for the solution. It helps but the HTML source code is we are getting is from third party where they are not ready to modify it or neither we are allowed to alter anything in their source html due to security reasons. Is there any other option? Thanks again and Appreciate your quick response.

@allcolor
Copy link
Owner

Hi, i've no other solution. If you can't modify the html at the source,
then simply preprocess it and replace all text input field by a span with a
border before giving it to the converter.

Regards, Quentin

Le 11 nov. 2016 12:39 AM, "rupalirhatol" notifications@github.com a
écrit :

Ok thanks for the solution. It helps but the HTML source code is we are
getting is from third party where they are not ready to modify it or
neither we are allowed to alter anything in their source html due to
security reasons. Is there any other option? Thanks again and Appreciate
your quick response.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#47 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABJ5B9Y0mqzx214SGJhRj6NRnmJTwoqtks5q86r7gaJpZM4KtDNZ
.

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

2 participants