ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Creating graphic file instead of PDF
Date: Sun, 21 Nov 2010 10:51:13 +0100	[thread overview]
Message-ID: <AANLkTi=QtHf+9eErdTESuaVwD5fNVTWMTzMk5QyhBth4@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin=DY2b9dFK6wWUB6FZzd6zOAKrKcJFShqFBJnE@mail.gmail.com>

On Sun, Nov 21, 2010 at 10:38 AM, Cecil Westerhof
<cldwesterhof@gmail.com> wrote:
> 2010/11/21 luigi scarso <luigi.scarso@gmail.com>:
>>>>> 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
___________________________________________________________________________________
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
___________________________________________________________________________________


  reply	other threads:[~2010-11-21  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-21  6:21 Cecil Westerhof
2010-11-21  7:48 ` luigi scarso
2010-11-21  9:07   ` Cecil Westerhof
2010-11-21  9:12     ` luigi scarso
2010-11-21  9:38       ` Cecil Westerhof
2010-11-21  9:51         ` luigi scarso [this message]
2010-11-21  7:53 ` Vnpenguin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=QtHf+9eErdTESuaVwD5fNVTWMTzMk5QyhBth4@mail.gmail.com' \
    --to=luigi.scarso@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).