Makepdf table column alignment by array of header names or array index.

Makepdf table column alignment by array of header names or array index.

damienmonkdamienmonk Posts: 2Questions: 1Answers: 0

I have been looking for examples to help me get control of the column alignment and i found this post

https://datatables.net/forums/discussion/57473/how-to-align-right-column-in-export-pdf-working-with-columns-visibility

This link in the post no longer works and I am still searching for example code for this solution. I have been searching for a couple of days and all I have tried has not worked so far.

This is my first question on the forum and if I did not follow the rules I apologize.

If someone can give me some examples of how I can call the header by an array of names or array index to say align right the entire column it would be greatly appreciated. Showing my code is not productive as its worthless and only an example or a couple of examples of code will help me at this point.

Answers

  • damienmonkdamienmonk Posts: 2Questions: 1Answers: 0

    found this so trying it also

    https://datatables.net/forums/discussion/40208/how-can-align-only-one-column-in-pdfhtml5-export

    I see the responses this is a makepdf question so this question is for anyone in the group that has had experience with the topic.

  • allanallan Posts: 63,528Questions: 1Answers: 10,473 Site admin

    The second thread you linked to there looks like it is about right. You will need to note through that doc.content[1] might be the location of the table in the document description JSON or it might not, depending on the options you have enabled for the export. With all the default options, that is where it will be, but a message (for example) can change that. You might want to loop over the doc.content array looking for the table to make it more robust.

    Allan

Sign In or Register to comment.