Generation of questions from pdf in survey

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Generation of questions from pdf in survey

Santosh Malviya-3
Hello list,

I have to generate questions from pdf in survey, for this I followed these
steps: -

(1) Created dataResource with mimeTypeId "application/pdf" and
dataResourceTypeId with  "image"( I tried it with survey  and surveyResponse
but it was giving error of not supporting)
(2) Uploaded a pdf in which I put data for surveyQuestions.
(3) Created a new content with contentTypeId "document" and then associated
the created dataResource to the content.
(4)  From surveyId tab I added pdf content id to the survey.
(5) Then I went to the questions tab under survey and tried to apply
questions from category drop-down(it shows name of       added content id)
but it does not show any questions from pdf after applying the selected
category.

Are these steps are correct or am I missing something.

Thanks and Regards
Santosh Malviya
Reply | Threaded
Open this post in threaded view
|

Re: Generation of questions from pdf in survey

BJ Freeman
the show stopper is there is no provision to read from a Pdf and make it
entity formatted data.


Santosh Malviya sent the following on 7/16/2010 8:57 AM:

> Hello list,
>
> I have to generate questions from pdf in survey, for this I followed these
> steps: -
>
> (1) Created dataResource with mimeTypeId "application/pdf" and
> dataResourceTypeId with  "image"( I tried it with survey  and surveyResponse
> but it was giving error of not supporting)
> (2) Uploaded a pdf in which I put data for surveyQuestions.
> (3) Created a new content with contentTypeId "document" and then associated
> the created dataResource to the content.
> (4)  From surveyId tab I added pdf content id to the survey.
> (5) Then I went to the questions tab under survey and tried to apply
> questions from category drop-down(it shows name of       added content id)
> but it does not show any questions from pdf after applying the selected
> category.
>
> Are these steps are correct or am I missing something.
>
> Thanks and Regards
> Santosh Malviya
>
Reply | Threaded
Open this post in threaded view
|

Re: Generation of questions from pdf in survey

Santosh Malviya-3
Hello BJ,

If there is no provision then what does this feature do in survey and  which
kind of format it supports for generating questions.

Thanks and Regards
Santosh Malviya

On Fri, Jul 16, 2010 at 10:00 PM, BJ Freeman <[hidden email]> wrote:

> the show stopper is there is no provision to read from a Pdf and make it
> entity formatted data.
>
>
> Santosh Malviya sent the following on 7/16/2010 8:57 AM:
>
>  Hello list,
>>
>> I have to generate questions from pdf in survey, for this I followed these
>> steps: -
>>
>> (1) Created dataResource with mimeTypeId "application/pdf" and
>> dataResourceTypeId with  "image"( I tried it with survey  and
>> surveyResponse
>> but it was giving error of not supporting)
>> (2) Uploaded a pdf in which I put data for surveyQuestions.
>> (3) Created a new content with contentTypeId "document" and then
>> associated
>> the created dataResource to the content.
>> (4)  From surveyId tab I added pdf content id to the survey.
>> (5) Then I went to the questions tab under survey and tried to apply
>> questions from category drop-down(it shows name of       added content id)
>> but it does not show any questions from pdf after applying the selected
>> category.
>>
>> Are these steps are correct or am I missing something.
>>
>> Thanks and Regards
>> Santosh Malviya
>>
>>
Reply | Threaded
Open this post in threaded view
|

Re: Generation of questions from pdf in survey

BJ Freeman
you can do this through the UI, however I find loading datafiles, like
in the demo data the easiest way.
you find these files in the
specialpurpose/ecommerce/data
look at the demosurvey.xml

Santosh Malviya sent the following on 7/16/2010 11:13 AM:

> Hello BJ,
>
> If there is no provision then what does this feature do in survey and  which
> kind of format it supports for generating questions.
>
> Thanks and Regards
> Santosh Malviya
>
> On Fri, Jul 16, 2010 at 10:00 PM, BJ Freeman<[hidden email]>  wrote:
>
>> the show stopper is there is no provision to read from a Pdf and make it
>> entity formatted data.
>>
>>
>> Santosh Malviya sent the following on 7/16/2010 8:57 AM:
>>
>>   Hello list,
>>>
>>> I have to generate questions from pdf in survey, for this I followed these
>>> steps: -
>>>
>>> (1) Created dataResource with mimeTypeId "application/pdf" and
>>> dataResourceTypeId with  "image"( I tried it with survey  and
>>> surveyResponse
>>> but it was giving error of not supporting)
>>> (2) Uploaded a pdf in which I put data for surveyQuestions.
>>> (3) Created a new content with contentTypeId "document" and then
>>> associated
>>> the created dataResource to the content.
>>> (4)  From surveyId tab I added pdf content id to the survey.
>>> (5) Then I went to the questions tab under survey and tried to apply
>>> questions from category drop-down(it shows name of       added content id)
>>> but it does not show any questions from pdf after applying the selected
>>> category.
>>>
>>> Are these steps are correct or am I missing something.
>>>
>>> Thanks and Regards
>>> Santosh Malviya
>>>
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Generation of questions from pdf in survey

