tif images appearing distorted in PDFs

2008-05-21 Thread Woodhouse, Graeme
Hello all,

I'm trying to get tif images working in PDF's I'm creating -

The problem is some of them are coming out with the image height having been 
resized (by around 50%).

Other tif images are being displayed correctly with no incorrect resizing.

Does anyone have any idea's why this might be?

Graeme Woodhouse
Software Engineer

ProQuest - The Quorum, Barnwell Road, Cambridge, CB5 8SW

Direct-Line:+44 (0) 1223 271 264
Switchboard:  +44 (0) 1223 215 512
Fax: +44 (0) 1223 215 513
www.proquest.co.ukhttp://www.proquest.co.uk/

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this message in error, please notify the sender immediately 
by reply and immediately delete this message and any attachments.



RE: tif images appearing distorted in PDFs

2008-05-21 Thread Woodhouse, Graeme
How would I find out if the tif that is going wrong has non-squared pixels?

Graeme


-Original Message-
From: paul womack [mailto:[EMAIL PROTECTED]
Sent: 21 May 2008 14:10
To: fop-users@xmlgraphics.apache.org
Subject: Re: tif images appearing distorted in PDFs

Woodhouse, Graeme wrote:
 Hello all,



 I'm trying to get tif images working in PDF's I'm creating -



 The problem is some of them are coming out with the image height having
 been resized (by around 50%).



 Other tif images are being displayed correctly with no incorrect resizing.



 Does anyone have any idea's why this might be?

Possibly a tiff file with non-square pixels (which is valid,
but unusual) ?

   BugBear

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tif images appearing distorted in PDFs

2008-05-21 Thread Woodhouse, Graeme
I seem to have fixed it by setting scaling to non-uniform.

... not sure why it fixed it but it seems to have done.

Graeme


-Original Message-
From: Woodhouse, Graeme
Sent: 21 May 2008 14:12
To: 'fop-users@xmlgraphics.apache.org'
Subject: RE: tif images appearing distorted in PDFs

How would I find out if the tif that is going wrong has non-squared pixels?

Graeme


-Original Message-
From: paul womack [mailto:[EMAIL PROTECTED]
Sent: 21 May 2008 14:10
To: fop-users@xmlgraphics.apache.org
Subject: Re: tif images appearing distorted in PDFs

Woodhouse, Graeme wrote:
 Hello all,



 I'm trying to get tif images working in PDF's I'm creating -



 The problem is some of them are coming out with the image height having
 been resized (by around 50%).



 Other tif images are being displayed correctly with no incorrect resizing.



 Does anyone have any idea's why this might be?

Possibly a tiff file with non-square pixels (which is valid,
but unusual) ?

   BugBear

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Large PDF's files fail to stream correctly

2008-04-08 Thread Woodhouse, Graeme
Hi Roland,

I could do but then the user would require a mechanism to connect to sql and 
then parse the blob back into a pdf. Which would require a web service so 
transmission would again become the problem. Thanks anyway though!

Graeme Woodhouse
Software Engineer
ProQuest

Direct-Line:  +44 (0) 1223 271 264
Fax: +44 (0) 1223 215 513

-Original Message-
From: Roland Neilands [mailto:[EMAIL PROTECTED]
Sent: 08 April 2008 01:29
To: fop-users@xmlgraphics.apache.org
Subject: Re: Large PDF's files fail to stream correctly

Just a thought but you could put it into a BLOB in a DB  apply your
security to accessing that.
Alternatively encrypt the filesystem pdf for reading   provide the
password separately.

Regards,
Roland


Woodhouse, Graeme wrote:
 Hi Daniel,

 Thanks for your help - as a bit of a test I tried the following two scenarios:

 I set the response size to Integer.MAX_VALUE. Which didn't work :(

 I also tried first saving the output to a file - waiting until the file was 
 complete, then streaming the file to the browser through the response. Which 
 didn't work :(.

 Your right that I could temporarily link to the file I created and then 
 delete the file after but your right about the security access. Its not 
 something that we could do as the pdf's contain sensitive information + 
 direct access to the server isn't really an option as it bypasses the rest of 
 the security we have in place.

 I don't suppose you or anyone else on the list know of any other way to get 
 round this?



 Graeme Woodhouse
 Software Engineer
 ProQuest

 Direct-Line:  +44 (0) 1223 271 264
 Fax: +44 (0) 1223 215 513


 -Original Message-
 From: Daniel Appelt [mailto:[EMAIL PROTECTED]
 Sent: 04 April 2008 18:43
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: Large PDF's files fail to stream correctly

 Hi Graeme,

 in general, you do not know in advance how long the rendering with FOP
 will take. For large files it is not unlikely that the browser times
 out or finishes fetching the PDF file in an unfinished state.
 A possible pseudo-streaming solution could be to let FOP save the file
 on the server, and use a website with an AJAX script on the client
 side that regularly checks the state of the file. If file size isn't
 changing between two or more consecutive checks, it might be assumed
 that FOP has finished rendering the file and you could redirect the
 browser to the respective URL or show it as a link. Of course, this
 might still be problematic with regards to security...

 Cheers,
 Daniel

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 This e-mail is solely for the use of the intended recipient and may contain 
 information which is confidential or privileged. Any unauthorised use of its 
 contents is prohibited. If you have received this e-mail in error, please 
 notify the sender via return e-mail and then delete the original e-mail.



This e-mail is solely for the use of the intended recipient and may contain 
information which is confidential or privileged. Any unauthorised use of its 
contents is prohibited. If you have received this e-mail in error, please 
notify the sender via return e-mail and then delete the original e-mail.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Large PDF's files fail to stream correctly

2008-04-08 Thread Woodhouse, Graeme
Have you tried connecting to Tomcat directly and not via Apache to confirm
that the problem is related to the streaming via AJP?

I've tried it now on a stand alone tomcat instance and am having the same 
trouble. It makes me even more confused that this isn't a more publicised 
problem on the internet. I would have thought many people dynamically generate 
large PDF's through tomcat (although writing that it does sound less likely 
with all those stipulations).

So, it seems like its tomcat's problem more than the connection between apache 
and tomcat.

Graeme Woodhouse
Software Engineer
ProQuest

Direct-Line:  +44 (0) 1223 271 264
Fax: +44 (0) 1223 215 513

-Original Message-
From: Manuel Mall [mailto:[EMAIL PROTECTED]
Sent: 08 April 2008 08:41
To: 'fop-users@xmlgraphics.apache.org'
Subject: RE: Large PDF's files fail to stream correctly



 -Original Message-
 From: Woodhouse, Graeme [mailto:[EMAIL PROTECTED]
 Sent: Monday, 7 April 2008 10:41 PM
 To: 'fop-users@xmlgraphics.apache.org'
 Subject: RE: Large PDF's files fail to stream correctly

 Hi Jeremias,

 Your right - having no problems with smaller PDF's.

 I think it all has to do with the setup I have with tomcat connecting to
 apache and the way data chunks are sent. This is a long standing problem
 in my company - I'm amazed it isn't a well known problem.

Have you tried connecting to Tomcat directly and not via Apache to confirm
that the problem is related to the streaming via AJP?

Have you tried writing the PDF to a file on the server but serve it via the
Apache/Tomcat combination? Does that still fail?

For further isolation testing you could use a tool like wget to save the
stream at the client to a file. Then compare that to a copy of the PDF saved
on the server and see if there is a pattern to when / where the corruption
occurs.

Manuel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Large PDF's files fail to stream correctly

2008-04-08 Thread Woodhouse, Graeme
Oh sorry, forgot to add that info to the last email implicitly.

I have tested adding a step of first streaming the file to disk and then 
serving the file as a stream and that encounters the same problem. Giving a 
direct link to the file on the server works fine but as I mentioned we don't 
want to do that.

Its quite difficult to make anything out of the file that is downloaded as its 
in a binary format. I can tell that there isn't a set limit for size, file 
seems to randomly fail between 25-30page+ mark. (Each of these pages contains 
variable size images of around 1700x2000).

Graeme Woodhouse
Software Engineer
ProQuest

Direct-Line:  +44 (0) 1223 271 264
Fax: +44 (0) 1223 215 513


-Original Message-
From: Manuel Mall [mailto:[EMAIL PROTECTED]
Sent: 08 April 2008 13:20
To: 'fop-users@xmlgraphics.apache.org'
Subject: RE: Large PDF's files fail to stream correctly



 -Original Message-
 From: Woodhouse, Graeme [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, 8 April 2008 8:03 PM
 To: 'fop-users@xmlgraphics.apache.org'
 Subject: RE: Large PDF's files fail to stream correctly

 Have you tried connecting to Tomcat directly and not via Apache to
 confirm that the problem is related to the streaming via AJP?

 I've tried it now on a stand alone tomcat instance and am having the same
 trouble. It makes me even more confused that this isn't a more publicised
 problem on the internet. I would have thought many people dynamically
 generate large PDF's through tomcat (although writing that it does sound
 less likely with all those stipulations).

 So, it seems like its tomcat's problem more than the connection between
 apache and tomcat.

I would still do the other suggested tests. Save the PDF as file and serve
that through tomcat and also capture the data at the client end and compare.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Large PDF's files fail to stream correctly

2008-04-07 Thread Woodhouse, Graeme
Hi Daniel,

Thanks for your help - as a bit of a test I tried the following two scenarios:

I set the response size to Integer.MAX_VALUE. Which didn't work :(

I also tried first saving the output to a file - waiting until the file was 
complete, then streaming the file to the browser through the response. Which 
didn't work :(.

Your right that I could temporarily link to the file I created and then delete 
the file after but your right about the security access. Its not something that 
we could do as the pdf's contain sensitive information + direct access to the 
server isn't really an option as it bypasses the rest of the security we have 
in place.

I don't suppose you or anyone else on the list know of any other way to get 
round this?



Graeme Woodhouse
Software Engineer
ProQuest

Direct-Line:  +44 (0) 1223 271 264
Fax: +44 (0) 1223 215 513


-Original Message-
From: Daniel Appelt [mailto:[EMAIL PROTECTED]
Sent: 04 April 2008 18:43
To: fop-users@xmlgraphics.apache.org
Subject: Re: Large PDF's files fail to stream correctly

Hi Graeme,

in general, you do not know in advance how long the rendering with FOP
will take. For large files it is not unlikely that the browser times
out or finishes fetching the PDF file in an unfinished state.
A possible pseudo-streaming solution could be to let FOP save the file
on the server, and use a website with an AJAX script on the client
side that regularly checks the state of the file. If file size isn't
changing between two or more consecutive checks, it might be assumed
that FOP has finished rendering the file and you could redirect the
browser to the respective URL or show it as a link. Of course, this
might still be problematic with regards to security...

Cheers,
Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Large PDF's files fail to stream correctly

2008-04-04 Thread Woodhouse, Graeme
Hello,

Hopefully someone on this list can help,

We've been having long standing problems here building dynamic PDF's and 
streaming the to the Adobe PDF reader plugin. We use an Apache/Tomcat (through 
AJP) to stream these files. Unfortunatly as the files reach 40-50 pages they 
become to become randomly garbled and the reader reports them as corrupt.

Has anyone here had the same problem?

One possible fix we have found is to save the file to the server and link 
directly to the file, then delete the file. But this leaves security 
vulnerabilities in the system and we would prefer to get the streaming right.

It would be great if someone could shed some light on this problem!

Thanks in advance :)

Graeme Woodhouse
Software Engineer

ProQuest - The Quorum, Barnwell Road, Cambridge, CB5 8SW

Direct-Line:+44 (0) 1223 271 264
Switchboard:  +44 (0) 1223 215 512
Fax: +44 (0) 1223 215 513
www.proquest.co.ukhttp://www.proquest.co.uk/

This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this message in error, please notify the sender immediately 
by reply and immediately delete this message and any attachments.