Looks like you have no space left on the disk.
On Jan 11, 2007, at 2:38 PM, Jimenez, Roger wrote:
Hi, im trying to include an image inside a pdf the size of the
image is 1.002 kb whe I use the method document.add, the
application throws this exception:
What can be wrogn with my code or the problem is the siz of the
image, thanks...
DocumentException: DocumentException: ExceptionConverter:
java.io.IOException: Insufficient system resources exist to
complete the requested service
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at java.io.BufferedOutputStream.write
(BufferedOutputStream.java:105)
at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
at com.lowagie.text.pdf.OutputStreamCounter.write
(OutputStreamCounter.java:107)
at com.lowagie.text.pdf.PdfStream.toPdf(PdfStream.java:319)
at com.lowagie.text.pdf.PdfIndirectObject.writeTo
(PdfIndirectObject.java:167)
at com.lowagie.text.pdf.PdfWriter$PdfBody.add(PdfWriter.java:
370)
at com.lowagie.text.pdf.PdfWriter$PdfBody.add(PdfWriter.java:
350)
at com.lowagie.text.pdf.PdfWriter$PdfBody.add(PdfWriter.java:
303)
at com.lowagie.text.pdf.PdfWriter.addToBody(PdfWriter.java:1991)
at com.lowagie.text.pdf.PdfWriter.add(PdfWriter.java:1040)
at com.lowagie.text.pdf.PdfWriter.addDirectImageSimple
(PdfWriter.java:1015)
at com.lowagie.text.pdf.PdfWriter.addDirectImageSimple
(PdfWriter.java:940)
at com.lowagie.text.pdf.PdfContentByte.addImage
(PdfContentByte.java:1204)
at com.lowagie.text.pdf.PdfContentByte.addImage
(PdfContentByte.java:1107)
at com.lowagie.text.pdf.PdfContentByte.addImage
(PdfContentByte.java:1091)
at com.lowagie.text.pdf.PdfDocument.add(PdfDocument.java:2022)
at com.lowagie.text.pdf.PdfDocument.add(PdfDocument.java:1989)
at com.lowagie.text.Document.add(Unknown Source)
at com.kedahda.streamline.svgtopdf.itextTest.putMapImage
(itextTest.java:832)
at com.kedahda.streamline.svgtopdf.itextTest.run
(itextTest.java:321)
Source code
public void putMapImage(Document document){
Image mapImage;
float iwidth = 0f;
float iheight = 0f;
iwidth = mImageWidth/2.54f;
iwidth = iwidth * 72.0f;
iheight = mImageHeight/2.54f;
iheight = iheight * 72.0f;
try {
mapImage = Image.getInstance(images_path +
map_name);
mapImage.setAbsolutePosition(marginleft +
mapFrameMargin + imageFrameMargin, marginbottom + mapFrameMargin +
topographicLineHeight + centimeter + imageFrameMargin);
mapImage.scaleAbsoluteWidth(iwidth);
mapImage.scaleAbsoluteHeight(iheight);
document.add(mapImage); - Here throws the exception
} catch (BadElementException e) {
System.out.println(e.getMessage());
} catch (MalformedURLException e) {
System.out.println(e.getMessage());
} catch (IOException e) {
System.out.println(e.getMessage());
} catch (DocumentException e) {
e.printStackTrace(); - throwed Exception
System.out.println(e.getMessage());
}
}
----------------------------------------------------------------------
---
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?
page=join.php&p=sourceforge&CID=DEVDEV________________________________
_______________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/