?
Solved

trouble passing int to java class constructor (itext)

Posted on 2005-02-24
10
Medium Priority
?
264 Views
Last Modified: 2013-12-24
Hi,
  I am trying to pass an int to a java class constructor.  Here's what I am trying to do...
<cfscript>
aTable = CreateObject("java", "com.lowagie.text.pdf.PdfTable").init(javaCast("int",3));
</cfscript>

Heres the error msg....
Unable to find a constructor for class com.lowagie.text.pdf.PdfTable that accepts parameters of type ( java.lang.Integer ).

Any suggestions???

Anyone else using iText and if so, how???

Thanks for any info,
El
0
Comment
Question by:joneset
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:kyle1830
ID: 13392811
read this solution.  looks like the same problem you are having

http://tech.badpen.com/index.cfm?mode=entry&entry=18

kyle
0
 
LVL 1

Author Comment

by:joneset
ID: 13393203
Kyle,
   Thanks for the link.  I'd already seen it.  
Problem is, I am dealing with a primative (int), not an array and
I really am not sure how to make that leap from the info in that link.

El
 
0
 
LVL 8

Expert Comment

by:kyle1830
ID: 13397039
Was out for a while.

I just started messing with iText two weeks ago.  I am looking for an alternative to activePDF and have not had a chance to do anything but examples.  I also used the custom tag from this post: http://www.houseoffusion.com/cf_lists/index.cfm?method=messages&threadid=19864&forumid=4#100646

where did you come up with (just trying to follow along, I have not seen this yet.)?
>>aTable = CreateObject("java", "com.lowagie.text.pdf.PdfTable").init(javaCast("int",3));

0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:joneset
ID: 13404510
Kyle,
   Don't know what happened between yesterday and today, but the cast works today.

Here's a link for an itext example (by Aaron Johnson I think, not sure tho, the link is down today)  ...

http://cephas.net/blog/2004/03/14/using_itext_pdf_coldfusion.html

El
0
 
LVL 8

Expert Comment

by:kyle1830
ID: 13404543
I have tried going there several times also and can never get it.

Do you do anything today from yesterday?  Restart? Pray?  Let me in on your secret.
0
 
LVL 1

Author Comment

by:joneset
ID: 13676003
Hi,
   Although I appreciate kyle's reply, it did not answer the question.
I've posted a message in cleanup area for closing (and delete if
required) this question.
Thanks,
El
0
 
LVL 1

Accepted Solution

by:
joneset earned 0 total points
ID: 13689965

One last comment -

The answer to my original question was that I was not using the correct iText class.  Once I used the right class (PdfPTAble), I was able to use an int in the constructor.

In the end, I 've decided to use my own java code (using the iText package) in my own jar file and
call the classes in the jar from Coldfusion and I have to admit, my PDF's are pretty basic.

Although it was a challenge, I have been successful using iText with Coldfusion.

El
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question