× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I tried the 'setTotalWidth' method and received the same error.

Here's how I defined the method:

dcl-pr PTable_setTotalWidth
extproc(*JAVA
:'com.lowagie.text.pdf.PdfPTable'
:'setTotalWidth');
prWidth int(10) value;
end-pr;


Here's how I called the method:

newTable = new_pdfptable(2);
PTable_setTotalWidth(newTable: 500);

Here's the error message:

Java exception "java.lang.NoSuchMethodError: com/lowagie/text/pdf/PdfPTable.setTotalWidth(I)V"

[cid:5f262e02-fbda-43be-a898-804b423aa674]

________________________________
From: JAVA400-L <java400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of smith5646midrange@xxxxxxxxx <smith5646midrange@xxxxxxxxx>
Sent: Saturday, April 8, 2023 1:22 PM
To: 'Java Programming on and around the IBM i' <java400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Changing PdfPTable width from RPGLE using iText

I used iText for a short time WAYYYYY back when and I am by no means an
iText person but it looks like you can also set an absolute size for the
table. I don't know if that would work any better.

-----Original Message-----
From: JAVA400-L <java400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon
Paris
Sent: Saturday, April 8, 2023 12:39 PM
To: Java Programming on and around the IBM i <java400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Changing PdfPTable width from RPGLE using iText

Can't really offer much help as it appears that that version of iText is so
old that it is no longer available for download.

What you have done looks correct but ...


Jon P.

On Apr 8, 2023, at 12:11 PM, Rich Dotson <Rich.Dotson@xxxxxxxxxxx> wrote:

Sorry about that Yes. My call was exactly as you described.

pTable_setWidthPercentage( newTable : 90 );


Get Outlook for Android<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2FAAb9ysg&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CJl4zNjWNRh3b4gaHXqTy25XIordmtGnkQcT7%2BFwWwI%3D&reserved=0<https://aka.ms/AAb9ysg>>

________________________________
From: JAVA400-L <java400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of
Jon Paris <jon.paris@xxxxxxxxxxxxxx>
Sent: Saturday, April 8, 2023, 12:02 PM
To: Java Programming on and around the IBM i
<java400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Changing PdfPTable width from RPGLE using iText

You haven't shown how you do the call - did you include the object as the
first parameter?

I would expect it to be:

pTable_setWidthPercentage( newTable : 90 );


Jon P.

On Apr 7, 2023, at 2:39 PM, Rich Dotson <Rich.Dotson@xxxxxxxxxxx> wrote:

We use the techniques from the Advanced Integrated RPG book by Thomas
Snyder to create PDFs with RPG.

I am trying to modify the width of a table inside a .pdf using using
RPGLE. I would like to use the 'setWidthPercentage' method to adjust the
table size but I can not get it to work in my RPGLE program. It defaults
the table width to 80% of the page and I need to increase it sightly.

I have found the Java code to set the width of the table.

table.setWidthPercentage(90);


The problem I am having is translating that code to RPG.

I am able to create a two column table using:

newTable = new_pdfptable(2);


I tried defining the 'setWidthPercentage' using:

dcl-pr pTable_setWidthPercentage ExtProc(*JAVA
:'com.lowagie.text.pdf.PdfPTable'
:'setWidthPercentage');
prWidthPct int(10) value;
end-pr;


When I try to use it I get the 'java.lang.NoSuchMethodError' message.
The documentation I've found online states that the 'setWidthPercentage'
method is in that .jar file version we have loaded.

Any suggestions on how I can change the size of the table?

Thanks, -Rich


