Skip to content

Commit

Permalink
Merge pull request #32 from betagouv/mep
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm authored Aug 7, 2024
2 parents 2db8738 + 04ec90d commit bfd1630
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/pdf/src/report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import React from "react";
import type { Udap, Report, Service_instructeurs, Clause_v2 } from "@cr-vif/electric-client/frontend";

Font.registerHyphenationCallback((word) => {
console.log(word);
return [word];
});

Expand All @@ -15,13 +14,13 @@ export const ReportPDFDocument = ({ udap, htmlString, images }: ReportPDFDocumen
minPresenceAhead={20}
size="A4"
style={{
paddingTop: "32px",
paddingTop: "48px",
paddingBottom: "32px",
}}
>
<Html
style={{
fontSize: "12px",
fontSize: "10px",
paddingLeft: "32px",
paddingRight: "32px",
whiteSpace: "pre-line",
Expand Down Expand Up @@ -56,6 +55,7 @@ export const ReportPDFDocument = ({ udap, htmlString, images }: ReportPDFDocumen
.header {
display: flex;
margin-top: -16px;
flex-direction: row;
width: 100%;
align-items: flex-start;
Expand Down Expand Up @@ -173,10 +173,10 @@ export const getReportHtmlString = (

return minifyHtml(`
<p>
<p class="meeting-date">
${
meetDate
? `<span style='text-align: right;'>
? `<span>
Suite au rendez-vous du ${meetDate?.toLocaleDateString("fr-FR", {
year: "numeric",
month: "long",
Expand All @@ -191,8 +191,6 @@ export const getReportHtmlString = (
Ref cadastrale : ${report.projectCadastralRef ?? ""}<br/>
</p>
<span class="link">https://stackoverflow.com/questions/8753296/how-to-prevent-line-break-at-hyphens-in-all-browsers</span>
<p>
<strong>Objet de la demande : ${report.title ?? ""}</strong>
</p>
Expand Down

0 comments on commit bfd1630

Please sign in to comment.