× 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.



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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.