私はAdobe AcrobatからpngにエクスポートPDFを使用するのと同じ画質を得たいです。元のサイズを取得
しかし、何とかこれは私のためには機能しません。私は、Adobe Acrobatのツールの助けを借りて、PNGへのPDFファイルをエクスポートする場合、私が得る寸法は以下のとおりです。 幅:11264 PIX 身長:15940 PIX
あなたは私はあなたに私が使用方法を提供見ているようページごとにイメージを作成してpdfを読む。私はint型のページ(インデックス)フロートDPIXを必要と.Renderメソッドを使用するようにしているしている、dpiYフロートの可能性、ブールforPrinting
しかし、それは保存した画像には影響ありませんどのようにいくつかの?
using (var document = PdfiumViewer.PdfDocument.Load(file))
{
//This int is used to get the page count for each document
int pagecount = document.PageCount;
//With the int pagecount we can create as may screenshots as there are pages in the document
for (int index = 0; index < pagecount; index++)
{
//render the image created
var image = document.Render(index,8448,11955, true);
//savde the created screenshot temporerlay as a png + number (count)
image.Save(@"C:\Users\chnikos\Desktop\Test\output" + index.ToString("000") + ".png",ImageFormat.Png);
application.Selection.InlineShapes.AddPicture(@"C:\Users\chnikos\Desktop\Test\output" + index.ToString("000") + ".png");
}
}
本当の答えではない一般的な.. –
この現時点での例です。コードスニペットでは、 – ArchAngel
は悪くはありませんが、品質は依然として信号と同じくらい良いわけではありません何とかそれを改善する? –