Coder Social home page Coder Social logo

error al generar pdf about lycet HOT 21 CLOSED

giansalex avatar giansalex commented on July 30, 2024
error al generar pdf

from lycet.

Comments (21)

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024 1

OK, MUCHAS GRACIAS @giansalex.

from lycet.

giansalex avatar giansalex commented on July 30, 2024 1

Eliminando la carpeta /var

from lycet.

giansalex avatar giansalex commented on July 30, 2024 1

Si tienes otra consulta, crea un nuevo issue, en este no debió tocarse temas que no tenian relación con el titulo.

from lycet.

giansalex avatar giansalex commented on July 30, 2024 1

Existe un boton a la derecha que dice Download, alli si se puede ver el pdf correctamente

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024 1

si funciona desde Download @giansalex, MUCHAS GRACIAS.

from lycet.

giansalex avatar giansalex commented on July 30, 2024

Tienes instalado wkhtmltopdf? Puedes ejecutar el siguiente comando en la consola de windows

wkhtmltopdf http://google.com google.pdf

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

SI ACABO DE INSTALARLO EN WINDOWS @giansalex, PERO PARA QUE FUNCIONE EL COMANDO wkhtmltopdf http://google.com google.pdf, TENGO QUE EJECUTARLO DESDE SU CARPETA INSTALADA.
convertir a pdf

from lycet.

giansalex avatar giansalex commented on July 30, 2024

Entonces en el archivo .env que esta en la raiz del proyecto, hay una configuracion WKHTMLTOPDF_PATH , alli debes colocar la ruta completa de wkhtmltopdf.exe

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

SI ESTOY HACIENDO ESO PROBE CON UNA "\" Y DOS "\",
WKHTMLTOPDF_PATH=C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe
PERO ME BOTA UN ERROR.

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

@giansalex, CREO K YA ESTA, ERA POR LOS ESPACIOS EN LA RUTA, LE AGREGUE LAS COMILLAS
WKHTMLTOPDF_PATH="C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe"

from lycet.

giansalex avatar giansalex commented on July 30, 2024

Si, eso mismo iba a decir

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

PERO SI EL RESULTADO LO QUIERO CONSUMIR (VISUALIZAR) DESDE OTRO APLICATIVO, QUE DEBO HACER?

from lycet.

giansalex avatar giansalex commented on July 30, 2024

El api retorna el pdf como un archivo adjunto, si has descargado archivos de la web de cualquier sitio, es de la misma forma, leer los bytes y guardarlo en disco.

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

UNA CONSULTA MAS @giansalex AL RESPECTO, SABES LO ESTOY PROBANDO CON EL POSTMAN, Y SI ME DA LA FORMA DE DESCARGAR EL ARCHIVO EN PREVIEW, PERO EL ARCHIVO DESCARGADO EN PDF ESTA EN BLANCO, HAY QUE REALIZAR ALGUN PROCEDIMIENTO ADICIONAL.?

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

aunque agregando en el template xml invoice2.1.xml.twig, estaría igual

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

le agregue en el template, pero no refleja el cambio, imagino que debe ser por el cache, en donde puedo cambiar eso?

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

UNA CONSULTA ADICIONAL, SI ESTE PROYECTO LO MANDO A PRODUCCIÓN, SOLO LE MODIFICO LAS RUTAS DEL WS SUNAT, AGREGO EL CERTIFICADO Y MODIFICO LAS CREDENCIALES DE ESTA FUNCIÓN de util.php??

public function getSee($endpoint)
    {
        $see = new See();
        $see->setService($endpoint);
//        $see->setCodeProvider(new XmlErrorCodeProvider());
        $see->setCertificate(file_get_contents(__DIR__ . '/../resources/cert.pem'));
        $see->setCredentials('20000000001MODDATOS', 'moddatos');
        $see->setCachePath(__DIR__ . '/../cache');

        return $see;
    }

from lycet.

giansalex avatar giansalex commented on July 30, 2024

si, eso serian los cambios.

  • Credenciales CLAVE SOL de usuario secundario con permisos para FE
  • Certificado previamente registrado en sunat, en formato .pem (Public & Private key)
  • URL del servicio de Producción

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

GRACIAS @giansalex, res un genio.

from lycet.

heiner25 avatar heiner25 commented on July 30, 2024

@giansalex @JHONQUISPEFLORES como soluciono el problema que al generar el pdf usando postman y en preview se descarga el pdf pero en blanco? intenté borrando la carpeta var, pero aun persiste el mismo problema

from lycet.

JHONQUISPEFLORES avatar JHONQUISPEFLORES commented on July 30, 2024

Estimado @heiner25 , tampoco pude solucionarlo sigo con el pdf en blanco, eso de eliminar /var, era para reflejar los cambios en el template.

from lycet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.