How to acess transformer in pdf content

Continuing the discussion from Use PDF Exporter to print content of table:

Hi @Kabirdas How to access transformer data into pdf content
Have a look what is the problem here ?

Hello @Bilal_Anjum,

First you have to create a transformer

You can find more information about transformers:

Transform data with JavaScript | Retool Docs

I have attached the screenshoot. The code I have written is a transformer of PDF QUERY. Kindly follow the link

& then read my question again.

Hello @Bilal_Anjum again,

I think we are talking about the same thing but in different way.
@Kabirdas says you can use standalone transformers that i also show you how to do that.

Thanks for your kind feedback @edurmush but why would I create another transformer while the query has its own.

Can u please update the code. just return the value from query's transformer & access it in PDF content.

Thanx :slight_smile:

@Bilal_Anjum ,
The transformer in the query is to transform the result of the query, not to create/transform the data being used by the query.

So you’ll need a separate transformer.

1 Like

Hmm thanx @mbruijnpff for the answer.
Can you please tell me if we can define the width of the column (excel sheet) through some script from retool

you can see columns are not properly visible, can we apply any style or width to the downloaded columns ?

Not with the default Retool options, but you might be able to do this using another Excel JS library available on various CDN's. I haven't used them, but there are some examples here on the forum.

1 Like