⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Print with an specific layout



Meh

Meh
  • profile picture
  • Member

Posted 20 October 2016 - 17:13 PM

Hi to all.

 

I'm working on a system to register old videotapes information into a database, the idea of this is to print a label for each tape within it's content. I already create the CRUD based on the database, but now I need to print each record with an specific layout so that the information fits the label design.

 

I have a .css file with all the measures of how it have to look, but I don't know how to relate it to the print file in Grocery CRUD

 

This is a sample of the layout:

sample.png


semsik

semsik
  • profile picture
  • Member

Posted 16 November 2016 - 20:53 PM

Maybe a bit late but i only started grocery crud recently.the api should provide the info you are looking for.


Personally i would unset print button like this
http://www.grocerycrud.com/documentation/options_functions/unset_print

And add action like this
http://www.grocerycrud.com/documentation/options_functions/add_action

With the added action u redirect to your controller containing the code that generates the label you like it print.

Regards
Semsik

larasmith

larasmith
  • profile picture
  • Member

Posted 23 November 2016 - 13:33 PM

Semsik is right. I use the same approach 😀