ADDED: Clickable links on hierarchical sheets, sheet pins and hierarchical labels in PDF exports of schematics.

By default, the new links get generated instead of popup menus for those elements. Can be turned off in the plot dialog or from the cli.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18900
This commit is contained in:
FPiorski
2024-10-18 19:35:02 +00:00
committed by Seth Hillbrand
parent 09389a437f
commit 7df0879a44
13 changed files with 243 additions and 113 deletions
+8
View File
@@ -36,6 +36,7 @@
#define ARG_HPGL_ORIGIN "--origin"
#define ARG_PAGES "--pages"
#define ARG_EXCLUDE_PDF_PROPERTY_POPUPS "--exclude-pdf-property-popups"
#define ARG_EXCLUDE_PDF_HIERARCHICAL_LINKS "--exclude-pdf-hierarchical-links"
#define ARG_EXCLUDE_PDF_METADATA "--exclude-pdf-metadata"
const JOB_HPGL_PLOT_ORIGIN_AND_UNITS hpgl_origin_ops[4] = {
@@ -81,6 +82,11 @@ CLI::SCH_EXPORT_PLOT_COMMAND::SCH_EXPORT_PLOT_COMMAND( const std::string& aName,
.help( UTF8STDSTR( _( "Do not generate property popups in PDF" ) ) )
.flag();
m_argParser.add_argument( ARG_EXCLUDE_PDF_HIERARCHICAL_LINKS )
.help( UTF8STDSTR( _( "Do not generate clickable links for hierarchical elements "
"in PDF" ) ) )
.flag();
m_argParser.add_argument( ARG_EXCLUDE_PDF_METADATA )
.help( UTF8STDSTR( _( "Do not generate PDF metadata from AUTHOR and SUBJECT variables" ) ) )
.flag();
@@ -184,6 +190,8 @@ int CLI::SCH_EXPORT_PLOT_COMMAND::doPerform( KIWAY& aKiway )
else if( m_plotFormat == SCH_PLOT_FORMAT::PDF )
{
plotJob->m_PDFPropertyPopups = !m_argParser.get<bool>( ARG_EXCLUDE_PDF_PROPERTY_POPUPS );
plotJob->m_PDFHierarchicalLinks =
!m_argParser.get<bool>( ARG_EXCLUDE_PDF_HIERARCHICAL_LINKS );
plotJob->m_PDFMetadata = !m_argParser.get<bool>( ARG_EXCLUDE_PDF_METADATA );
}