然后,建立Acrobat应用程序实例;
接着,就可用它提供的对象库来 *** 作Acrobat了。
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf你可以把一下参数按比例放大,得到的图片也全部都放大了,但是如何得到原来的分辨率这个还真不知道。imgWidth
imgHeight
pdfPage.CopyToClipboard(pdfRect, 0, 0, 100)
int imgWidth = pdfPoint.x * (int)definition
int imgHeight = pdfPoint.y * (int)definition
pdfRect.Left = 0
pdfRect.right = (short)imgWidth
pdfRect.Top = 0
pdfRect.bottom = (short)imgHeight
// Render to clipboard, scaled by 100 percent (ie. original size)
// Even though we want a smaller image, better for us to scale in .NET
// than Acrobat as it would greek out small text
pdfPage.CopyToClipboard(pdfRect, 0, 0, (short)(100 * (int)definition))
IDataObject clipboardData = Clipboard.GetDataObject()
if (clipboardData.GetDataPresent(DataFormats.Bitmap))
{
Bitmap pdfBitmap = (Bitmap)clipboardData.GetData(DataFormats.Bitmap)
pdfBitmap.Save(imageOutputPath + imageName + i.ToString() + "." + imageFormat.ToString(), imageFormat)
pdfBitmap.Dispose()
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)