\n\n \n CONVERSÃO DE PDF\n \n\n \n \n \n \n \n \n Selecione o(s) PDF(s) \n\n \n \n \n \n \n \n \n Selecionar \n \n \n \n\n \n\n \n \n\n \n \n Converter Todos \n \n \n\n \n Download \n \n \n\n \n Zip e Download \n \n \n \n\n 0\">\n {{arrArquivos.length}} arquivo(s) selecionado(s) para conversão
\n {{getConvertedCount()}} arquivo(s) convertido(s)\n
\n\n \n\n 0\">\n {{arrArquivos.length}} arquivo(s) selecionado(s) para conversão
\n {{getConvertedCount()}} arquivo(s) convertido(s)\n
\n\n
\n\n 0\">\n \n \n Converter Todos \n \n \n\n \n Download \n \n \n\n \n Zip e Download \n \n \n
\n\n","import { Component, OnInit } from '@angular/core';\nimport { DIRETORIO } from 'src/app/config/diretorio.config';\nimport { TIPO_ARQUIVO } from 'src/app/config/tipo-arquivo.config';\nimport { ArquivoDTO } from 'src/app/models/arquivoDTO';\nimport { ArquivoService } from 'src/app/services/arquivo/arquivo.service';\nimport { FunctionsService } from 'src/app/services/common/functions.service';\nimport * as FileSaver from 'file-saver';\n\nvar JSZip = require(\"jszip\");\n\n\n//DEFINIÇÃO DA CLASSE QUE SERÁ USADA PARA DESCREVER OS ARQUIVOS\nexport class ArquivoPDF {\n arquivoOriginal: ArquivoDTO;\n fullPathArquivoConvertido: string;\n processando: boolean;\n \n constructor(arquivoOriginal: ArquivoDTO, fullPathArquivoConvertido: string, processando: boolean) {\n this.arquivoOriginal = arquivoOriginal;\n this.fullPathArquivoConvertido = fullPathArquivoConvertido;\n this.processando = processando;\n }\n}\n\n\n@Component({\n selector: 'app-gc-converter-pdf',\n templateUrl: './gc-converter-pdf.page.html',\n styleUrls: ['./gc-converter-pdf.page.scss'],\n})\nexport class GcConverterPdfPage implements OnInit {\n\n arrArquivos: ArquivoPDF[] = [];\n executandoConversao: boolean = false;\n \n \n\n constructor( private arquivoService: ArquivoService\n , private functionsService: FunctionsService ) { }\n\n ngOnInit() {\n }\n\n ionViewWillLeave(){\n \n this.arrArquivos.forEach(arquivo =>{\n this.arquivoService.delete(arquivo.arquivoOriginal.id).subscribe();\n this.arquivoService.deleteByPath(DIRETORIO.TEMP, 'PDF_A_' + arquivo.arquivoOriginal.nome).subscribe();\n });\n \n }\n \n\n uploadPDF(fileLoader: HTMLInputElement){\n\n let that = this;\n that.arrArquivos = [];\n\n fileLoader.onchange = function () {\n \n that.functionsService.presentLoading(); \n \n for(var i=0; i