Matt Warnock
In reply to this post by BJ Freeman
You might try calling PDF Toolkit (pdftk), Adobe Acrobat on a PC/Mac, or
something similar to parse the data out of the PDF file so it can be
stored in OFBiz.

However, generally speaking, users might prefer a direct-entry html form
over a PDF, that has to be saved locally, altered in place, and
emailed/uploaded back.
--
Matt Warnock <[hidden email]>
RidgeCrest Herbals, Inc.

On Fri, 2010-07-16 at 09:30 -0700, BJ Freeman wrote:

> the show stopper is there is no provision to read from a Pdf and make it
> entity formatted data.
>
>
> Santosh Malviya sent the following on 7/16/2010 8:57 AM:
> > Hello list,
> >
> > I have to generate questions from pdf in survey, for this I followed these
> > steps: -
> >
> > (1) Created dataResource with mimeTypeId "application/pdf" and
> > dataResourceTypeId with  "image"( I tried it with survey  and surveyResponse
> > but it was giving error of not supporting)
> > (2) Uploaded a pdf in which I put data for surveyQuestions.
> > (3) Created a new content with contentTypeId "document" and then associated
> > the created dataResource to the content.
> > (4)  From surveyId tab I added pdf content id to the survey.
> > (5) Then I went to the questions tab under survey and tried to apply
> > questions from category drop-down(it shows name of       added content id)
> > but it does not show any questions from pdf after applying the selected
> > category.
> >
> > Are these steps are correct or am I missing something.
> >
> > Thanks and Regards
> > Santosh Malviya
> >

Reply | Threaded
Open this post in threaded view
|

Re: Generation of questions from pdf in survey

Santosh Malviya-3
Hello Matt,

Could you share how to do it with html form, I tried with html/text but it
was giving error of "Error generating PDF: java.io.IOException: PDF header
signature not found."

Thanks and Regards
Santosh Malviya


On Sat, Jul 17, 2010 at 7:00 AM, Matt Warnock <
[hidden email]> wrote:

> You might try calling PDF Toolkit (pdftk), Adobe Acrobat on a PC/Mac, or
> something similar to parse the data out of the PDF file so it can be
> stored in OFBiz.
>
> However, generally speaking, users might prefer a direct-entry html form
> over a PDF, that has to be saved locally, altered in place, and
> emailed/uploaded back.
> --
> Matt Warnock <[hidden email]>
> RidgeCrest Herbals, Inc.
>
> On Fri, 2010-07-16 at 09:30 -0700, BJ Freeman wrote:
> > the show stopper is there is no provision to read from a Pdf and make it
> > entity formatted data.
> >
> >
> > Santosh Malviya sent the following on 7/16/2010 8:57 AM:
> > > Hello list,
> > >
> > > I have to generate questions from pdf in survey, for this I followed
> these
> > > steps: -
> > >
> > > (1) Created dataResource with mimeTypeId "application/pdf" and
> > > dataResourceTypeId with  "image"( I tried it with survey  and
> surveyResponse
> > > but it was giving error of not supporting)
> > > (2) Uploaded a pdf in which I put data for surveyQuestions.
> > > (3) Created a new content with contentTypeId "document" and then
> associated
> > > the created dataResource to the content.
> > > (4)  From surveyId tab I added pdf content id to the survey.
> > > (5) Then I went to the questions tab under survey and tried to apply
> > > questions from category drop-down(it shows name of       added content
> id)
> > > but it does not show any questions from pdf after applying the selected
> > > category.
> > >
> > > Are these steps are correct or am I missing something.
> > >
> > > Thanks and Regards
> > > Santosh Malviya
> > >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Generation of questions from pdf in survey

BJ Freeman
the way I read matts reply, is you have to take it out of the pdf before
you enter it into ofbiz. then he gave reasons why this is the case.
which is, if you try to use a pdf, the responses will not be recorded
into ofbiz, but will be done on the users desktop. this would require
you to then provided a whay for the user to upload the pdf.

My perspective:
This would not be ofbiz survey but a seperate pages you created in ftl
with the pdfs linked to where the images are in ofbiz.
the page would have a link to upload the pdf, once completed, into a
folder on ofbiz.


Santosh Malviya sent the following on 7/16/2010 10:40 PM:

