Add --exclude-pdf-property-popups to schematic plotting CLI.

This commit is contained in:
Jeff Young
2023-10-22 12:33:55 +01:00
parent 7cca303f65
commit 3e4d5d776d
4 changed files with 24 additions and 10 deletions
+12 -1
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Mark Roszko <[email protected]>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -35,6 +35,7 @@
#define ARG_HPGL_PEN_SIZE "--pen-size"
#define ARG_HPGL_ORIGIN "--origin"
#define ARG_PAGES "--pages"
#define ARG_EXCLUDE_PDF_PROPERTY_POPUPS "--exclude-pdf-property-popups"
const JOB_HPGL_PLOT_ORIGIN_AND_UNITS hpgl_origin_ops[4] = {
JOB_HPGL_PLOT_ORIGIN_AND_UNITS::PLOTTER_BOT_LEFT,
@@ -71,6 +72,11 @@ CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND( const std::string& aName,
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( ARG_EXCLUDE_PDF_PROPERTY_POPUPS )
.help( UTF8STDSTR( _( "Do not generate property popups in PDF" ) ) )
.implicit_value( true )
.default_value( false );
m_argParser.add_argument( "-n", ARG_NO_BACKGROUND_COLOR )
.help( UTF8STDSTR( _( "Avoid setting a background color (regardless of theme)" ) ) )
.implicit_value( true )
@@ -148,6 +154,11 @@ int CLI::SCH_EXPORT_PLOT_COMMAND::doPerform( KIWAY& aKiway )
}
plotJob->m_HPGLPlotOrigin = hpgl_origin_ops[origin];
}
// PDF local options
else if( m_plotFormat == SCH_PLOT_FORMAT::PDF )
{
plotJob->m_PDFPropertyPopups = !m_argParser.get<bool>( ARG_EXCLUDE_PDF_PROPERTY_POPUPS );
}
int exitCode = aKiway.ProcessJob( KIWAY::FACE_SCH, plotJob.get() );