phantommagick
phantommagick copied to clipboard
Can not save image into directory
Hello @alanhr @patrickcurl @anam-hossain @alanhr @dwightwatson
This one is awesome. But I got something is missing in my application. Can I get some guide from you ?
My method :
$bg_path = public_path()."/tickets/ticket_bg.jpg";
$options = [
'width' => 500,
'height' => 300,
'quality' => 90
];
$conv = new \Anam\PhantomMagick\Converter();
$tnm= $ticket->ticket_number;
$ticket->ticket_number= substr($ticket->ticket_number,0,-4).'****';
$conv->addPage(TicketController::ticket_html($ticket))
->setImageOptions($options)
->toJpg()
->save(public_path().'/assets/tickets/P-'.$tnm.'.jpg');
}
this one is not showing any error .. But doesn't store any file into my local folder . May I need to do anything more ?
Note : install packages and added into app.php file according to your instruction. I checked the libraries / dependencies are working.
When I print_r($conv) at last its showing this one : http://prntscr.com/cyupr8 (screenshot)
@selimppc In which operating system your app running on?
Most of the cases, these errors are related to wrong PhantomJs library installed to the system.
Dear Anam
I use Mac osx and Ubuntu 16.04.. Also tried to host gator shared Linux server.
Would you please guide me
On 27 Oct 2016 06:13, "Anam Hossain" [email protected] wrote:
@selimppc https://github.com/selimppc In which operating system your app running on?
Most of the cases, these errors are related to wrong PhantomJs library installed to the system.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/anam-hossain/phantommagick/issues/22#issuecomment-256512714, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZ3pKEM1pVsf8kAeTEc6OXPC0K5ASADks5q3-yBgaJpZM4KgV-b .
Were you able to solve the issue i am facing the same issue on Windows 7 (64 bit) with phantom js 2.2.1 installed?
i am facing same issue Below is log error
PHP Parse error: syntax error, unexpected '/' in bin/phantomjs on line 7683 Conversion failed.
Dear Mr. Anam,
Would you please share your latest repo so that I can check and resolve?
On Wed, May 2, 2018 at 3:26 PM, umerzafar2003 [email protected] wrote:
i am facing same issue Below is log error
PHP Parse error: syntax error, unexpected '/' in bin/phantomjs on line 7683 Conversion failed.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/anam-hossain/phantommagick/issues/22#issuecomment-385918046, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZ3pCkmPzLZzrRZGwKxzZw-IqAQbfQsks5tuXvAgaJpZM4KgV-b .
@selimppc I have same problem, Did you fixed it?
I'm currently having the same issue on mac osx
$conv = new \Anam\PhantomMagick\Converter();
$conv->source($dataPage)
->setBinary('/usr/local/bin/phantomjs')
->toPng()
->save('./datas/test.png');
I am also face the same issue. It's working in the local system, But not working in server Anybody fixed the issue?
I solved this by installing all phantomjs dependencies.
https://www.vultr.com/docs/how-to-install-phantomjs-on-ubuntu-16-04
Works fine!