This solution works for all operating systems supported by Visual Studio Code. Follow the instructions when installing them into your editor. bordercolor "#f0f0f0" -border 25x25 %1.orig.png %1.pngĪnother option is to make use of catage, CodeSnap, PolaCode or carbon-now-cli.ĬodeSnap and PolaCode are Visual Studio Code extensions, and it may be difficult to use them from the command line, but they are simple to use. "C:\Program Files\ImageMagick\convert.exe" -trim +repage -trim +repage ^ dTextAlphaBits=4 -sOutputFile=%1.png %1.ps dDEVICEWIDTH=4958 -dDEVICEHEIGHT=7017 -dNOPLATFONTS ^ sDEVICE=png16m -dDEVICEXRESOLUTION=600 -dDEVICEYRESOLUTION=600 ^ Gswin32 -q -dBATCH -dNOPAUSE -dSAFER -dNOPROMPT ^ Wkhtmltopdf -quiet -dpi 1200 %1.html %1.ps Gvim -e %1 -c "set nobackup" -c ":colorscheme moria" -c :TOhtml -c wq -c :q PATH = "C:\Program Files\Vim\vim73" "C:\Program Files\wkhtml" "C:\Program Files\gs\gs9.00\bin".GS_PROG = C:\Program Files\gs\gs9.00\bin\gswin32.exe.GS_LIB = C:\Program Files\gs\gs9.00\lib.Environment VariablesĪdd or update the following environment variables: Because of this, the full path to convert.exe must be hard-coded in the batch file (as opposed to adding ImageMagick to the PATH). Note: ImageMagick has a program called convert.exe, which cannot supersede the Windows convert command. ImageMagick - C:\Program Files\ImageMagick.moria - C:\Program Files\Vim\vim73\colors.Install the components into the following locations: Add a border around the image, using the same background colour as the HTML document.Trim the white border of the PNG and the overzealous source code border.Convert the HTML document to a PS file.Export the source code as an HTML document (with embedded FONT tags).Load the source code into an editor that can add splashes of colour.ImageMagick - Used to trim the PNG and add a border.Ghostscript - Used to convert PS to PNG. ![]() wkhtmltopdf - Converts HTML documents to PDF or PostScript (PS) documents.moria - Colour scheme for syntax highlighting.gvim - Used to export syntax highlighted source code to HTML.The following software packages are available for both Windows and Linux systems, and are required for a complete, working solution: ![]() Unfortunately, that solution involves a bit of manual work, and my GIMP batch programming experience is next to nil. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |