jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: How to search for text within a PDF?
Date Mon, 15 Mar 2010 20:50:35 GMT
Coincidentally I had to do this , so heres my writeup for using PDFBox to
extractText and normal JMeter mechanisms to assert the text within (or use
post processors to extract out data for further use, which was my use case)

http://theworkaholic.blogspot.com/2010/03/asserting-pdfs.html

regards
deepak

On Thu, Mar 11, 2010 at 8:36 PM, Deepak Shetty <shettyd@gmail.com> wrote:

> A google search reveals
> http://pdfbox.apache.org/
> http://www.stefanochizzolini.it/en/projects/clown/features.html
> You should be able to call this from a beanshell assertion
> regards
> deepak
>
>
> On Thu, Mar 11, 2010 at 7:34 PM, Deepak Shetty <shettyd@gmail.com> wrote:
>
>> There are some PDF to Text open source libraries in java (but I think it
>> also depends on your PDF if the text can be extracted)
>> + Beanshell assertion should allow you to do it
>>
>> regards
>> deepak
>>
>>
>> On Thu, Mar 11, 2010 at 6:42 PM, David Levine <eniveld@gmail.com> wrote:
>>
>>> I've got a web application that returns a PDF file, and I'd like to
>>> assert
>>> that a particular value is in the PDF file.  I thought I could use a
>>> Response Assertion to look for the value.  That was based on my totally
>>> naive and uninformed assumption about the PDF file format.  After doing a
>>> cursory search, it looks like the actual text inside the PDF is encoded
>>> in
>>> some way that I haven't taken the time to figure out.  In other words,
>>> the
>>> content of a PDF file is opaque to both myself and JMeter at the moment.
>>>  So
>>> before I consider taking a little deeper dive to see if there's any way I
>>> can write an assertion on a text value in a PDF document, I thought I'd
>>> ask
>>> this most knowledgeable group the question:
>>>
>>> Does anyone know how to write an assertion on a text value in a PDF
>>> document?
>>>
>>> Just to give you a sense of it, here's what the beginning of the
>>> excellent
>>> JMeter proxy tutorial looks like.
>>>
>>> %PDF-1.4
>>> %äöÜß
>>> 1 0 obj
>>> << /Length 2 0 R
>>>   /Filter /FlateDecode
>>> >>
>>> stream
>>> xœÍZÉŽÜF ½ 0ÿ s ·‹,• À Ðêî rt2@>
>>>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message