> Hello Matt,
>
> Could you share how to do it with html form, I tried with html/text but it
> was giving error of "Error generating PDF: java.io.IOException: PDF header
> signature not found."
>
> Thanks and Regards
> Santosh Malviya
>
>
> On Sat, Jul 17, 2010 at 7:00 AM, Matt Warnock<
> [hidden email]>  wrote:
>
>> You might try calling PDF Toolkit (pdftk), Adobe Acrobat on a PC/Mac, or
>> something similar to parse the data out of the PDF file so it can be
>> stored in OFBiz.
>>
>> However, generally speaking, users might prefer a direct-entry html form
>> over a PDF, that has to be saved locally, altered in place, and
>> emailed/uploaded back.
>> --
>> Matt Warnock<[hidden email]>
>> RidgeCrest Herbals, Inc.
>>
>> On Fri, 2010-07-16 at 09:30 -0700, BJ Freeman wrote:
>>> the show stopper is there is no provision to read from a Pdf and make it
>>> entity formatted data.
>>>
>>>
>>> Santosh Malviya sent the following on 7/16/2010 8:57 AM:
>>>> Hello list,
>>>>
>>>> I have to generate questions from pdf in survey, for this I followed
>> these
>>>> steps: -
>>>>
>>>> (1) Created dataResource with mimeTypeId "application/pdf" and
>>>> dataResourceTypeId with  "image"( I tried it with survey  and
>> surveyResponse
>>>> but it was giving error of not supporting)
>>>> (2) Uploaded a pdf in which I put data for surveyQuestions.
>>>> (3) Created a new content with contentTypeId "document" and then
>> associated
>>>> the created dataResource to the content.
>>>> (4)  From surveyId tab I added pdf content id to the survey.
>>>> (5) Then I went to the questions tab under survey and tried to apply
>>>> questions from category drop-down(it shows name of       added content
>> id)
>>>> but it does not show any questions from pdf after applying the selected
>>>> category.
>>>>
>>>> Are these steps are correct or am I missing something.
>>>>
>>>> Thanks and Regards
>>>> Santosh Malviya
>>>>
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Generation of questions from pdf in survey

Matt Warnock
In reply to this post by Santosh Malviya-3
How to do what with an HTML form?  Sounds like you're trying to get
html/text to generate or transmit a PDF, but I don't see how that would
work.  I was suggesting replacing the PDF form entirely with an HTML
version driven by a freemarker template.

Just create a simple application that uses a standard OFBiz form,
storing the survey results in a custom entity.  I'd start with one of
the 'build-an-ofbiz-app' tutorials (there are several) and just
customize the field name prompts in the freemarker template to fit the
questions that your survey needs.  The entity field names for example
could be SurveyId, Q1, Q2, ... Qn, if the form is short, or "SurveyId",
UserID", "QueryId", and "QueryResponse" for something longer.

--
Matt Warnock <[hidden email]>
RidgeCrest Herbals, Inc.

On Sat, 2010-07-17 at 11:10 +0530, Santosh Malviya wrote:

> Hello Matt,
>
> Could you share how to do it with html form, I tried with html/text but it
> was giving error of "Error generating PDF: java.io.IOException: PDF header
> signature not found."
>
> Thanks and Regards
> Santosh Malviya
>
>
> On Sat, Jul 17, 2010 at 7:00 AM, Matt Warnock <
> [hidden email]> wrote:
>
> > You might try calling PDF Toolkit (pdftk), Adobe Acrobat on a PC/Mac, or
> > something similar to parse the data out of the PDF file so it can be
> > stored in OFBiz.
> >
> > However, generally speaking, users might prefer a direct-entry html form
> > over a PDF, that has to be saved locally, altered in place, and
> > emailed/uploaded back.
> > --
> > Matt Warnock <[hidden email]>
> > RidgeCrest Herbals, Inc.
> >
> > On Fri, 2010-07-16 at 09:30 -0700, BJ Freeman wrote:
> > > the show stopper is there is no provision to read from a Pdf and make it
> > > entity formatted data.
> > >
> > >
> > > Santosh Malviya sent the following on 7/16/2010 8:57 AM:
> > > > Hello list,
> > > >
> > > > I have to generate questions from pdf in survey, for this I followed
> > these
> > > > steps: -
> > > >
> > > > (1) Created dataResource with mimeTypeId "application/pdf" and
> > > > dataResourceTypeId with  "image"( I tried it with survey  and
> > surveyResponse
> > > > but it was giving error of not supporting)
> > > > (2) Uploaded a pdf in which I put data for surveyQuestions.
> > > > (3) Created a new content with contentTypeId "document" and then
> > associated
> > > > the created dataResource to the content.
> > > > (4)  From surveyId tab I added pdf content id to the survey.
> > > > (5) Then I went to the questions tab under survey and tried to apply
> > > > questions from category drop-down(it shows name of       added content
> > id)
> > > > but it does not show any questions from pdf after applying the selected
> > > > category.
> > > >
> > > > Are these steps are correct or am I missing something.
> > > >
> > > > Thanks and Regards
> > > > Santosh Malviya
> > > >
> >
> >