From a2679f62cdc4e12c3adf2bd9fed074b522dbd804 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 29 Oct 2022 22:02:28 +0100 Subject: [PATCH] Enormous hack to deal with JS encoding issues in PDF. No, PDFDocEncoding (as spit out by encodeStringForPlotter()) does not seem to work. Fixes https://gitlab.com/kicad/code/kicad/issues/12782 --- common/plotters/PDF_plotter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index 744c040c7c..578df37527 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -1231,7 +1231,11 @@ bool PDF_PLOTTER::EndPlot() fprintf( m_outputFile, " /A << /Type /Action /S /JavaScript /JS (%s) >>\n" ">>\n", +#ifdef __WXMAC__ js.ToStdString().c_str() ); +#else + TO_UTF8( js ) ); +#endif closePdfObject(); }