I use FPDF to make a pdf document which will contain the data I want to export. I have an array of strings with sometime long ones
$columns = array(
"Traitement",
"Nom / Référence",
"Date de création",
"Date de mise à jour",
"Finalité(s)",
"Caractéristiques du traitement",
"Description",
"Nom de l'outil (logiciel, plateforme, application, technologie ...) utilisé",
"Evaluation des risques en cas de destruction, perte, altération, divulgation non autorisée de données ou en cas d'accès non autorisé",
"Transfert de données",
"Description des destinataires auxquels les données sont communiquées, y compris les destinataires dans des pays tiers ou des organisations internationales"
);
$data = array(
"";
"Nom traitement",
"01/01/2000",
"02/02/2000",
"foo bar\njesus\nholy spirit",
"carateristiques",
"desc",
"name tool",
"loss",
"transfert",
"desc transfert"
);
I want to make a table using where heads ($columns array) are on the left side of the table and the corresponding data ($data array) are in a second column.
I've two issues:
- some column strings are huge and the text goes out of the cells
- i don't know out to format my cells to have a first column on left containing or each line one element of
$columns
and a second column on the right side of the first one where each line is an element of$data
(and of course index 2 have to be at the same height in the document for both data and column)