Hi, well here comes my problem. I'm working on a function that will
generate PDF files automatically using files already existing. I'm
using pdftk utils to generate those files and everythings is working
just fine when testing in localhost on my laptop (I'm running windows
vista on it). But when I come to deploy the application on my server
(unix of course) and test the function, nothing occurs, seems that the
function is not executed (I don't even have a error message...). here
comes the code for the execution of the function:


# Merging front page and PDF
system("#{RAILS_ROOT}/public/products/pdftk #{RAILS_ROOT}/public/
orders/order#{order.id}/products/frontPage#{product.id}.pdf #
{RAILS_ROOT}/public/products/#{formatedProductName}.pdf cat output #
{RAILS_ROOT}/public/orders/order#{params[:id]}/products/finalPDF#
{product.id}.pdf")

while !File.exist?("#{RAILS_ROOT}/public/orders/order#{params[:id]}/
products/finalPDF#{product.id}.pdf")
      # We wait...
end

RAILS_DEFAULT_LOGGER.info("\n\n#{RAILS_ROOT}/public/orders/order#
{params[:id]}/products/finalPDF#{product.id}.pdf created\n")

# Generating password protected PDF
system("#{RAILS_ROOT}/public/products/pdftk #{RAILS_ROOT}/public/
orders/order#{params[:id]}/products/finalPDF#{product.id}.pdf output #
{RAILS_ROOT}/public/orders/order#{params[:id]}/products/#
{formatedProductName}_#{params[:firstname].tr('\'','')}_#{params
[:lastname].tr('\'','')}.pdf owner_pw #{adminAccessPassword} user_pw #
{customerAccessPassword}")

while !File.exist?("#{RAILS_ROOT}/public/orders/order#{params[:id]}/
products/#{formatedProductName}_#{params[:firstname].tr('\'','')}_#
{params[:lastname].tr('\'','')}.pdf")
        # We wait...
end

The files and paths are correct, I verified several times. pdftk is
correctly installed on the server (I tested executing those two
commands manualy on the server, it worked perfectly and I could get
the files generated).

It's pretty urgent, I've tested changing "system" for backquotes and
nothing. Any idea would be welcome ^^?

Olivier.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to