aspose file tools*
The moose likes Other Open Source Projects and the fly likes cretaing a PDF from the form details updated in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "cretaing a PDF from the form details updated in database" Watch "cretaing a PDF from the form details updated in database" New topic
Author

cretaing a PDF from the form details updated in database

rbala krishnan
Greenhorn

Joined: May 27, 2013
Posts: 5
hi all,
i am creating a application in struts 2 for E passport.i am facing a problem about how to generate a PDF file from the details submitted by the user for his passport. i know that i have to create a XML to take it into PDF.but i am not able to do it.i would be very thankful if you give me source code using one parameter or any basic code that you have as soon as possible.

thanks and regards
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
How are you trying to generate the PDF? Are you using some library? Are you generating it from scratch, or is there some kind of template? Also, I don't understand what XML has to do with PDF generation.


Ping & DNS - my free Android networking tools app
rbala krishnan
Greenhorn

Joined: May 27, 2013
Posts: 5
"How are you trying to generate the PDF? Are you using some library? Are you generating it from scratch, or is there some kind of template? Also, I don't understand what XML has to do with PDF generation"



actualy i came to know from this forum only that i have to use XML to generate PDF..
actualy i have to give a view to the user about the details that he had entered and then i have to enable the print option in that JSP page to enable the user to take a print out of that ,so i am converting it to a PDF so that he can take the print out.Please help me out with this problem
bala nannaka
Ranch Hand

Joined: Apr 02, 2007
Posts: 49
You cannot directly generate the PDF file from form details that user has entered.

one way would be to use IText and generate pdf and write the data into it from your form object or any other data container
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
rbala krishnan wrote:actualy i came to know from this forum only that i have to use XML to generate PDF.

I think you must have misunderstood something. XML may be involved in creating a PDF; but it does not have to be.

i have to enable the print option in that JSP page to enable the user to take a print out of that ,so i am converting it to a PDF so that he can take the print out.

What does creating a PDF have to do with printing something? Why couldn't the user just print the web page?
rbala krishnan
Greenhorn

Joined: May 27, 2013
Posts: 5

i have to enable the print option in that JSP page to enable the user to take a print out of that ,so i am converting it to a PDF so that he can take the print out.

What does creating a PDF have to do with printing something? Why couldn't the user just print the web page?



actualy the user needs to print his details and not the webpage being displayed.Just like after giving our details in a passport site we are able to print our details
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
OK, so the web site doesn't show what the user needs printed. My first thought is: why not show on the web site what the user *does* need printed?

But I still don't understand what PDF or no PDF has to do with anything getting printed or not.
rbala krishnan
Greenhorn

Joined: May 27, 2013
Posts: 5
Ulf Dittmer wrote:OK, so the web site doesn't show what the user needs printed. My first thought is: why not show on the web site what the user *does* need printed?

But I still don't understand what PDF or no PDF has to do with anything getting printed or not.



ok fyn...PDF is not required ...just guide me hw do i print the details of the user who entered the details in the form....i need it very urgently......i will explain the problem once again....
my user will enter his details in a form and that will get submitted to the database and when user will click on view or print details then he has to get an option to directly print his details from the view detail page..leave aside PDF and all...i jus need a solution to this problem..please help
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
If this was my problem I would add a "Print" link that opens a page that shows exactly what you want to print. Then the user can use the browser's print functionality.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: cretaing a PDF from the form details updated in database