--
This is the Java Programming on and around the IBM i (JAVA400-L)
mailing list To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist%2F&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zOfLgQMTR0GIk6Me7Zn9s8%2BOeqFO1i4PyvQY2uSYits%3D&reserved=0<https://list/>
s.midrange.com%2Fmailman%2Flistinfo%2Fjava400-l&data=05%7C01%7C%7C8b4
b86d176f74fe57a2108db384aa8c8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%
7C0%7C638165665538535945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAi
LCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=
O2Rp8zNymj4Kx1yOicoWJkQL7UwTMzdDaNOoEhveOKA%3D&reserved=0<https://lis
ts.midrange.com/mailman/listinfo/java400-l>
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.mid%2F&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Qp5WxwOjhZk%2F6TDztMI1U3%2Bzb8vV9Oc5Ul3Yyi8pV8Q%3D&reserved=0<https://archive.mid/>
range.com%2Fjava400-l&data=05%7C01%7C%7C8b4b86d176f74fe57a2108db384aa8c8%7C8
4df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165665538535945%7CUnknown%7CTWF
pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
7C3000%7C%7C%7C&sdata=2APcjMJSpDqCfjUxgGLrN%2B5rp7YaUjVRrZWueVHyVDg%3D&reser
ved=0<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cvNNhd%2B99itDq5FlNRI%2BvCOuf%2B9HRAxCM01TvR10QuI%3D&reserved=0<https://archive.midrange.com/java400-l>>.

--
This is the Java Programming on and around the IBM i (JAVA400-L)
mailing list To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists%2F&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gPb4wnUNcQv7xWSIJesGEXiP8iPu8BzJPfg4vO%2FuCTQ%3D&reserved=0<https://lists/>
.midrange.com%2Fmailman%2Flistinfo%2Fjava400-l&data=05%7C01%7C%7C8b4b8
6d176f74fe57a2108db384aa8c8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0
%7C638165665538535945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ
IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=O2Rp8
zNymj4Kx1yOicoWJkQL7UwTMzdDaNOoEhveOKA%3D&reserved=0<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.mid%2F&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7eU6KkD5pxwg967k7C40W8VrFy0F7twFFVmiyq21kWA%3D&reserved=0
range.com/mailman/listinfo/java400-l>
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.mid%2F&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Qp5WxwOjhZk%2F6TDztMI1U3%2Bzb8vV9Oc5Ul3Yyi8pV8Q%3D&reserved=0<https://archive.mid/>
range.com%2Fjava400-l&data=05%7C01%7C%7C8b4b86d176f74fe57a2108db384aa8c8%7C8
4df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165665538535945%7CUnknown%7CTWF
pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%
7C3000%7C%7C%7C&sdata=2APcjMJSpDqCfjUxgGLrN%2B5rp7YaUjVRrZWueVHyVDg%3D&reser
ved=0<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cvNNhd%2B99itDq5FlNRI%2BvCOuf%2B9HRAxCM01TvR10QuI%3D&reserved=0<https://archive.midrange.com/java400-l>>.

--
This is the Java Programming on and around the IBM i (JAVA400-L)
mailing list To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Cj9ubaShu2%2FTXUrqE9eTy6Pi0jKTLbhnaT7NhL0%2Bvvg%3D&reserved=0<https://lists.midrange.com/mailman/listinfo/java400-l>
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cvNNhd%2B99itDq5FlNRI%2BvCOuf%2B9HRAxCM01TvR10QuI%3D&reserved=0<https://archive.midrange.com/java400-l>.

--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Cj9ubaShu2%2FTXUrqE9eTy6Pi0jKTLbhnaT7NhL0%2Bvvg%3D&reserved=0<https://lists.midrange.com/mailman/listinfo/java400-l>
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cvNNhd%2B99itDq5FlNRI%2BvCOuf%2B9HRAxCM01TvR10QuI%3D&reserved=0<https://archive.midrange.com/java400-l>.

--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Cj9ubaShu2%2FTXUrqE9eTy6Pi0jKTLbhnaT7NhL0%2Bvvg%3D&reserved=0<https://lists.midrange.com/mailman/listinfo/java400-l>
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fjava400-l&data=05%7C01%7C%7C96cdf5145ce94627e40808db3855e1e9%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638165713728719127%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cvNNhd%2B99itDq5FlNRI%2BvCOuf%2B9HRAxCM01TvR10QuI%3D&reserved=0<https://archive.midrange.com/java400-l>.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.