Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
AIR11_01 FONT Method init missing
Collapse
X
-
Guest repliedThat's great news! I'm glad I could help.
-
Success
Hi Tom,
I have uploaded the 2.1.2u version from your link and recompiled. All the examples run perfectly! Thank you again for the timely response and valuable information. Note: I ran with both JDK 1.4.2 and 1.5.0 and they both worked.
Pat Barrett
Leave a comment:
-
Thanks!
Hi Tom,
Thanks for the assist. I could not find the older version on their site. I have downloaded it and will try with that first. Then I will give the newer version a drive.
Great book, I am really enjoying reading it and doing the sample programs.
Pat
Leave a comment:
-
Guest repliedHi Pat,
Right before Advanced Integrated RPG was made available for sale and the books were already being printed on the press, there was a new release of iText that changed the package name and the website address.
The new website address is http://itextpdf.com/. If you were to Navigate through the following hyperlinks on the site: SourceForge | View All Files, you would get access to the most current, and all previous releases, of iText which you can access by clicking on this link: http://sourceforge.net/projects/itext/files/.
If you look at the JavaDocs, you can see that the Font constructor has changed since version 2.1.2u.
The current JavaDocs for the latest version can be found here: http://api.itextpdf.com/
And to support the book, I am hosting the 2.1.2u JavaDocs here: http://www.2wolvesout.com/javadocs/i..._2u/index.html
If you look at the Constructor being used in the book, using version 2.1.2u, the prototype looks like this:
Font(int family, float size, int style)
This constructor is not available in version 5.0.2. The closest one I could see is:
Font(Font.FontFamily family, float size, int style)
So, if you're going to use version 5.0.2, you could write the code for com.itextpdf.text.FontFamily using some code like thisnew Font(FontFamily.HELVETICA, 22, Font.Bold);
or to get you running, you could download an earlier version.
When I wrote the book, I was targeting the widest audience with minimal requirements to support multiple versions of the OS, without having to be at the latest and greatest. But, given the opportunity to produce a second edition, I would update the service programs to use the latest version. In a way it worked out, because developers like yourself could learn a lot by updating the service programs to use the latest version.
Let me know if you need more help getting the 5.0.2 version working.
Thanks for picking up a copy of my book!
Have Fun!
Tom
Leave a comment:
-
Made a mistake on the above. AIR11_01 issued the same error but at statement 2866 on the newItextFont : Here's the code:
Line <---------------------- Source Specifications ----------------------------><---- Comments ----> Do Page
Number ....1....+....2....+....3....+....4....+....5....+ ....6....+....7....+....8....+....9....+...10 Num Line
2860 /free
2861 CallP JavaServiceProgram();
2862 airFileName = '/Public/Air11_01.pdf';
2863 airDocument = AirPdf_newDocumentOutput(airFileName:'LETTER':*ON) ;
2864 //
2865 airColorGreen = Air_getColorFromHex(COLOR_SEA_GREEN);
2866 airFontGreen = new_ITextFont(ITEXT_FONT_HELVETICA: 22:
2867 ITEXT_FONT_BOLD);
Leave a comment:
-
AIR11_01 FONT Method init missing
Hi - I have been trying out the PDF functions with iText. I could not locate the the iTextPDF v2.1.2u as stated in your book but I did download the latest V5.0.2. I was able to get the 1st 2 example programs AIR10_01 & AIR10_02 to work. I had to change the URLs in the JAVA procedures to change the name from LOWAGIE to ITEXTPDF. I also had to change to JDK 1.5.0. I am getting the following error on AIR11_01 on the FONT function. I am at a lost as to how to find this :
Message ID . . . . . . : RNX0301 Severity . . . . . . . : 50
Message type . . . . . : Escape
Date sent . . . . . . : 06/07/10 Time sent . . . . . . : 12:15:22
Message . . . . : Java exception received when calling Java method.
Cause . . . . . : RPG procedure AIR11_02 in program AIRLIB/AIR11_02 received
Java exception "java.lang.NoSuchMethodError:" when calling method
"" with signature "(IFI)V" in class "com.itextpdf.text.Font".
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
Technical description . . . . . . . . : If the exception indicates that the
Java class was not found, ensure the class for the method is in the class
path. If the exception indicates that the Java method was not found, check
the method name and signature. If the signature is not correct, change the
RPG prototype for the method, or change the Java method, so that the return
type and parameter types match. You can determine the signatures for all the
More...
How can I check for the methods within a class? Any ideas on this error?
Many thanks,
Pat Barrett
Leave a comment: