commit e3306bcad411eb4280738268970bfbc10d05ce71 Author: luisgulo Date: Fri Jun 2 18:20:33 2023 +0200 Subido a Gitea diff --git a/.directory b/.directory new file mode 100644 index 0000000..06dab1c --- /dev/null +++ b/.directory @@ -0,0 +1,2 @@ +[Desktop Entry] +Icon=./.icon.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f3a8b22 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +#---- Gambas files to ignore (v4) +*.gambas +.lock +*~ +core +core.* +vgcore +vgcore.* +.kdbg* +.*.prof +.lang/*.pot +.gambas/* +.settings +#---- diff --git a/.hidden/CHANGELOG b/.hidden/CHANGELOG new file mode 100644 index 0000000..acedd96 --- /dev/null +++ b/.hidden/CHANGELOG @@ -0,0 +1,3 @@ +* Tue Mar 31 2020 luisgulo 1.0.3 +- Exportar PDFs a .odt, .doc y .docx + diff --git a/.icon.png b/.icon.png new file mode 100644 index 0000000..1d89a82 Binary files /dev/null and b/.icon.png differ diff --git a/.project b/.project new file mode 100644 index 0000000..d79ffde --- /dev/null +++ b/.project @@ -0,0 +1,30 @@ +# Gambas Project File 3.0 +Title=PDF-Export +Startup=FMain +Icon=PDF-Export-icono.png +Version=1.0.3 +Component=gb.image +Component=gb.gui +Component=gb.form +Description="Exportar/Convertir PDF en .odt, .doc y .docx" +Authors="luisgulo@soloconlinux.org.es" +TabSize=2 +Language=es_ES +SourcePath=/home/luisgulo/ProyectosGAMBAS/SOURCEs +Maintainer=luisgulo +Vendor=luisgulo +Address=luisgulo@soloconlinux.org.es +Url=https://repositorio.soloconlinux.org.es +License=General Public License +PackageName=pdf-export-1.0.3 +CreateEachDirectory=1 +Packager=1 +Systems=debian +Menus=debian:"Applications/Office" +Categories=debian:"Office" +Groups=debian:"utils" +ExtraDependencies=debian:"libreoffice\t\t" +Tags=FileTools,Office,TextEditor,Utility,WordProcessor +Dependencies=libreoffice +WebSite=https://repositorio.soloconlinux.org.es +CreateMenu=1 diff --git a/.src/FMain.class b/.src/FMain.class new file mode 100644 index 0000000..369bfd4 --- /dev/null +++ b/.src/FMain.class @@ -0,0 +1,54 @@ +' Gambas class file + +Public TipoSalida As String = "odt" + +Public Sub Form_Open() + System.Shell = "/bin/bash" + labelVersion.Text = "Version " & Application.Version + fichSeleccionPDF.Filter = ["*.pdf", "Ficheros PDF"] + 'Ruta exportacion + Shell "mkdir -p " & User.Home & "/PDF-Export" +End + +Public Sub botonExportar_Click() + 'Extraemos la ruta del fichero + Dim RutaPDF As String + Dim RutaSalida As String + RutaPDF = fichSeleccionPDF.SelectedPath + If IsNull(RutaPDF) + Message.Title = "PDF-Export" + Message.Warning("Debe de seleccionar un PDF") + Return + Endif + botonExportar.Text = "E X P O R T A N D O ..." + botonExportar.Enabled = False + Wait 0.1 + botonExportar.Refresh + RutaSalida = User.Home & "/PDF-Export" + RutaPDF = Shell$(RutaPDF) + Shell "libreoffice --infilter='writer_pdf_import' --convert-to " & TipoSalida & " " & RutaPDF & " --outdir " & RutaSalida Wait + Message.Title = "PDF-Export - Conversión realizada" + Message.Info("Puede encontrar su fichero convertido en:" & gb.CrLf & RutaSalida) + botonExportar.Enabled = True + botonExportar.Text = "Exportar" + botonExportar.Refresh +End + +Public Sub PictureLOGO_MouseDown() + Message.Title = "PDF-Export" + Message.Info("Autor: luisgulo@soloconlinux.org.es") +End + + + +Public Sub opcionODT_Click() + TipoSalida = "odt" +End + +Public Sub opcionDOC_Click() + TipoSalida = "doc" +End + +Public Sub opcionDOCX_Click() + TipoSalida = "docx" +End diff --git a/.src/FMain.form b/.src/FMain.form new file mode 100644 index 0000000..0b980fc --- /dev/null +++ b/.src/FMain.form @@ -0,0 +1,56 @@ +# Gambas Form File 3.0 + +{ Form Form + MoveScaled(0,0,98,46) + Text = ("PDF-Export") + Icon = Picture["PDF-Export-icono.png"] + { botonExportar Button + MoveScaled(67,37,29,7) + Text = ("Exportar") + Picture = Picture["PDF-Export-48x48.png"] + } + { Panel1 Panel + MoveScaled(67,23,29,13) + { opcionDOC RadioButton + MoveScaled(0,4,28,4) + Text = ("Microsoft Word 97 (.doc)") + } + { opcionODT RadioButton + MoveScaled(0,0,28,4) + Text = ("LibreOffice Writer (.odt)") + Value = True + } + { opcionDOCX RadioButton + MoveScaled(0,8,28,4) + Text = ("Microsoft Office (.docx)") + } + } + { fichSeleccionPDF FileChooser + MoveScaled(1,1,64,43) + } + { Panel2 Panel + MoveScaled(67,1,28.875,16.875) + { PictureBox2 PictureBox + MoveScaled(13,8,6,6) + Picture = Picture["icon:/48/right"] + } + { PictureBox3 PictureBox + MoveScaled(20,7,8,8) + Picture = Picture["icon:/64/file"] + } + { PictureLOGO PictureBox + MoveScaled(0,0,16,16) + Picture = Picture["PDF-Export-icono.png"] + } + { labelVersion Label + MoveScaled(13,1,15,4) + Font = Font["Bold,12"] + Foreground = &HC00000& + Alignment = Align.Right + } + } + { Label1 Label + MoveScaled(67,19,24,4) + Text = ("Formato de Exportación:") + } +} diff --git a/.startup b/.startup new file mode 100644 index 0000000..c160f44 --- /dev/null +++ b/.startup @@ -0,0 +1,10 @@ +FMain +PDF-Export +0 +0 +1.0.3 + +gb.image +gb.gui +gb.form + diff --git a/PDF-Export-24x24.png b/PDF-Export-24x24.png new file mode 100644 index 0000000..ac2eb2f Binary files /dev/null and b/PDF-Export-24x24.png differ diff --git a/PDF-Export-32x32.png b/PDF-Export-32x32.png new file mode 100644 index 0000000..9aae058 Binary files /dev/null and b/PDF-Export-32x32.png differ diff --git a/PDF-Export-48x48.png b/PDF-Export-48x48.png new file mode 100644 index 0000000..dcc9976 Binary files /dev/null and b/PDF-Export-48x48.png differ diff --git a/PDF-Export-icono.png b/PDF-Export-icono.png new file mode 100644 index 0000000..262d077 Binary files /dev/null and b/PDF-Export-icono.png differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29