[paperclips] Printing error when there are some kind of images [message #544765] |
Mon, 05 July 2010 09:10  |
Eclipse User |
|
|
|
Hi all,
I'm using Paperclips to do some printing inside an rcp application.
My printings are in the form of table where each row shows some properties of an instance of a model object.
One of these properties is an image, a small image that I have scaled using SWT api and that I'm using in many parts of this application.
So, is there someone who have experienced some problems trying to print images with Paperclips?
Thanks in advance and best regards
Raffaele
|
|
|
|
Re: [paperclips] Printing error when there are some kind of images [message #545428 is a reply to message #544916] |
Wed, 07 July 2010 13:51   |
Eclipse User |
|
|
|
First of all, the exception is this:
19:44:08,171 ERROR [PrintAction] Printing failure
org.eclipse.swt.SWTError: Unspecified errorUnable to layout page 1
at org.eclipse.swt.SWT.error(SWT.java:4109)
at net.sf.paperclips.PaperClips.error(PaperClips.java:82)
at net.sf.paperclips.PaperClips.error(PaperClips.java:70)
at net.sf.paperclips.PaperClips.getPages(PaperClips.java:422)
at net.sf.paperclips.PaperClips.print(PaperClips.java:255)
at net.sf.paperclips.PaperClips.print(PaperClips.java:210)
at net.sf.paperclips.PaperClips.print(PaperClips.java:186)
In that case I have onl two rows with the following structure:
"c:36 d:g d:g" and some others "d:g"
In the first column I put the image with ImagePrint.
I've choosed to use c:36 after some expriments in another printing where I had many many columns.... and so, sometimes, image column could be too small throwing exceptions...
Choosing to put a fixed width for image column was the solution!
Now, I have few columns, the first is always an image, but now the images have width higher than height, and so, I don't know why, I have always the above exception.
Putting d:g instead of c:36 works!!!
Anyway I suspect that there are many bugs in the image management...
Is it possible to have some guide lines Matthew to print images and to layout them inside a table like layout?
Thanks again and best regards
Raffaele
|
|
|
Re: [paperclips] Printing error when there are some kind of images [message #546191 is a reply to message #545428] |
Mon, 12 July 2010 01:43  |
Eclipse User |
|
|
|
I think what you have is a conflict between the ImagePrint size (which
is determined by the image pixel size and whatever size/dpi you set on
it) and the fixed column width in your grid column.
I suggest wrapping the ImagePrint in a ScalePrint to automatically scale
down the image when necessary and see if that helps.
Matthew
On 07/07/2010 11:51 AM, Raffaele Gambelli wrote:
> First of all, the exception is this:
>
> 19:44:08,171 ERROR [PrintAction] Printing failure
> org.eclipse.swt.SWTError: Unspecified errorUnable to layout page 1
> at org.eclipse.swt.SWT.error(SWT.java:4109)
> at net.sf.paperclips.PaperClips.error(PaperClips.java:82)
> at net.sf.paperclips.PaperClips.error(PaperClips.java:70)
> at net.sf.paperclips.PaperClips.getPages(PaperClips.java:422)
> at net.sf.paperclips.PaperClips.print(PaperClips.java:255)
> at net.sf.paperclips.PaperClips.print(PaperClips.java:210)
> at net.sf.paperclips.PaperClips.print(PaperClips.java:186)
>
> In that case I have onl two rows with the following structure:
> "c:36 d:g d:g" and some others "d:g"
>
> In the first column I put the image with ImagePrint.
> I've choosed to use c:36 after some expriments in another printing where
> I had many many columns.... and so, sometimes, image column could be too
> small throwing exceptions...
>
> Choosing to put a fixed width for image column was the solution!
>
> Now, I have few columns, the first is always an image, but now the
> images have width higher than height, and so, I don't know why, I have
> always the above exception.
>
> Putting d:g instead of c:36 works!!!
>
> Anyway I suspect that there are many bugs in the image management...
> Is it possible to have some guide lines Matthew to print images and to
> layout them inside a table like layout?
>
> Thanks again and best regards
> Raffaele
|
|
|
Re: [paperclips] Printing error when there are some kind of images [message #599897 is a reply to message #544916] |
Wed, 07 July 2010 13:51  |
Eclipse User |
|
|
|
First of all, the exception is this:
19:44:08,171 ERROR [PrintAction] Printing failure
org.eclipse.swt.SWTError: Unspecified errorUnable to layout page 1
at org.eclipse.swt.SWT.error(SWT.java:4109)
at net.sf.paperclips.PaperClips.error(PaperClips.java:82)
at net.sf.paperclips.PaperClips.error(PaperClips.java:70)
at net.sf.paperclips.PaperClips.getPages(PaperClips.java:422)
at net.sf.paperclips.PaperClips.print(PaperClips.java:255)
at net.sf.paperclips.PaperClips.print(PaperClips.java:210)
at net.sf.paperclips.PaperClips.print(PaperClips.java:186)
In that case I have onl two rows with the following structure:
"c:36 d:g d:g" and some others "d:g"
In the first column I put the image with ImagePrint.
I've choosed to use c:36 after some expriments in another printing where I had many many columns.... and so, sometimes, image column could be too small throwing exceptions...
Choosing to put a fixed width for image column was the solution!
Now, I have few columns, the first is always an image, but now the images have width higher than height, and so, I don't know why, I have always the above exception.
Putting d:g instead of c:36 works!!!
Anyway I suspect that there are many bugs in the image management...
Is it possible to have some guide lines Matthew to print images and to layout them inside a table like layout?
Thanks again and best regards
Raffaele
|
|
|
Re: [paperclips] Printing error when there are some kind of images [message #599947 is a reply to message #599897] |
Mon, 12 July 2010 01:43  |
Eclipse User |
|
|
|
I think what you have is a conflict between the ImagePrint size (which
is determined by the image pixel size and whatever size/dpi you set on
it) and the fixed column width in your grid column.
I suggest wrapping the ImagePrint in a ScalePrint to automatically scale
down the image when necessary and see if that helps.
Matthew
On 07/07/2010 11:51 AM, Raffaele Gambelli wrote:
> First of all, the exception is this:
>
> 19:44:08,171 ERROR [PrintAction] Printing failure
> org.eclipse.swt.SWTError: Unspecified errorUnable to layout page 1
> at org.eclipse.swt.SWT.error(SWT.java:4109)
> at net.sf.paperclips.PaperClips.error(PaperClips.java:82)
> at net.sf.paperclips.PaperClips.error(PaperClips.java:70)
> at net.sf.paperclips.PaperClips.getPages(PaperClips.java:422)
> at net.sf.paperclips.PaperClips.print(PaperClips.java:255)
> at net.sf.paperclips.PaperClips.print(PaperClips.java:210)
> at net.sf.paperclips.PaperClips.print(PaperClips.java:186)
>
> In that case I have onl two rows with the following structure:
> "c:36 d:g d:g" and some others "d:g"
>
> In the first column I put the image with ImagePrint.
> I've choosed to use c:36 after some expriments in another printing where
> I had many many columns.... and so, sometimes, image column could be too
> small throwing exceptions...
>
> Choosing to put a fixed width for image column was the solution!
>
> Now, I have few columns, the first is always an image, but now the
> images have width higher than height, and so, I don't know why, I have
> always the above exception.
>
> Putting d:g instead of c:36 works!!!
>
> Anyway I suspect that there are many bugs in the image management...
> Is it possible to have some guide lines Matthew to print images and to
> layout them inside a table like layout?
>
> Thanks again and best regards
> Raffaele
|
|
|
Powered by
FUDForum. Page generated in 0.04344 seconds