且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将图像保存在Asp.net中

更新时间:2023-02-15 14:32:27



1-您使用的是哪个PDF组件?
2-您具有
Hi,

1 - Which PDF component you are using?
2 - You have
pdfPage.CopyToClipboard(...)

函数. PDF库中是否有其他功能可以将其复制到其他流中?例如文件流或二进制流?

3-使用上面的代码将数据复制到剪贴板,您可以从剪贴板 http://msdn中提取数据.microsoft.com/en-us/library/c2thcsx4.aspx [ ^ ],但您需要指定要提取的数据格式,例如文本/图像等.

在pdfPage.CopyToClipboard(...)函数之后,打开画笔,即MS Paint,然后按Ctrl + V,查看是否有图像.如果要在MS Paint中获取图像,则很有可能将数据另存为图像,但是如果没有获取图像,则可能无法将数据转换为图像.

谢谢,
hemant

编辑
我相信我已经找到了解决方案.您正在使用Adobe的Acrobat SDK将数据复制到剪贴板,我是对的,您可以从剪贴板获取数据.

[从Acrobat创建缩略图 ]
阅读上面的文章,它正是您所寻找的.

function. Do you have other function in the PDF library that can copy it to other stream.. for example File stream or binary stream?

3 - with the above code where you have copied data to Clipboard you can extract data from clipboard http://msdn.microsoft.com/en-us/library/c2thcsx4.aspx[^] but you will need to specify format of data being extracted i.e. text/image etc.

After pdfPage.CopyToClipboard(...) function open paint brush i.e. MS Paint and press Ctrl + V and see if you are getting any image. if you are getting an image in MS Paint then saving data as image is very much possible but if you are not getting an image then probably the data cannot be covnerted to image.

Thanks,
hemant

Edit
I believe i''ve found solution. You are using Adobe''s Acrobat SDK to copy data to clipboard and i was right that you can get data from clipboard.

[Create thumbnail from Acrobat]
Read the above article it has exactly what you are looking for.

Call pdfPage.CopyToClipboard(pdfRect, 0, 0, 100)

Dim clipboardData As IDataObject = Clipboard.GetDataObject()



希望这会有所帮助.

谢谢,
Hemant



Hope this will help.

Thanks,
Hemant


这可能有帮助 [