raunakbinani / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Form elements do not display #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Include form inputs on an html page.
2. Render a pdf from that page
3. form elements do not display

What is the expected output? What do you see instead?
I would expect to see the form elements on the PDF

What version of the product are you using? On what operating system?
0.5.1

Original issue reported on code.google.com by dezu...@gmail.com on 12 Oct 2009 at 1:37

GoogleCodeExporter commented 9 years ago
Form elements are not current supported (though I don't believe this is noted 
in the
official documentation).

Original comment by eclecticgeek on 16 Oct 2009 at 5:48

GoogleCodeExporter commented 9 years ago
It'd be nice to see form elements render.  this is useful for a situation where 
you 
have an HTML form you want them to be able to print and fill it out as a paper 
form.  
Or when you have a page you want to send to PDF and you want the PDF to look 
just 
like the screen (or as close as possible) which may include form elements.

I think in the short term, it would be good to make a documentation update so 
people 
seeking this feature can easily confirm that it isn't implemented.

In the long term, let's get it to work.  Anyone have any input on what this 
would 
take to make this update?

Damien

Original comment by dezu...@gmail.com on 16 Oct 2009 at 6:06

GoogleCodeExporter commented 9 years ago
I made a quick fix to this issue by tweaking the html.css base stylesheet with 
form 
elements. I also had to append the value attributes of the text inputs and 
buttons 
so that it renders as text.
For the radio buttons and the checkboxes, I made little background images for 
the On 
and Off states, no disabled/readonly state yet. The select tags are not 
supported.
I join a patch and the image files.
I'm conscious that this is not a viable option in the long term and that DOMPDF 
will 
have to support true PDF forms, but this will require a lot more work.

Original comment by fabien.menager on 7 Mar 2010 at 10:54

Attachments:

GoogleCodeExporter commented 9 years ago
Let's address this in the next release (0.7)

Original comment by ryan.mas...@gmail.com on 11 Mar 2010 at 11:12

GoogleCodeExporter commented 9 years ago
Thanks for that fix, it made my day :)
However, I've had to modify the html.css, as it checked all checkboxes and 
radio buttons on my page.
I replaced input[type=checkbox][checked] with input:checked[type=checkbox], 
same for the radios.

Original comment by jez...@gmail.com on 6 Apr 2011 at 1:27

GoogleCodeExporter commented 9 years ago
I'm sure this is a very silly question but how do I apply the patch?  I've 
never used Dompdf before today and I'm stumped : /  Thanks!

Original comment by maryann....@gmail.com on 14 Jun 2011 at 4:53

GoogleCodeExporter commented 9 years ago
Not a silly question at all. If you're not already familiar with how to patch 
code then you might want to wait. The patch supplied is a subversion diff and 
you can read up about it here: 
http://ariejan.net/2007/07/03/how-to-create-and-apply-a-patch-with-subversion/

That being said, a lot of changes have been made since this patch was 
introduced. You may want to wait for us to incorporate it back into the code.

Original comment by eclecticgeek on 14 Jun 2011 at 9:18

GoogleCodeExporter commented 9 years ago
+1 Me too!

Also would like to have input text box be rendered.
As a workaround, can at least treat it as dummy text, right now no text of the 
input box will be displayed in the PDF file 

Original comment by mr.r...@gmail.com on 23 Feb 2012 at 7:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
You can display input values by adding this to your CSS if you use at least 0.6 
beta 2:

input {
  display: inline;
  white-space: nowrap;
  border: 1px solid #999;
}

input:before {
  content: attr(value);
}

Original comment by fabien.menager on 23 Feb 2012 at 9:44

GoogleCodeExporter commented 9 years ago
Just in case anyone is interested, you can style a select list to show only the 
selected option:

select option{
        display:none;
}
select option:first-child{
    display:inline;
}

Original comment by ash.need...@gmail.com on 14 Jun 2012 at 9:44

GoogleCodeExporter commented 9 years ago
Hi I have never used dompdf,  but according to this thread am I correct in 
assuming you can generate a PDF from a HTML form that would include user enter 
values into the form fields??

Original comment by dsawick...@gmail.com on 17 Aug 2012 at 10:25

GoogleCodeExporter commented 9 years ago
@dsawicki78 dompdf will generate a PDF based on a HTML document. What you want 
to do is use the form submitted by the user to generate a HTML document, which 
you then feed to dompdf. If you need additional help on this please visit the 
support forum: https://groups.google.com/forum/#!forum/dompdf

Original comment by eclecticgeek on 20 Aug 2012 at 3:40

GoogleCodeExporter commented 9 years ago
Thanks very much for the answer.  This makes my workflow clear.

Sent from Dustin's iPhone 4s

On Aug 20, 2012, at 10:40 AM, "dompdf@googlecode.com"
<dompdf@googlecode.com> wrote:

Original comment by dsawick...@gmail.com on 20 Aug 2012 at 8:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Confirmed that input checkboxes are not being rendered in 0.6.3 beta.  I'd also 
like to see this feature added.  Don't even need any form processing capability 
- just having the elements render (specifically, checkbox, radio, text and 
textarea) would be a big plus.  

Original comment by deathroc...@yahoo.com on 22 Aug 2012 at 1:43

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r500.

Form elements are now displayed, with CSS generated content, a bug in the CSS 
parser prevented to do this before, but I solved it. Everything is still not 
perfect, but it is a good start. It will be in the next release or if you are 
impatient, it's in the SVN trunk.

Original comment by fabien.menager on 24 Aug 2012 at 12:03

GoogleCodeExporter commented 9 years ago
Input fields still don't work in the current version (Beta3)! :(
When will form elements be available?

Original comment by facher...@gmail.com on 9 Nov 2012 at 11:00

GoogleCodeExporter commented 9 years ago
Hello, these changes are only present in the SVN trunk.

Original comment by fabien.menager on 9 Nov 2012 at 11:49

GoogleCodeExporter commented 9 years ago
thanks, fabien!
so... will it be available in the upcoming final version?

where do i get the svn package meanwhile?
i urgently require input fields to type in for a project... 

Original comment by facher...@gmail.com on 16 Nov 2012 at 7:38

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00