Pregunta

Un backend heredado requiere el cuerpo del correo electrónico con un documento .tif, no tif y falla. Entonces, necesito generar un .tif en blanco, ¿hay una manera rápida de hacer esto con ghostscript?


editar: haga uso una vez de la instalación del proyecto cuando lo necesite.

¿Fue útil?

Solución

La siguiente línea producirá un archivo Tiff de 1 píxel (340 bytes). Ese es el archivo Tiff más pequeño que pude obtener.

gswin32c.exe -q -dNOPAUSE -sDEVICE=tiffpack -g1x1 -sOutputFile=small.tif -c newpath 0 0 moveto 1 1 lineto closepath stroke showpage quit

En realidad, incluso puede reducir el comando a:

gswin32c.exe -q -dNOPAUSE -sDEVICE=tiffpack -g1x1 -sOutputFile=small.tif -c showpage quit

sin aumento de tamaño, por desgracia.

Otros consejos

¿No podrías hacer tu archivo .tif en blanco una vez y luego adjuntar el mismo archivo cada vez que se necesita?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top