- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
场景:WinForms 桌面应用程序,.Net 2.0
我们有 0.01% 的用户无法打印我们通过 FoxIt PDF SDK ActiveX v5.0.1 呈现的文档
当用户单击“打印”按钮时,我们会在查看器控件实例上调用 PrintWithDialog() 方法。此时抛出Access Violation Exception,然后应用程序挂起。打印对话框未显示。没有进一步的用户输入(鼠标、键盘)使其恢复生机,必须通过任务管理器终止该进程。
异常堆栈跟踪是:
AccessViolationException - Attempted to read or write protected memory. This is
often an indication that other memory is corrupt.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at FoxitPDFSDKStdLib._DFoxitPDFSDK.PrintWithDialog()
at AxFoxitPDFSDKStdLib.AxFoxitPDFSDK.PrintWithDialog()
at MyCode.PDFToolBarButtonClick(Object sender, EventArgs e)
我们无法重现该问题,而且 FoxIt 似乎也无能为力,因为我们无法为他们提供重现该问题的项目。
我怀疑 Windows 7 和打印设置的组策略控制。我们已经成功地要求受影响的用户删除并重新安装默认打印机,但是一两天后问题又出现了。一个站点有策略设置来控制谁可以进行彩色打印,并以不同方式安装打印机(同一台物理设备)。
有没有人有过影响打印的 Windows 7 或组策略设置的经验?
编辑:只有 FoxIt 受此问题影响。其他一切 - Acrobat、Word、记事本等都可以毫无问题地打印。
最佳答案
如果我删除默认打印机设置(意味着没有打印机设置为默认设置),我可以模拟这种情况,因此临时将以下窗口注册表项从“Device”重命名为“OldDevice”
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device
我的简单形式:
public Form1()
{
InitializeComponent();
try
{
this.axFoxitPDFSDK1.OpenFile(@"C:\foxit\FoxitPDFActiveX51_Manual.pdf", "");
this.axFoxitPDFSDK1.PrintWithDialog();
}
catch (System.Exception exc)
{
Debug.WriteLine(exc.StackTrace);
Debug.WriteLine(exc.Message);
if (exc.InnerException != null)
{
Debug.WriteLine(exc.InnerException.Message);
}
}
}
以及调试的相关输出:
Eccezione first-chance di tipo 'System.AccessViolationException' in mscorlib.dll
'MySOfoxit.vshost.exe' (Gestito (v2.0.50727)): 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll' caricato, caricamento simboli ignorato. Il modulo è ottimizzato e l'opzione 'Just My Code' del debugger è abilitata.
in System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
in FoxitPDFSDKStdLib._DFoxitPDFSDK.PrintWithDialog()
in AxFoxitPDFSDKStdLib.AxFoxitPDFSDK.PrintWithDialog()
in MySOfoxit.Form1..ctor() in c:\foxit\MySOfoxit\Form1.cs:riga 23
Tentativo di lettura o scrittura della memoria protetta. Spesso questa condizione indica che altre parti della memoria sono danneggiate.
我可以提到这个link作为(也许)触发事件的可能原因之一。其他应用程序(WinWord、Adobe Reader)按预期工作(只需要手动选择打印机)
关于c# - FoxIt PDF SDK - PrintWithDialog 中的 AccessViolationException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28674731/
Foxit 手册说您可以在 pdf 中创建一个可以运行 java 脚本的链接。请参阅下面的选项“I”。 是否可以编写 java 脚本来打开存储在 pdf 附件中的 excel 文件? 我对 Java
通过批处理文件使用Foxit Reader通过FOR循环打印PDF文件: SET printing=C:\PDF\Printing SET fox=C:\Program Files\Foxit Sof
我需要将 Foxit Reader(PDF 阅读软件)嵌入到网页中。有谁知道在以下代码中使用正确的 classid 和参数: You must install Foxit
我在通过 Foxit Reader 打印 PDF 时遇到问题。问题不在于它没有打印,而是在尝试这样做时加载了GUI。我想要打印只是发生在后台...... 到目前为止我读到的所有内容都表明下面的代码实际
场景:WinForms 桌面应用程序,.Net 2.0 我们有 0.01% 的用户无法打印我们通过 FoxIt PDF SDK ActiveX v5.0.1 呈现的文档 当用户单击“打印”按钮时,我们
为什么这个 PDF 在 Foxit Reader 而不是 Adobe Reader 中显示签名? 这是来自 Syncfusion PDF library 的代码用于生成它(另请参阅有关 signi
我遇到了一个非常棘手的问题。我们有应该填写的表单,但有些人在福昕阅读器中使用注释自由格式文本注释而不是填写表单字段,因此注释永远不会变平。当我们的渲染软件生成最终文档时,不包括注释。 我尝试的解决方案
我的应用程序正在使用 itext# 生成 PDF 文档。文件可以正常打开并在 Foxit Reader 中正确显示,但在 Adobe Acrobat 中会出现以下错误: There was an er
我正在尝试从 HTML 页面链接到 PDF 文件。我想添加指向特定页面的链接,使用诸如 http://www.mydomain.com/some-pdf-file.pdf#nameddest=some
长话短说,当您使用 Web browser control和 VBA 打开嵌入在表单中的 pdf 文件,pdf 阅读器会自动触发打印事件。 当前设置 Win1064Bit/Office365 版本 1
当我将 R 图保存为 pdf 时,轴文本“℃”变成了点“...”。为什么? 我正在使用 Windows 平台和 Foxit 阅读器。 特定符号不能出现在pdf文件中吗? 最佳答案 使用 ?plotma
我是一名优秀的程序员,十分优秀!