如何用acrobat打开文件(外部) [英] how to open file with acrobat (external)

查看:66
本文介绍了如何用acrobat打开文件(外部)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

抱歉我的英语不好


我是新手编码+我13岁



解决问题:


我试图创建一个pdf文件数据库


我有从文件夹中获取所有pdf文件的组合框,我想从组合框中选择文件并打开。


使用adobe acrobat的pdf文件(视觉工作室外)






请帮帮我!


图片:  https://social.msdn .microsoft.com /论坛/ getfile / 1280417

解决方案


我有从文件夹中获取所有pdf文件的组合框,我想从组合框中选择文件并打开。


使用adobe acrobat的pdf文件(视觉工作室外) )


确保您拥有完整的文件路径。 如果您只在组合框中包含文件名,则需要将完整文件路径存储在其他位置。 您可以使用组合框值成员作为完整文件路径,并使用显示成员
作为文件名。

https://msdn.microsoft.com/en-us/library/system.windows.forms.listcontrol.displaymember (v = vs.110).aspx


要打开文件,您将使用Process对象。

https://msdn.microsoft.com/en-us/library/system.diagnostics。过程(v = vs.110).aspx


您需要决定是打开阅读器,还是依赖于PDF文件类型的默认应用程序。  ;如果您依赖于默认应用程序,那么您只需使用文件名作为流程启动方法的参数。 操作
系统将打开阅读器。如果用户尚未为PDF文件类型设置默认应用程序,则打开将失败。


如果您打开阅读器,则阅读器 路径/文件名是文件名 参数, PDF文件路径/名称是命令行 参数。 如果未安装或无法访问阅读器应用程序,则打开将失败。

https://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo(v = vs.110)的.aspx


sorry for my bad english

i am newbie at coding + i am 13 years old

to the problem:

im trying to create a pdf files database

i have combobox that gets all pdf files from folder, and i want to select file from combobox and open.

the pdf file with adobe acrobat (outside visual studio)


Please Help me!

Image: https://social.msdn.microsoft.com/Forums/getfile/1280417

解决方案

i have combobox that gets all pdf files from folder, and i want to select file from combobox and open.

the pdf file with adobe acrobat (outside visual studio)

Make sure that you have the full file path available.  If you only have the filename in the combobox, then the full file path will need to be stored elsewhere.  You can use the combobox Value member as the full file path, and the Display member as the file name.
https://msdn.microsoft.com/en-us/library/system.windows.forms.listcontrol.displaymember(v=vs.110).aspx

To open the file you will use the Process object.
https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx

You will need to decide whether you will open the reader, or rely on the default application for the PDF file type.  If you rely on the default application then you simply use the filename as the argument to the process start method.  The operating system will open the reader. If the user hasn't set a default application for the PDF file type the open will fail.

If you open the reader then the reader path/filename is the filename argument and the PDF file path/name is the command line argument.  If the reader application is not installed or is not accessible the open will fail.
https://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo(v=vs.110).aspx


这篇关于如何用acrobat打开文件(外部)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