PDF plotter: fix a rare pen width issue when plotting many pages in one file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20805

(cherry picked from commit a02f1f2411)
This commit is contained in:
jean-pierre charras
2025-05-01 20:04:19 +02:00
parent e13c414052
commit c55d2c092e
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -678,6 +678,10 @@ void PDF_PLOTTER::StartPage( const wxString& aPageNumber, const wxString& aPageN
m_paperSize.x *= 10.0 / m_iuPerDeviceUnit;
m_paperSize.y *= 10.0 / m_iuPerDeviceUnit;
// Set m_currentPenWidth to a unused value to ensure the pen width
// will be initialized to a the right value in pdf file by the first item to plot
m_currentPenWidth = 0;
// Open the content stream; the page object will go later
m_pageStreamHandle = startPdfStream();