Re: [Java-gnome-developer] Cairo - embedding images in pdfs
Brought to you by:
afcowie
|
From: William T. <wil...@gm...> - 2010-02-06 10:52:51
|
On 5 February 2010 23:34, Andrew Cowie <an...@op...> wrote:
> On Fri, 2010-02-05 at 22:57 +0000, William Temperley wrote:
><snip>
>
>
>> The following crashes the JVM:
>
> But regardless, THAT shouldn't happen. Especially not her
>> pb = new Pixbuf("/tmp/logo.png");
>
>> Could anyone give me some pointers please?
>
> So, if you could post on a server or pastebin somewhere the VM crash
> dump you get from the JVM, that might help.
>
> It might help people on the list if they could see some code, too. Hard
> to imagine what context you have that led to a crash there.
I've posted the VM crash dump here:
http://pastebin.com/m7587cc22
I'm on a fairly standard Ubuntu Karmic AMD64 install - using Java-gnome-4.0.14.
It just crashed when creating a pixbuf from a file. I was just doing a
very simple trial of a few features:
public class CairoTest {
static PdfSurface pdf;
public static void main(String[] args) throws IOException {
pdf = new PdfSurface("/tmp/javacairo.pdf", 500, 707);
final Pattern linear, radial;
Context cr = new Context(pdf);
cr.setSource(1.0, 0.1, 0.0, 1.0);
cr.moveTo(10, 40);
cr.lineTo(120, 145);
cr.stroke();
//Crashes here
Pixbuf pb = new Pixbuf("/tmp/logo.gif");
cr.setSource(pb, 10, 10);
cr.paint();
Cheers
Will
|