Use a different layout. The invoices starter solutions that came with FileMaker 11, 12 or 13 all use the method I am about to describe to print invoices so you can examine them to find a working example of this method.
Create a list view layout based on your portal's table instead of the invoice table. Put the fields that you need from the invoices table in the header and/or footer of this layout. Make the body a narrow row just tall enough to contain the fields from the portal's table that you want on your invoice. Starting from the invoice table and from the invoice record that you want to print, perform a script that either uses a scripted find or Go To Related Records to pull up the correct set of records from your portal on this new layout. If you then print or save as PDF from this layout, your invoice can print out with as many pages as needed to list all the items on the invoice.