Forum: Inkscape Convert SVG->PDF with transparency

F4a804fbb24172b2bbdd8f17b5dc1b63?d=identicon&s=25 Tristan Miller (Guest)
on 2006-03-15 13:24
(Received via mailing list)
Greetings.

I just created a poster using Inkscape and want to make a PDF version to
distribute.  I use a lot of transparency in the poster, but
unfortunately
Inkscape's export filters for Postscript and PDF don't preserve the
transparency.

Can someone suggest another SVG to PDF converter which will preserve
transparency?  I tried Cairo's svg2pdf, but it just segfaults midway
through processing the file.

BTW, I'm running GNU/Linux.  I do have access to a Windows XP machine,
but
not to hundreds of dollars to buy expensive Adobe software.

Regards,
Tristan

--
   _
  _V.-o  Tristan Miller [en,(fr,de,ia)]  ><  Space is limited
 / |`-'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  <>  In a haiku, so it's hard
(7_\\    http://www.nothingisreal.com/   ><  To finish what you



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944...
239c6ef952737016b65e9f4746300e17?d=identicon&s=25 Eric Jonas (Guest)
on 2006-03-15 13:40
(Received via mailing list)
> Can someone suggest another SVG to PDF converter which will preserve
> transparency?  I tried Cairo's svg2pdf, but it just segfaults midway
> through processing the file.

Transparency is a feature of PDF1.4 which isn't all that
well-supported. It's unfortunate, because with transparency you can do
many simple beautiful effects in SVG.

I have had a degree of success with batik, from the Apache project. It
is mostly billed as a "SVC rasterizer" but it can also "transcode" SVG
to PDF. Sometimes it eats my fonts, sometimes it eats my arrow-heads,
but 98% of the time it does exactly what I want.

http://xmlgraphics.apache.org/batik/

The software itself is Free, but it depends on non-free components of
the sun JVM, and doesn't currently work with gcj. Hopefully that will
change soon.

			...Eric


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944...
B011a6257ec8ca752f7245d30899addf?d=identicon&s=25 Aaron Spike (Guest)
on 2006-03-15 15:32
(Received via mailing list)
Tristan Miller wrote:
> Can someone suggest another SVG to PDF converter which will preserve
> transparency?  I tried Cairo's svg2pdf, but it just segfaults midway
> through processing the file.

Cairo's svg2pdf was just a demo and is probably abandoned. Check out the
rsvg-convert utility from librsvg. I don't know if the utility is
included in the usual distribution packages, so you may have to grab CVS
and build from source. rsvg-convert does currently rasterize the SVG
into PDF but it is still something to look at.

Aaron Spike



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944...
F4a804fbb24172b2bbdd8f17b5dc1b63?d=identicon&s=25 Tristan Miller (Guest)
on 2006-03-15 15:48
(Received via mailing list)
Greetings.

In article <20060315123530.GJ15189@convolution.mwl.mit.edu>, Eric Jonas
wrote:
>> Can someone suggest another SVG to PDF converter which will preserve
>> transparency?  I tried Cairo's svg2pdf, but it just segfaults midway
>> through processing the file.
>
> I have had a degree of success with batik, from the Apache project. It
> is mostly billed as a "SVC rasterizer" but it can also "transcode" SVG
> to PDF. Sometimes it eats my fonts, sometimes it eats my arrow-heads,
> but 98% of the time it does exactly what I want.

Alas, batik too fails miserably:

[psy@linux:/tmp/batik-1.6]$ java -jar batik-rasterizer.jar -m
application/pdf Psychedelic\ poster.svg
About to transcode 1 SVG file(s)

Converting Psychedelic poster.svg to Psychedelic poster.pdf ...
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
The current document is unable to create an element of the requested
type
(namespace: http://www.w3.org/2000/svg, name: flowRoot).
        at
org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
Source)
        at
org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown
Source)
        at
org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown
Source)
        at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown
Source)
        at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
        at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
... error (SVGConverter.error.while.rasterizing.file)

Regards,
Tristan

--
   _
  _V.-o  Tristan Miller [en,(fr,de,ia)]  ><  Space is limited
 / |`-'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  <>  In a haiku, so it's hard
