我有一个PDF的列表,需要创建的首页缩略图。
当我运行Ghostscript时,出现了red overlay text
有什么办法可以把它关掉吗?
我使用以下代码来呈现PDF中的图像
using (var rasterizer = new GhostscriptRasterizer())
{
rasterizer.GraphicsAlphaBits = 2;
rasterizer.TextAlphaBits = 2;
rasterizer.EPSClip = false;
rasterizer.Open(pdfFileLocation, _lastInstalledVersion, false);
var imageOutputPath = Path.Combine(outPutFolder, string.Format("{0}.jpg", imageFileName));
var pdf2PNG = rasterizer.GetPage(xDpi, yDpi, PageNumber);
pdf2PNG.Save(imageOutputPath, ImageFormat.Jpeg);
Console.WriteLine("Saved " + imageOutputPath);
}发布于 2017-03-23 16:15:49
Ghostscript不会生成“红色覆盖文本”,因此它必须出现在原始文档中。没有看到原始的PDF文件,我不能提供任何建议。但是,如果你正在创建缩略图,我会建议你不要使用GraphicsAlphaBits和TextAlphaBits,因为这只会产生模糊的输出。当产生JPEG作为输出时,这一点更是正确的。
FWIW你正在使用像Ghostscript.NET或GhostscriptSharp这样的东西,而不是Ghostscript。
https://stackoverflow.com/questions/42958672
复制相似问题