public PdfEnginePandocCommandGenerator(IPandocCommandGenerator commandGenerator, string engine) : base( commandGenerator) { this.engine = engine; if (!supportedEngines.Contains(this.engine)) { throw new ArgumentException($"Unsupported PDF Engine : {this.engine}"); } }
private string GetExecutionCommand(IPandocCommandGenerator generator, string sourcePath, string targetPath) { if (!targetPath.EndsWith(".pdf")) { Log.Error("Target should be a PDF"); throw new ArgumentException("Target should be a PDF"); } var executionCommand = $"{generator.GetCommand(sourcePath)} -o \"{targetPath}\""; Log.Information($"Computed command : pandoc {executionCommand}"); return(executionCommand); }
public LogsFileCommandGenerator(IPandocCommandGenerator commandGenerator, string logFilePath) : base(commandGenerator) { this.logFilePath = logFilePath; }
public NumberedHeaderPandocCommandOptionsGenerator(IPandocCommandGenerator commandGenerator) : base( commandGenerator) { }
public GeometryPandocCommandGenerator(IPandocCommandGenerator commandGenerator, string value) : base( commandGenerator, "geometry", value) { }
public KeyValuePandocCommandOptionsGenerator(IPandocCommandGenerator commandGenerator, string key, string value) : base(commandGenerator) { this.key = key; this.value = value; }
public ContentTablePandocCommandGenerator(IPandocCommandGenerator commandGenerator) : base(commandGenerator) { }
public HighlightPandocCommandOptionsGenerator(IPandocCommandGenerator commandGenerator, string stylePath) : base(commandGenerator) { this.stylePath = stylePath; }
public FontPandocCommandGenerator(IPandocCommandGenerator commandGenerator, string value) : base(commandGenerator, "mainfont", $"\"{value}\"") { }
public MarginPandocCommandGenerator(IPandocCommandGenerator commandGenerator, decimal value) : base(commandGenerator, $"margin={value.ToString(System.Globalization.CultureInfo.InvariantCulture)}cm") { }
protected PandocCommandWithOptionsGenerator(IPandocCommandGenerator commandGenerator) { this.CommandGenerator = commandGenerator; }