tabcmd icon indicating copy to clipboard operation
tabcmd copied to clipboard

Export to PNG fails if there are spaces in the parameter value - the same works OK when exporting to PDF

Open smesecurity999329324442 opened this issue 2 years ago • 1 comments

I have a workbook with a single dashboard that uses parameters to select the data in a handful of tables. I am using tabcmd to export the dashboard to PNG and it is failing in cases where the value passed to the parameter has spaces. I am of course encoding the values. I am using Online as the server. The annoying thing is that the same command (key value pairs) works correctly for PDF exports.

This command produces the correct output

tabcmd export 'df/Focus?p_brand=Advil&p_category=Health%2FMedicines&p_country=US&p_department=HBB&p_industry=Food%20and%20Grocery%20Brands' --fullpdf --pagelayout landscape -f '/Users/stg/Temp/a.pdf' --no-certcheck

This command fails (same parameter values as PDF export) when there is a space or slash in the parameter value (p_industry and p_category) - the command completes but those tables are empty in the PNG output - the other tables present correctly. When I use values without spaces, the data is correctly displayed.

tabcmd export 'df/Focus?p_brand=Advil&p_category=Health%2FMedicines&p_country=US&p_department=HBB&p_industry=Food%20and%20Grocery%20Brands' --png -f '/Users/stg/Temp/a.png' --no-certcheck

a a.pdf

I have attached the two outputs created by these two tabcmd commands and the source data used.

r_focus.csv

smesecurity999329324442 avatar Apr 14 '23 04:04 smesecurity999329324442

Filtering the data is not yet implemented when exporting a complete workbook to pdf, so the pdf you created is probably just not filtered. (#233 )

Some questions to check a) What does the pdf look like if you don't pass any filters? OR if you only export one view instead of the whole worksheet? b) what version of tabcmd were you running? run tabcmd -v to check if you're not sure. c) what does the png look like if you don't pass any filters?

jacalata avatar Jun 03 '23 23:06 jacalata

All these issues have been fixed over the last few releases, as of 2.14.

jacalata avatar Jun 14 '24 01:06 jacalata