cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Exporting to PDF

addiekitson
7 - Data Storage
7 - Data Storage

Hi All,

I was wondering if anyone could help. I want to create a report from a dashboard. I am adding in text in the form of box along with charts and tables and have a few questions on formatting.

I want to have an A4 document but every time I try and save as PDF half of the widgets are cut off. I have tried to make the tables smaller but then the text within the columns become column na... which I don't want. I instead want the size of the text and numbers to be smaller. I know I can use the html formatting with the cells to do this but is there a way to make the whole table smaller?

If my blox is too big then instead of spreading the blox over two pages the pdf preview just cuts off half of the writing. I have tried using the code:

 

 

dashboard.on('refreshstart', function (se, ev) {

	widgetid = '615ee0063312d60030f8060c'
	widget_height = 100

	$.each(ev.dashboard.layout.columns, function(columnIndex, column){
		$.each(column.cells, function(cellIndex, cell){
			$.each(cell.subcells, function(subcellIndex, subcell){
				if(subcell.elements[0].widgetid == widgetid)
				{	
					subcell.elements[0].height = widget_height + 'px'
					subcell.elements[0].minHeight = widget_height
					subcell.elements[0].maxHeight = widget_height
				}
			
			})
		})
	
	})
	
	ev.dashboard.layout.defaults.widget.minHeight = 0
	ev.dashboard.layout.defaults.widget.maxHeight = widget_height
});

 

which makes the widget size larger on the dashboard but doesn't work on the PDF export.

My next question is on page breaks. I am currently just going on the the pdf preview to see what the report looks like and from there I am resizing blank text boxes to fill the rest of the page. Is there a way to add page breaks?

My last question is on the fact that the pdf preview looks different than the actual pdf export. This includes cutting off widgets that were not cut off in the preview and images not working sometimes. I am using the image address and sometimes it works in the pdf download and sometimes it only works in the preview?

I just need some tips and tricks for PDF export! 

Thank you!!!

0 REPLIES 0