[Coldbox 3.8.1] ACF 11 cfdocumentsection adds blank page in cfloop

When using cfdocumentsection within a cfloop, ACF 11 adds an extra blank page after page 1. When it’s outside of the cfloop, or the loop count is only 1, it functions normally.

Anybody else experience this, and is there a solution? Sounds like a bug in ACF.

Ruunning ACF 11 Update 5 on Windows Server 2012. Code is below:

`

#generateMROReport.MROFormContent# #generateStateReport.StateFormContent#

`

Any help is appreciated.
Thank you.
-Christopher Keeler

My workaround to correct this is the following code:

`

`

It basically reads the PDF, and grabs the total page count. Loops through each page and does an extracttext action, which comes back as an encoded XML document. An XML search is performed and if a “Page” node exists, the page has text, otherwise it’s just an image or blank and gets added to the delete array. Finally, the deletepages action is called and populated with the page numbers to delete. It adds some overhead, but it works every time.

-CK