Matt James

Greenhorn
+ Follow
since Jan 28, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Matt James

I have spotted it - it is a typo in responseAjax - I have typed reponseText insteam of responseText.

That is several hours of my life that I won't get back

Never mind - and thanks for the heads up about Firebug, it looks quite useful
Status of 200 and a Status Text of OK - not sure what to do with Firebug - still just getting 'undefined' as the responseText.
Hi

That is the problem - it just says 'undefined' in the response. I will have a look at firebug if you think that it is useful.

kind regards

matt
Hi

Having problem with a simple AJAX call, I just keep getting an undefined error when I run this. I have checked the PHP file (getClassCodes.php) and that returns
data as it should, and I can see that working in the HTTP monitor in Netbeans, but when it goes to get the reponse - I just get 'undefined'.

Here is the simple PHP page:



and here is the JS file that I am using:



Please can anyone help.

kind regards

matt>
Hi again

I feel that I have made progress (by getting the URL right) but it is still not right. By using the FOP below I can now see the image starting to render (just see the top left hand corner) in the PDF. Its quality looks good but there is only a small amount of it there.

I can view the whole svg image in my Safari web browser.

Is there some fo:external-graphic attribute that I should be setting ?

The semi working fo is below (where graph_img1 is the svg file):



many thanks again

matt
Thanks for this, good advice , I think that this has moved me forward. I am now getting another error indicating that it is trying a bit harder to show this image. It is too late to investigate this now, I will pick it up again tomorrow.

The error is ...

SEVERE: svg graphic could not be built: file:C:/Work/...0_graph01.svg:-1
An I/O error occured while processing the URI:
"file:C:/Work....0_graph01.svg#clipPath1"
specified on the element <rect>
org.apache.batik.bridge.BridgeException: file:C:/Work/...0_graph01.svg:-1
Thanks for the reply, but I cannot find examples of what I want to do.

I am trying to create a PDF report that has a graph at the top and a table of data underneath. I generate the Graph and the rest of the report XML in java and then pull them together in a PDF with FOP and XSLT.

At first, i used a jpeg for the graph (created by JFreeChart) and I could add that using fo:external-graphic. However, the graph was blurred so I decided to try and use SVG as I can create an SVG file from JFreeChart.

If I do this with the SVG file, where $graph_img1 is my .svg file:



I get :

[Fatal Error] :1:40: Invalid encoding name "Cp1252".
22-Jul-2008 19:56:06 org.apache.fop.image.analyser.ImageReaderFactory make
WARNING: No ImageReader found for file:C:/Work........graph1.svg


If I try and do this where svgString is the whole svg XML starting from <svg....



I get

Error(Unknown location): fo:instream-foreign-object is missing child elements.
Required Content Model: one (1) non-XSL namespace child


Have you got any suggestions.

Many thanks

matt
Hi. I have created some .svg images from JFreeChart and want to embed them in a PDF document using FOP. Try as I might, using the External Graphic Inline Graphic route I cannot get it to display. Has anyone out there taken an existing svg file and embedded it successfully using FOP.

Many thanks in anticipation

matt
Paul

Many thanks for that. I was confusing myself by putting the Date to System.out.println to check what it was being set to, which of course will use the toString - whoops.

Everything seems a lot better now.

Cheers

Matt
17 years ago
Hi

I have a method where I am passing in a string and getting a Date object back. Because of DST or TimeZones I am getting odd results. I pass in 30/06/2006 23:30:00 and use SimpleDateFormat to parse it (using TimeZone.getTimeZone("GMT") as the timezone), and the date that I get out is Sat Jul 01 00:30:00 BST 2006.

Is there a way to get back a date object that is exactly equal to the string that I pass in without any DST alterations.

Thanks in anticipation

Matt
17 years ago
Just to follow up, got rid of the Sort and used this for the select

select="$nodes[not($nodes > .)]"

Works a treat.

Cheers

matt
...and that got posted before I could say.

Can anyone suggest what differences may have caused this.

Many thanks in anticipation

matt
Hi

I have an XSLT report that runs fine in Java 1.4.2 Windows XP, but I recently packaged the app and put it on a Vista machine with Java 1.6 on it, and a strange thing happened. Most of it worked, but one calculated data column in the report stopped working - no errors, no exceptions, just a blank column.

The XSL template that creates the value is this:
<xsl:template name="getHighest">
<xsl:param name="nodes" select="/.." />

<xsl:choose>
<xsl:when test="not($nodes)">0</xsl:when>
<xsl:otherwise>
<xsl:for-each select="$nodes">
<xsl:sort data-type="number" order="descending" />
<xsl:if test="position() = 1">
<xsl:value-of select="format-number(number(.),'#,###.##')" />
</xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>

</xsl:template>
Thanks for the reply - but I found a solution. I made the image 16 by 16 and it now works fine. This confused me as the bigger image 48 by 48 was OK in the JFrame, but the JInternalFrame - but there you go

Cheers

Matt
17 years ago
Hi

I am using a JInternalFrame with a Windows look and feel - when I set the icon with setFrameIcon it does not seem to draw it properly, and only partially shows the image. It is fine on the main JFrame however.

I have also tried:

UIManager.put("InternalFrame.icon", new javax.swing.ImageIcon(<my image path> ;

Has anyone got any ideas where I am going wrong ?

Thanks in anticipation

Matt
17 years ago