(7_\\    http://www.nothingisreal.com/   ><  To finish what you



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944...
Faf7c5b7f2c3eb1a151d0b4f73345397?d=identicon&s=25 Tavmjong Bah (Guest)
on 2006-03-15 16:50
(Received via mailing list)
On Wed, 2006-03-15 at 14:38 +0000, Tristan Miller wrote:

> Converting Psychedelic poster.svg to Psychedelic poster.pdf ...
> org.apache.batik.transcoder.TranscoderException: null
> Enclosed Exception:
> The current document is unable to create an element of the requested type
> (namespace: http://www.w3.org/2000/svg, name: flowRoot).


flowRoot (i.e. Flowed Text) is an SVG 1.2 proposed object type. Batik is
an SVG 1.1 renderer.

Change the flowRoot objects to regular text (Text->Convert to Text) and
try Batik again.


						Tav





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944...
F4a804fbb24172b2bbdd8f17b5dc1b63?d=identicon&s=25 Tristan Miller (Guest)
on 2006-03-16 01:17
(Received via mailing list)
Greetings.

In article <1142437587.3805.21.camel@localhost.localdomain>, Tavmjong
Bah
wrote:
> Change the flowRoot objects to regular text (Text->Convert to Text) and
> try Batik again.

Doing so let Batik run without producing any errors, but the PDF it
produced isn't quite right.  Adobe Reader refuses to open it, saying "An
unrecognized token '-3.662109375E-4' was found.".  Kpdf opens it, and
while there is indeed transparency in the right parts of the image, in
other parts there is transparency where there shouldn't be any!

Regards,
Tristan

--
   _
  _V.-o  Tristan Miller [en,(fr,de,ia)]  ><  Space is limited
 / |`-'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  <>  In a haiku, so it's hard
(7_\\    http://www.nothingisreal.com/   ><  To finish what you



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944...
Cd6efa682e3e3a6ff6990c4e20b18875?d=identicon&s=25 Alberto Simões (Guest)
on 2006-03-16 11:57
(Received via mailing list)
Inkscape conversion from SVG to PDF is using PS. PS as I know it
doesn't support transparency, and thats the main problem.

When I need to export an SVG to PDF with transparencies I need to
flatten the colors. I can't remember well how I do that, but basically
use the pick color tool to check the real visible color, and change
the object color/transparency accordingly.

I hope this helps.
Hugs
Alberto

On 3/15/06, Tristan Miller <psychonaut@nothingisreal.com> wrote:
> >
> other parts there is transparency where there shouldn't be any!
>
>
--
Alberto
Simões
543d0c0e25f9a72a7bd129c637f0d96a?d=identicon&s=25 Ted Gould (Guest)
on 2006-03-18 21:05
(Received via mailing list)
On Wed, 2006-03-15 at 12:02 +0000, Tristan Miller wrote:
> Can someone suggest another SVG to PDF converter which will preserve
> transparency?  I tried Cairo's svg2pdf, but it just segfaults midway
> through processing the file.

Two things I didn't see people mention:

- Scribus has good SVG import and good PDF export.

- I've used PDF creator on Windows before, and I thought that I got
transparency there.  I don't remember for sure (it was a long time ago)
but you might try that.

		--Ted
185461fe59e2316ca0d721ffd4336fe7?d=identicon&s=25 Andrea B. (andrea_b45)
on 2012-11-04 23:39
6 years later..
same problem.
Inkscape can't export to pdf level opacity.
So sad.


Ted Gould wrote in post #49605:
> On Wed, 2006-03-15 at 12:02 +0000, Tristan Miller wrote:
>> Can someone suggest another SVG to PDF converter which will preserve
>> transparency?  I tried Cairo's svg2pdf, but it just segfaults midway
>> through processing the file.
>
> Two things I didn't see people mention:
>
> - Scribus has good SVG import and good PDF export.
>
> - I've used PDF creator on Windows before, and I thought that I got
> transparency there.  I don't remember for sure (it was a long time ago)
> but you might try that.
>
>     --Ted
E03ce1731504c839a0c83a287013fd7f?d=identicon&s=25 Tomas L. (tomas_l)
on 2015-01-19 15:09
I know this post is from the stone age, but a few good workarounds have
been posted here:

http://askubuntu.com/questions/294349/create-pdf-f...

That's probably a more useful last post to this thread than the previous
one...
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.