public PdfEnginePandocCommandGenerator(IPandocCommandGenerator commandGenerator, string engine) : base(
                commandGenerator)
        {
            this.engine = engine;

            if (!supportedEngines.Contains(this.engine))
            {
                throw new ArgumentException($"Unsupported PDF Engine : {this.engine}");
            }
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public LogsFileCommandGenerator(IPandocCommandGenerator commandGenerator, string logFilePath) : base(commandGenerator)
 {
     this.logFilePath = logFilePath;
 }
Exemple #4
0
 public NumberedHeaderPandocCommandOptionsGenerator(IPandocCommandGenerator commandGenerator) : base(
         commandGenerator)
 {
 }
Exemple #5
0
 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)
 {
 }
Exemple #8
0
 public HighlightPandocCommandOptionsGenerator(IPandocCommandGenerator commandGenerator, string stylePath) :
     base(commandGenerator)
 {
     this.stylePath = stylePath;
 }
Exemple #9
0
 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;
 }