TheFrenchDemos commited on
Commit
4ef742d
·
verified ·
1 Parent(s): 781bbad

version samedi 3 mai 19:35

Browse files
Files changed (1) hide show
  1. templates/index.html +14 -8
templates/index.html CHANGED
@@ -181,19 +181,22 @@
181
  <div class="col-12">
182
  <label for="aiModel" class="form-label">Generative AI</label>
183
  <select id="aiModel" class="form-select" required>
 
 
 
184
  <option value="" selected disabled>Select…</option>
185
  <option>Adobe Firefly Image Model 4</option>
186
  <option>Bing Image Creator</option>
187
  <option>Canva Magic Media</option>
188
- <option>DALL·E / GPT‑4o Image</option>
189
- <option>Flux (FLUX 1)</option>
190
  <option>Ideogram 3.0</option>
191
  <option>Leonardo AI (Phoenix)</option>
192
  <option>Microsoft Designer</option>
193
  <option>Midjourney v6</option>
194
  <option>NightCafe Creator</option>
195
  <option>Playground AI</option>
196
- <option>Runway Gen‑3 Alpha</option>
197
  <option>Stable Diffusion 3</option>
198
  <option>Other</option>
199
  </select>
@@ -341,10 +344,15 @@
341
  const canvas=await html2canvas(clone,{backgroundColor:null}); document.body.removeChild(clone);
342
  const img=canvas.toDataURL('image/png'); const prop=pdf.getImageProperties(img);
343
  const imgH=(prop.height*usableW)/prop.width; pdf.addImage(img,'PNG',margin,y,usableW,imgH); y+=imgH+40;
 
344
  pdf.setFontSize(12);
345
- pdf.text('I hereby certify that the original picture shown on the left is my own work and that',margin,y); y+=18;
346
- pdf.text('the AI‑generated picture shown on the right was produced by the generative AI', margin,y); y+=18;
347
- pdf.text('indicated below, using the prompt that follows.', margin,y); y+=40;
 
 
 
 
348
  const labelX = margin + 50, valueX = margin + 150;
349
  pdf.setFont('helvetica','normal'); pdf.text('Generative AI:',labelX,y); pdf.setFont('helvetica','italic'); pdf.text(certData.ai,valueX,y); y+=28;
350
  pdf.setFont('helvetica','normal'); pdf.text('Prompt:',labelX,y); pdf.setFont('helvetica','italic');
@@ -365,5 +373,3 @@
365
  </html>
366
 
367
 
368
-
369
-
 
181
  <div class="col-12">
182
  <label for="aiModel" class="form-label">Generative AI</label>
183
  <select id="aiModel" class="form-select" required>
184
+
185
+ /* attention certains signes perturbent la mise en page */
186
+
187
  <option value="" selected disabled>Select…</option>
188
  <option>Adobe Firefly Image Model 4</option>
189
  <option>Bing Image Creator</option>
190
  <option>Canva Magic Media</option>
191
+ <option>DALL·E  GPT4o Image</option>
192
+ <option>Flux (F LUX 1)</option>
193
  <option>Ideogram 3.0</option>
194
  <option>Leonardo AI (Phoenix)</option>
195
  <option>Microsoft Designer</option>
196
  <option>Midjourney v6</option>
197
  <option>NightCafe Creator</option>
198
  <option>Playground AI</option>
199
+ <option>Runway Gen3 Alpha</option>
200
  <option>Stable Diffusion 3</option>
201
  <option>Other</option>
202
  </select>
 
344
  const canvas=await html2canvas(clone,{backgroundColor:null}); document.body.removeChild(clone);
345
  const img=canvas.toDataURL('image/png'); const prop=pdf.getImageProperties(img);
346
  const imgH=(prop.height*usableW)/prop.width; pdf.addImage(img,'PNG',margin,y,usableW,imgH); y+=imgH+40;
347
+ /* texte de certification */
348
  pdf.setFontSize(12);
349
+ const paragraph = 'I hereby certify that the original picture shown on the left is my own work and that the AI generated picture shown on the right was produced by the generative AI indicated below, using the prompt that follows.';
350
+
351
+ // Couper automatiquement en lignes tenant dans la marge
352
+ const lines = pdf.splitTextToSize(paragraph, usableW);
353
+ pdf.text(lines, margin, y); // boucle interne automatique
354
+ y += lines.length * 14 + 40; // 14 pt ≈ interligne, puis espace
355
+
356
  const labelX = margin + 50, valueX = margin + 150;
357
  pdf.setFont('helvetica','normal'); pdf.text('Generative AI:',labelX,y); pdf.setFont('helvetica','italic'); pdf.text(certData.ai,valueX,y); y+=28;
358
  pdf.setFont('helvetica','normal'); pdf.text('Prompt:',labelX,y); pdf.setFont('helvetica','italic');
 
373
  </html>
374
 
375