fetching data from cosole 1 Answer(s) 3 years ago
Posted in : Development process
Hi Deepak, i hv parsed the pdf file into the console (using Pdfbox). output is proper.now i want that console data into the database? how can i parse that console data and save it into the database? please your help is appreciated.
public class ReadPDF { public static void main(String[] args) throws IOException { try { Document document = new Document(); document.open(); PdfReader reader = new PdfReader("file.pdf"); PdfDictionary dictionary = reader.getPageN(1); PRIndirectReference reference = (PRIndirectReference) dictionary .get(PdfName.CONTENTS); PRStream stream = (PRStream) PdfReader.getPdfObject(reference); byte[] bytes = PdfReader.getStreamBytes(stream); PRTokeniser tokenizer = new PRTokeniser(bytes); StringBuffer buffer = new StringBuffer(); while (tokenizer.nextToken()) { if (tokenizer.getTokenType() == PRTokeniser.TK_STRING) { buffer.append(tokenizer.getStringValue());
}
} String test = buffer.toString(); System.out.println(test); String arr[]=test.split(" "); Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root"); Statement st=con.createStatement(); int i=st.executeUpdate("insert into data(name,address) values('"+arr[0]+"','"+arr[1]+"')"); } catch (Exception e) { } } }
Thanks
Related Pages:
fetching data from cosole - Development process fetchingdatafrom cosole Hi Deepak,
i hv parsed... that console data into the database?
how can i parse that console data and save... into data(name,address) values('"+arr[0]+"','"+arr[1]+"')");
} catch (Exception e
Java Cosole not Displaying Greek letters - WebSevices
Java Cosole not Displaying Greek letters Hello Team,
I developed a webservice which reads datafrom xml string and stores in the data base, i got a new requirement to read Greek and Arabic characters from the xml and store
fetching data using servlets - SQL
for fetchingdatafrom a ORACLE10g database using SERVLETS. Hi Friend...fetchingdata using servlets I have successfully made connection.... But the codes that i have tried for fetching the data are not working even
Data fetching from JSP or HTML - JSP-Servlet Datafetchingfrom JSP or HTML Hi Deepak,
Can u pls help me as i have a problem with jsp/html frameset.
my question is how can i fetch the datafrom frameset which is in html format.pls help me.
Thanks
Fetching the exact data from file using java Fetching the exact datafrom file using java **hi ...
i am having one .lst file.. that file consists of instructions and opcodes.. now i want to fetch only the opcode from that file.. could u pls anyone guide me this using java
how to create a bar chart in jsp by fetching value from oracle databse?
how to create a bar chart in jsp by fetching value from oracle databse? i want to show the population of various states in a bar chart in my jsp page by fetching the datafrom my oracle table. i am using my eclipse as my IDE
Fetching image from database Fetching image from database I have uploaded image path and image name in database so, now how can i display that image using JSP or HTML page(is it possible to display using tag using concatination).
image path i have stored
autocompletion in textfield fetching from database in jsp
autocompletion in textfield fetchingfrom database in jsp hi
i want to retrieve country name from mysql db to textfield..
maeans if anyone type first letter of the name it should show the corresponding names in the list
Fetching database field from servlet to jsp page ? Fetching database field from servlet to jsp page ? Hello Java... field.
I wanted to pass some of the database field from servlet to jsp...
(i... ArrayList<String>();
String sql = "select * from country
JSP Get Data Into Dropdown list From Database
JSP Get Data Into Dropdown list From Database
In this section we will discuss....
This tutorial explains you that how to fetch datafrom database and set... fetching of data into the dropdown list in JSP using Eclipse IDE and
the Tomcat 7
how to refresh google map using ajax by fetching lat long from database
how to refresh google map using ajax by fetching lat long from database ... the route travelled by it will be displayed on the google map by fetching the lat long from db. Now, i need to refresh the map using ajax.Pls help me how to do
to bring checked data from one page to another fetchingdatafrom the database on second jsp page with checkbox corresponding each...to bring checked datafrom one page to another thanks for your help... on save button then the two rows data should print on first jsp page without making
Data fetch from multiple SQL tables - Hibernate
example of HQL fetchingdatafrom multiple tables would be a help.
I have tried...Data fetch from multiple SQL tables
I am in the process of writing my first hibernate application. I have a sql query that fetches datafrom
Saving data in database
Saving data in database hello
i m facing a strange problem if i am submitting data form database then i can see it in database
but if am submitting from app then it is not showing in to database but when i fetching form
Database fetching problem
Database fetching problem I have multiple database table and want to get all records in one object how can i do this.Pls guide
How To Fetch Data From Database Into JTextArea
have defined for fetching the datafrom database and set
the database table value...How To Fetch DataFrom Database Into JTextArea
In this section we will read about how to get the datafrom database table
into JTextArea
Select data from diplicated data
Select datafrom diplicated data hello i have table
location... location FROM (".$is.") WHERE sub_cat=('".$id."')";
$result = mysql_query($SQL...++)
{
$SQL = "SELECT duration FROM core_network WHERE location=('".$location_c[$k
extract data from HTML
extract datafrom HTML how to write the coding for to extract datafrom html tags like(h3,p) and then extracted data should be stored in data base?
can anybody tell me how to write the coding
Data from multiple ResultSets? Datafrom multiple ResultSets? hello,
How can I get datafrom multiple ResultSets?
Hi,
You can iterate the ResultSet separately and get the required data.
Thanks
selecting data from database
selecting datafrom database how to select datafrom database using Dao in struts
Hi,
You have to load the datafrom database using hibernate and send the data in a Java file object to jsp page.
Please read at http
retrive data from database
retrive datafrom database hi..
i made a application form. it's have attribute s.no,name,roll no and i enter a few records. now i want to view all record not in database access sheet i want to view it at any another
Insert Data From File
Insert DataFrom File
Insert DataFrom File is used to insert datafrom file... to insert datafrom file. To understand
this example, we create a table 'Stu_Table
retrive data from database?
retrive datafrom database? hellow
i have a database sheet name as db1. it's contain sixty(60) sn,name ,rollno(primary key),father's name etc... from db1 and enter value in text box according there name,rollno and save
Security Measure of Website
development and it is the duty of the developers to maintain the security of datafrom coding to running the site without any chances of hacking, fetching... the data safe including transmission from one site to another site; Secure Socket
Insert Data From File
Insert DataFrom File
Insert DataFrom File is used to insert datafrom file.
Understand with Example
The Tutorial illustrate an example to insert datafrom
read data from Excel sheet
read datafrom Excel sheet Hi,
How to read datafrom an excel sheet using JSP.
Thank you
Getting data from servlet into javascript
Getting datafrom servlet into javascript How do i get json datafrom my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
Data extraction from an image file. Data extraction from an image file. I have made an image... datafrom the the image which also include deleted data.Can i used java to extract these datafrom the image file? Which are the libraries to be used
Retrieve The Data From MySql Datbase
Retrieve The DataFrom MySql Datbase How to Retrieve The DataFrom MYSQL database TO Use Select the Emp_id Option.And Also Search Option
delete data from database - SQL
delete datafrom database HOw to delete specific datafrom table>
I want to delete one record from database.
Thnx Hi friend,
--------------------------------------------
Visit for more information
Problem in accessing data from Database
Problem in accessing datafrom Database hi.....
i'm making a project... is text and all others are of currency data type. If i enter 0 or null value in currency column and then try to retrieve data using my servlet coding
Purge Data from Mysql tables
Purge Datafrom Mysql tables Hi,
i have to write a mysql procedure to purge datafrom tables.
but written procedure clear entire tables data.
Please give me the solution for purging data.
CREATE DEFINER=`root`@`localhost
To retrive data from database - Struts
To retrive datafrom database How to get values ,when i select a select box in jsp and has to get values in textbox automatically from database?
eg... come to jsp page automatically from database
FAILED TO INSERT DATA FROM FUNCTION();
FAILED TO INSERT DATAFROM FUNCTION(); HELLO, I HAVE A PROBLEM TO INSERT DATAFROM OUTPUT FROM FUNCTION()...
I WANT TO STORE THE OUTPUT IN DATABASE... totalMac_ac1(){
$query1 = "SELECT AVG(MAC) FROM academia1";
$result1
store data from a variable in mysql?
store datafrom a variable in mysql? sir
last time asked you tell me how to retrieve datafrom a database mysql and store it in an int variable... of the calculation from an int variable into mysql in a new table of database. how
retrieve data from database with hyperlink
retrieve datafrom database with hyperlink sir....i have one table called 'name' having two values i have to retrieve those data with a hyperlink and show in browser and if we click hyperlink its shows his sub categories....how
retrieve data from mysql database
retrieve datafrom mysql database hi am not familiar in php.....even... selected value on combobox which is to be retrieve the relevant datafrom mysql... * from testtable
where Fname like '%$term%'");
while ($row = mysql<em>
Retrieving specific data from excel
Retrieving specific datafrom excel Hello everyone, i have written a simple code to retrieve datafrom excel sheet and working fine, the excel file... first sheet from the workbook
HSSFSheet sheet = workbook.getSheetAt(0
GWT -- retrive the data from Database
GWT -- retrive the datafrom Database the user can create an event. In the create page, we have three buttons. Save as draft, preview and save... button, you have to create a dynamic jsp which should read the contents from
retrive data from oracle to jsp
retrive datafrom oracle to jsp i am a beginer in jsp so please help... cost and manager name and storing it in the data base.
in search proj fiel...();
psmt= conn.prepareStatement("select * from CR_EMPLOYEE_DETAILS