I have a 'design' web page which have some design templates frame with some theme images and colors. and i want to convert this web page to an image. I tried to use imgKit
, wkhtml2image
gem but it is only displaying Login page as image, It is not showing the page which we require. I tried to go with "html2canvas" as well but it only displays layout. It does not display the page content. Please see the code:
def design_update
respond_to do |f|
f.json do
just_promo_params = promotion_params
theme_params = just_promo_params.delete(:theme_attributes)
if ThemeEngine::UpdatesThemeWithHistory.update_with_promotion(
promotion,
just_promo_params,
theme_params,
current_user)
ASNWithControllerContext.instrument 'promotion.saved_design',
context: self,
promotion: promotion
render status: 200, json: {errors: []}
else
render status: 200, json: {errors: [promotion.errors.full_messages]}
end
end
end
end
I have to convert this json content into image. Any ideas how to do this?
Aucun commentaire:
Enregistrer un commentaire