Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/net/NetPDF/NetPDFCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ protected virtual void PrepareMainClassToRun(string className)

bool _usePureJavaCMYKConversion;
/// <summary>
/// The log folder
/// <see langword="true"/> to enable pure Java CMYK conversion
/// </summary>
public virtual bool UsePureJavaCMYKConversion { get { return !ApplicationUsePureJavaCMYKConversion.HasValue ? _usePureJavaCMYKConversion : ApplicationUsePureJavaCMYKConversion.Value; } }

Expand Down
8 changes: 8 additions & 0 deletions src/net/NetPDFPS/Cmdlet/StartNetPDFPSCmdletCommandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,19 @@ public class StartNetPDFPSCmdletCommandBase<TCmdlet> : StartJNetPSCmdletCommandB
HelpMessage = "The path where font cache will be stored.")]
public string FontCachePath { get; set; }

/// <inheritdoc cref="NetPDFCore{T}.ApplicationFontCachePath" />
[Parameter(
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Add on command line to enable pure Java CMYK conversion.")]
public bool? UsePureJavaCMYKConversion { get; set; }

protected override void OnBeforeCreateGlobalInstance()
{
NetPDFPSHelper<NetPDFPSCore>.SetCommonLoggingPath(CommonLoggingPath);
NetPDFPSHelper<NetPDFPSCore>.SetLogPath(LogPath);
NetPDFPSHelper<NetPDFPSCore>.SetFontCachePath(FontCachePath);
NetPDFPSHelper<NetPDFPSCore>.SetUsePureJavaCMYKConversion(UsePureJavaCMYKConversion.HasValue ? UsePureJavaCMYKConversion.Value : false);
}
}
}
2 changes: 2 additions & 0 deletions src/net/NetPDFPS/NetPDFPSHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ public static class NetPDFPSHelper<TClass> where TClass : NetPDFCore<TClass>
public static void SetLogPath(string logPath) { JNetPSHelper<TClass>.Set(typeof(NetPDFCore<>), nameof(NetPDFPSCore.ApplicationLogPath), logPath); }

public static void SetFontCachePath(string fontCachePath) { JNetPSHelper<TClass>.Set(typeof(NetPDFCore<>), nameof(NetPDFPSCore.ApplicationFontCachePath), fontCachePath); }

public static void SetUsePureJavaCMYKConversion(bool usePureJavaCMYKConversion) { JNetPSHelper<TClass>.Set(typeof(NetPDFCore<>), nameof(NetPDFPSCore.ApplicationUsePureJavaCMYKConversion), usePureJavaCMYKConversion); }
}
}