Ganesh Ranganathan wrote in post #1141109:
> On Thu, Mar 27, 2014 at 1:04 AM, masta Blasta <[email protected]>
> wrote:
>
>> I'm pretty certain though that there is nothing out there that will
>> parse an adobe illustrator file for you.
>>
>
> Thanks masta. Is there any intermediate file format that both Prawn and
> Illustrator/Indesign can talk with. The person designing the report only
> knows these two tools which

No. It just can't work that way.

Prawn uses its own syntax (DSL) to create a PDF. It is ruby code that 
has to be written from scratch.

Something like wicked_pdf, turns an HTML document into PDF. That means 
you need your document to be an ERB template that you can then use the 
plugin on to get a PDF.

There is no way to automate the process in the way that you want - Read 
.ai, parse .ai, find my fields, plug in these values into those fields, 
spit out a PDF. That is such a hugely monumental process, that I don't 
even think any proprietary Adobe software does it.

Rails can do a lot of things, but not that.

You need to MANUALLY turn your illustrator file into a template.pdf.erb 
file (which is the same as a .html.erb file). You will need styles, 
proper HTML, the whole works.
Then you make a controller action to accept the pdf mime type
    respond_to do |format|
        format.pdf {}

then follow the instructions on the wicked_pdf gem for all the other 
configurations. It's not a simple process because of the wkhtmltopdf 
binary.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/5e3ff2c31bcaa20c00aae945a84369e9%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to