Skip to main content

Hi all, I feel like I'm asking a well-trod question, but I'm having trouble with blank PDFs being output and am going a bit mad with the PDFStyler, PDFPageFormatter and TableAdder.

 

Basically, I need to create multiple PDFs, grouped by username, from input Excel files. So far, with very little luck, other than the fanout naming (of these usernames). With the TableAdder I end up getting everything squashed into blocks of unreadable text, despite trying different values.

 

I wasn't sure if I was missing anything obvious, or if there was an easier way to start this process.

 

Thanks

Hi @joe.fme​ 

Unfortunately, writing text/tables to PDF can be a bit fiddly. I'll see if I can get an example for you next week.

An alternative to explore if you have Excel installed and licensed is to take advantage of Excel's native functionality of creating PDFs via Powershell. Here is an example Powershell script which converts each Excel workbook to a PDF.

Perform a dataset fanout so the data is in the required structure in Excel. Based on your example, each username is one Excel file. Then customize the script based on user parameters and use SystemCaller to run the script. I've attached an example of this workflow and I hope it helps.


Hi @joe.fme​ 

Unfortunately, writing text/tables to PDF can be a bit fiddly. I'll see if I can get an example for you next week.

An alternative to explore if you have Excel installed and licensed is to take advantage of Excel's native functionality of creating PDFs via Powershell. Here is an example Powershell script which converts each Excel workbook to a PDF.

Perform a dataset fanout so the data is in the required structure in Excel. Based on your example, each username is one Excel file. Then customize the script based on user parameters and use SystemCaller to run the script. I've attached an example of this workflow and I hope it helps.

Hi Debbi, thank you for that - I wanted to make sure I wasn't going crazy and Powershell is usually my next go-to after FME in the rare case I can't get something to quite work. Rare, though!

Would the same apply to XML files to PDF? Or are they a bit of an easier task? Almost need some real beginner lessons on outputting PDFs that aren't from the htmlgenerator and the like


Reply