www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2014/08/07/01:47:32

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=date:from:to:subject:message-id:mail-followup-to:references
:mime-version:content-type:content-disposition:in-reply-to
:user-agent;
bh=3OmkGM+gecLj5Duf7+rviPHlHRC2mVP6IeTgRLvWc8k=;
b=l6axNlVc7fy22tyNuTk/BvF+USrf8RsPLRkilBjsm6u3/h+0fv8O4cki1DhLSm7kmD
DxB2cissDihL0+i8HBMHAS0C49UcOXLNV+rol6GgMBMmP4pwZaeN2kYwEQTCfSrBhzOt
Vr5/IuxkxpfMMxxoM8rRvuEmwWQqQ9BQ1ERjDpdT9RBuyaoDjHGmD1FimadtUedy4Gqa
bevjEO+pp4V8agV7kgdYwNg3Fzalu/kbZYEmBiS1Zc8Ogwdw4r+3wjKUA5VpVS0stugF
elfh6i/l1q07lo+nDuhgzmWctWNM6HMigUOHd3wPpZiDu3vL8Uqye2YkFpQR5uQ7pSHa
ezig==
X-Received: by 10.153.6.7 with SMTP id cq7mr15112418lad.9.1407390403674;
Wed, 06 Aug 2014 22:46:43 -0700 (PDT)
Date: Thu, 7 Aug 2014 09:46:35 +0400
From: Vladimir Zhbanov <vzhbanov AT gmail DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] vectorized schematics on web page
Message-ID: <20140807054635.GA22525@localhost.localdomain>
Mail-Followup-To: geda-user AT delorie DOT com
References: <lrevl5$613$1 AT ger DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <lrevl5$613$1@ger.gmane.org>
User-Agent: Mutt/1.5.23 (2014-03-12)
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, Aug 01, 2014 at 04:56:37AM +0200, Kai-Martin Knaak wrote:
> I like to put documentation on my projects on a dokuwiki web page. 
> However, when I got my stuff going, schematics were a bit cumbersome. 
> Pixelized versions tended to be huge in file size and still hardly
> legible. Vector graphics did not render well in www browsers. So I 
> settled for downloadable PDFs. 
To reduce the output file size for B&W PNG pictures I use the
following command:
  pngtopnm foo.png |pnmdepth 1| ppmquant 2| pnmcrop -white|
    pnmtopng -transparent white > bar.png

pnmcrop just crops the picture margins.

> Today, I tried again and was pleasantly surprised. The relevant tools 
> have improved! The new gaf tool of geda facilitates the export (Thank 
> you so much, Peter Brett!). There is a plugin for dokuwiki, which adds
> a caption and allows to link dynamically to the figure. And finally 
> major www browsers can handle images in SVG format. 
> 
> Here is the result:
> http://bibo.iqo.uni-hannover.de/dokuwiki/doku.php?id=bauteil:spannungskonstanten&#variable_positive_spannung
> (German only, but I think you get the impression)
> You can click on the image to get a scaled version.
> 
> The work-flow was surprisingly straight forward:
> 
> 1) export the schematic as *.eps 
>   gaf export -l auto -o foobar.eps foobar.sch
> 
> 2) convert to *.svg 
>   inkscape --export-plain-svg=foobar.svg foobar.eps

I've just committed a fix for the gaf utility which enables direct
SVG output with the command like this:
  gaf export -o foobar.svg foobar.sch

You can try it out. For me, it works better than the sch->eps->svg
path since the eps->svg part breaks my custom utf-8 font view. Its
output size is bigger, though.

> 3) command in dokuwiki : 
>   <imgcaption xy|lorem ipsum>{{ :foobar.svg?300}}</imgcaption>

Are you using some plugin? If so, we could use it in the gEDA
wiki.

A few years ago I tried three dokuwiki plugins for svg support,
some of them seemed to be working but no one worked well.

Vladimir

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019