Enviado em 25/04/2019 - 16:07h
Estou desenvolvendo um tradutor de pdf em java para um trabalho da faculdade. Para abrir o pdf, estou utilizando como base o seguinte tópico: https://blog.samirhadzic.com/2017/02/09/show-pdf-in-your-application/#comment-8432public void initialize(URL location, ResourceBundle resources) {
try{
//webView = new WebView();
stage = new Stage();
stage.setTitle("Abrir");
fileChooser = new FileChooser();
FileChooser.ExtensionFilter extensionFilter = new FileChooser.ExtensionFilter("PDF files (*.pdf)", "*.pdf");
fileChooser.getExtensionFilters().add(extensionFilter);
engine = webView.getEngine();
//Change the path according to yours.
String url = getClass().getResource("resources/web/viewer.html").toExternalForm();
//We add our stylesheet.
engine.setUserStyleSheetLocation(getClass().getResource("web.css").toExternalForm());
engine.setJavaScriptEnabled(true);
//engine.loadContent("file:///home/joao/NetBeansProjects/AgrVaiArq/resources/web/viewer.html");
engine.load(url);
} catch (Exception exc){
System.out.println("Falha na inicialização de controlador FXML.");
System.out.println("Vamos ver: "+ exc.getMessage());
//exc.printStackTrace();
}
System.out.println("Inicialização de controlador concluída.");
}
Blender 5.0 Beta, Firefox 144 e avanço da IA dominam o dia no mundo Linux
Desktop Linux ganha fôlego enquanto distros refinam experiência e segurança
Wayland em alta, IA em debate e novos ventos para distros e devices
Qt 6.10 e Python 3.14 puxam o ritmo do software livre nesta quarta
Atualizações de Apps, Desktop e Kernel agitam o ecossistema Linux nesta terça-feira
Como mudar o nome de dispositivos Bluetooth via linha de comando
Adicionando o repositório backports no Debian 13 Trixie