I am trying to drop in the ability to generate a PDF file into an existing
program that generarates HTML.  I used the code in the attachment in this
attempt.  The portion that returns the string works (it is what generated
the existing report).  When I run this I get this error (only part of the
stackTrace is reproduced):

com.lowagie.text.DocumentException: The document is open; you can only add
Elements with content.
        at
weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:980)
        at
weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
        at
weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:346)
        at com.lowagie.text.html.HtmlParser.go(HtmlParser.java:84)
        at com.lowagie.text.html.HtmlParser.parse(HtmlParser.java:175)
        at
com.pdicorp.domain.score.control.ReportPHDAgent.getPDF(ReportPHDAgent.java:1
76)
        at
com.pdicorp.domain.view.score.PHDReportServlet.doPost(PHDReportServlet.java:
134)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
        .
        .
        .


I see no empty elements in the generated html string (attached).

I figure that the problem is one of the following:
        I have run afoul of some peculiarity in the low level parser
        I have run afoul of some tag not yet supported (per the comment in
the 'Parsing (X)HTML' section of Chapter 7 in the tutorial
        I am clueless and have performed some significant programming gaffe
Any direction would be appreciated.
Ken Beukelman

 <<code frag.java>>          <<kdb.html>> 



Attachment: code frag.java
Description: Binary data

Title: Personal History Data

Personal History Data

Name: Kenneth BeukelmanProject #: NB001-HAS-1001-123
Company: Name not availableEngagement Date: 25-Nov-1997


Identification
4. Mailing Address
mailing address
5. Postal Code
55337
6. Home Phone (international format)
952.435.xxxx
7. Work Phone (international format)
612.904.xxxx
8. Your preferred e-mail
prefferred
9. Boss e-mail
boss
10. Father's last name (first five characters)
beuke
11. City of birth (first five characters)
tyler
14. Are you working as a expatriate right now?
No
Education - Amount & High School/Secondary School Information
15. Indicate your highest level of education:
Undergraduate degree (B.A., B.S., B.Sc., Maitrise)
16. High/Secondary school name & Location
high school
17. Attended High/Secondary school FROM date
beginning
18. Attended High/Secondary school TO date
end
19. Did you graduate from high/secondary school?
Yes
20. Grade Average (4 pt. scale)
average
Education - College 1
21. College 1 name & Location
college 1
22. Attended College 1 FROM date
11/22/33
23. Attended College 1 TO date
22/33/44
24. Did you graduate from college 1?
Yes
25. College 1 Grade Average (4 pt. scale)
avg
26. College 1 Degree
bs
27. College 1 Major & Minor
eng
Education - College 2 (if applicable)
Education - College 3 (if applicable)
Education - College 4 (if applicable)
Education - General information
49. In what subjects did you do best?
stuff I liked
50. In what subjects did you do least well?
stuff I disliked
51. What work did you do during your school years and when (indicate whether part- or full-time)?
worked at home
52. What portion of your education costs did you earn yourself?
most
Professional Development
54. Describe any professional, civic, or vocational leadership roles or invo lvement of yours that have contributed to your professional growth:
prof dev
Employment
59. Why did you go into your current line of work?
"It seemed to be the logical thing to do at the time." - Sarak
62. What is the approximate number of people in the company that employs you, including all divisions?
350
67. Which one of the following best represents your current management role?
Supervisor of hourly or clerical people
Work History - Five years ago to the present
69. Organization 1
org 1
75. Organization 2
org 2
81. Organization 3
Org 3
87. Organization 4
Org 4
114. During this time period, what did you like best about your work?
good things
115. During this time period, what did you like least about your work?
Bad things
Work History - Five to ten years ago
158. During this time period, what do you consider to be your greatest accomplishment?
Too long ago to remember
Work History - Ten or more years ago (to the start of your career)
163. Organization 1
Memory going
178. Responsibilities in Organization 3
dfasadfgasdfasdf
193. Organization 6
asdfasdfasdfasdfasdfewrqwerqwer
Work Environment
210. If you could combine any job elements into an ideal job, what would it be? (Describe)
High pay, low responsibility
211. Think of aspects of work environment that make it difficult for you to do your job. (Describe)
Users
212. You have 100 preference points to distribute on the factors listed below. Distribute the points in a way that accurately orders their priority or importance to you. You may give zero points t o those job factors for which you have little or no desire. Stimulating, challenging work content
1
213. Achievement and a sense of accomplishment
2
214. Variety
3
215. Compensation (salary plus incentives, bonus, etc.)
4
216. Independence to set own direction
5
217. Creativity
6
218. Responsibility for resources and decisions
7
219. Fair and consistent supervisors
8
220. Structure and practices that ensure stability
9
221. Friendly relations with coworkers, vendors and/or clients
10
222. Service to the community, people, or a cause
11
223. Advancement (promotions)
12
224. Being perceived as an expert or authority
13
225. Visibility and recognition
14
226. Power and influence
15
Career Aspirations
227. How interested currently are you in making a career move and why?
Not. No jobs
Self-Evaluation
239. Over the years, what strengths have peers, supervisors, and if applicable, subordinates consistently observed in you?
Not many
240. What would they identify as your areas of greatest relative weakness or development need?
Everything else
Comments
248. If you feel we should have any additional information in order to better understand you and your career, please add it here.
This is a comment

Reply via email to