Creating graphic file instead of PDF
I am making flowcharts with ConTeXt. Because the flowcharts have to be included in other documents, I would like to make graphic files (jpeg, png, ...). Also not bigger as needed to represent the flowchart. Can this be done. -- Cecil Westerhof
On Sun, Nov 21, 2010 at 7:21 AM, Cecil Westerhof
I am making flowcharts with ConTeXt. Because the flowcharts have to be included in other documents, I would like to make graphic files (jpeg, png, ...). Also not bigger as needed to represent the flowchart. Can this be done. Just convert the pdf in jpeg with (for example) ghostscript. -- luigi
2010/11/21 luigi scarso
I am making flowcharts with ConTeXt. Because the flowcharts have to be included in other documents, I would like to make graphic files (jpeg, png, ...). Also not bigger as needed to represent the flowchart. Can this be done. Just convert the pdf in jpeg with (for example) ghostscript.
This works, but the problem is that I get an image the size of an A4. This is mostly whitespace. Is it not possible to only get the used part? -- Cecil Westerhof
On Sun, Nov 21, 2010 at 10:07 AM, Cecil Westerhof
2010/11/21 luigi scarso
: I am making flowcharts with ConTeXt. Because the flowcharts have to be included in other documents, I would like to make graphic files (jpeg, png, ...). Also not bigger as needed to represent the flowchart. Can this be done. Just convert the pdf in jpeg with (for example) ghostscript.
This works, but the problem is that I get an image the size of an A4. This is mostly whitespace. Is it not possible to only get the used part? Maybe wrap your flowcharts-code in \startTEXpage ... \stopTEXpage, ie something like this \starttext \startTEXpage Put your flowcharts-code here... \stopTEXpage \stoptext -- luigi
2010/11/21 luigi scarso
I am making flowcharts with ConTeXt. Because the flowcharts have to be included in other documents, I would like to make graphic files (jpeg, png, ...). Also not bigger as needed to represent the flowchart. Can this be done. Just convert the pdf in jpeg with (for example) ghostscript.
This works, but the problem is that I get an image the size of an A4. This is mostly whitespace. Is it not possible to only get the used part? Maybe wrap your flowcharts-code in \startTEXpage ... \stopTEXpage, ie something like this \starttext \startTEXpage Put your flowcharts-code here... \stopTEXpage \stoptext
Works like a charm. Thanks. By the way instead of gs from ghostscript, you can also use convert from Image Magick. -- Cecil Westerhof
On Sun, Nov 21, 2010 at 10:38 AM, Cecil Westerhof
2010/11/21 luigi scarso
: I am making flowcharts with ConTeXt. Because the flowcharts have to be included in other documents, I would like to make graphic files (jpeg, png, ...). Also not bigger as needed to represent the flowchart. Can this be done. Just convert the pdf in jpeg with (for example) ghostscript.
This works, but the problem is that I get an image the size of an A4. This is mostly whitespace. Is it not possible to only get the used part? Maybe wrap your flowcharts-code in \startTEXpage ... \stopTEXpage, ie something like this \starttext \startTEXpage Put your flowcharts-code here... \stopTEXpage \stoptext
Works like a charm. Thanks.
By the way instead of gs from ghostscript, you can also use convert from Image Magick. or GraphicsMagick, but as far as I know they still depend to ghostscript. An independent way is to convert the pdf with pdftoppm and then convert again the ppm to png/jpeg.
-- luigi
Import your PDF into Inkscape so you get SVG. From this format you can
export to PNG at any size.
On Sun, Nov 21, 2010 at 07:21, Cecil Westerhof
I am making flowcharts with ConTeXt. Because the flowcharts have to be included in other documents, I would like to make graphic files (jpeg, png, ...). Also not bigger as needed to represent the flowchart. Can this be done.
-- Cecil Westerhof ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (3)
-
Cecil Westerhof
-
luigi scarso
-
Vnpenguin