您可以创建一个框架小部件,其中包含对PDF文件的引用.GWT中的Frame小部件将在浏览器中呈现HTML iFrame.
public class FrameExample implements EntryPoint {
public void onModuleLoad() {
// Make a new frame, and point it at Google.
Frame frame = new Frame("http://www.mydomain.com/path to my pdf");
// Add it to the root panel. or anywhere you want
RootPanel.get().add(frame);
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5863 次 |
| 最近记录: |