欲了解更多信息,请参照用户手册。
Foxit ActiveX 2.0除了包含了1.0版的全部功能之外,还增加了许多新特性。如果您的应用程序已经使用了Foxit ActiveX 1.0,那么这个文档将帮助您修改您的程序使之适用于Foxit ActiveX 2.0。
属性:
1、在ActiveX 1.0当中,您可以直接获取像Title, Author这些属性的值,然而在2.0当中,您需要先获取到IPDFDocumnetInfo这个接口,并根据这个接口所提供的方法来获取这些信息。
2、Rotate和Zoomlevel在ActiveX 1.0当中都是只读的,而在2.0当中是可读写的。
3、其它的属性在ActiveX 2.0中都和1.0保持兼容。
方法:
使用Foxit ActiveX,您可以在文档打开的时候,调出打印对话框进行打印设置并打印。在1.0版当中,您可以直接调用成员函数来实现这一功能,但在2.0当中需要先获取IPDFPrinter这个接口,再调用这个接口中的方法来实现同样的功能。
以下为1.0版与2.0版的方法对应图表。
| ActiveX 1.0 | ActiveX 2.0 |
|---|---|
| PrintFile() | PrintWithDialog() (IPDFPrinter接口方法) |
| SetPrintnum() | SetNumOfCopies() (IPDFPrinter接口方法) |
| GetPrintnum() | GetNumOfCopies() (IPDFPrinter接口方法) |
| PrintSilent() | PrintQuiet() (IPDFPrinter接口方法) |
| PrintSilentByName() | 先调用SetPrinterName() ,再调用 PrintQuiet() (IPDFPrinter接口方法) |
| SetRotateMode() | SetRotate() |
| GotoPage() | 调用SetZoomlevel(),SetRotate(),最后调用GotoPage() |
| ShowProperties() | ShowDocumentInfoDialog() |
| FindNext() | 由FindFirst 和 FindNext 共同完成。 |
注意:其它的方法在ActiveX 2.0当中与1.0保持兼容。
事件:
如下是一个1.0与2.0的事件对应图表。
| ActiveX 1.0 | ActiveX 2.0 |
|---|---|
| LinkClicked | OnHypeLink |
| DocLoad | OnOpenDocument |
| DocUnLoad | OnCloseDocument |
| BeforeDraw | BeforeDraw |
| AfterDraw | AfterDraw |
© 2008 福昕软件 保留所有权利