Skip Menu |

This queue is for tickets about the XML-Handler-AxPoint CPAN distribution.

Report information
The Basics
Id: 1229
Status: new
Priority: 0/
Queue: XML-Handler-AxPoint

People
Owner: Nobody in particular
Requestors: mbarbon [...] dsi.unive.it
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.30
Fixed in: (no value)



Subject: Win32, binmode() needed
XML-Handler-AxPoint-1.30, Windows 2000 using axpoint (the command line tool) produces broken PDFs, because the file is opened in text mode; patch below cures this; also fixes a warning when <email> is not present. Regards Mattia --- lib\XML\Handler\AxPoint.pm.orig Tue Jun 11 09:39:24 2002 +++ lib\XML\Handler\AxPoint.pm Tue Jul 02 10:42:04 2002 @@ -42,5 +42,11 @@ } elsif (not $ref) { - $self->{Consumer} = XML::SAX::Writer::FileConsumer->new($self->{Output}); + local *FH; + + open FH, '> ' . $self->{Output} or + XML::SAX::Writer::Exception->throw( Message => "Error opening '" . + $self->{Output} . "': $!" ); + binmode FH; + $self->{Consumer} = XML::SAX::Writer::HandleConsumer->new(*FH); } elsif (UNIVERSAL::can($self->{Output}, 'output')) { @@ -317,5 +323,6 @@ if ($self->{metadata}{speaker}) { $self->{pdf}->add_link(link => "mailto:" . $self->{metadata}{email}, - x => 20, y => $y - 10, w => 570, h => 24); + x => 20, y => $y - 10, w => 570, h => 24) + if defined $self->{metadata}{email}; $self->{pdf}->print_boxed($self->{metadata}{speaker}, x => 20, y => 40, w => 570, h => $y - 24, mode => "center");
From: Matt Sergeant <matt [...] sergeant.org>
To: bug-XML-Handler-AxPoint [...] rt.cpan.org
Subject: Re: [cpan #1229] Win32, binmode() needed
Date: Tue, 2 Jul 2002 19:52:03 +0100
Thanks. Applied.