PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → Controle Html para visualizar PDF
Controle Html para visualizar PDF
Débuté par Boller, 28 mar. 2024 04:04 - Aucune réponse
Membre enregistré
3 657 messages
Popularité : +175 (223 votes)
Posté le 28 mars 2024 - 04:04
Pode ser usado nos 3 WX (Windev, Webdev e Windev Mobile)

Edt_Path = “teste.pdf”

sbase64 is Buffer= floadbuffer(Edt_Path)
sbase64 = Encode(sbase64,encodeBASE64)
meuhtml is string=[
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>i9sistemas</title>
<style>
/* Remove margens e paddings do body */
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden; /* Remove a barra de rolagem se não for necessário */
}
/* Define o iframe para ocupar toda a tela */
iframe {
width: 100vw;
height: 100vh;
border: none; /* Remove a borda do iframe */
}
</style>
</head>
<body>
<iframe src="data:application/pdf;base64,[%sbase64%]"></iframe>
</body>
</html>
]

HTM_i9=meuhtml







Muito obrigado Paulo Viana da i9 sistemas

100% funcional

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/