We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug japanese font error i am using sail
To Reproduce public function generatePdf($jasperFile, $outputName = null) {
if (!file_exists($jasperFile)) { Log::error("Jasper file not found: $jasperFile"); return [ 'success' => false, 'message' => 'Jasper file not found' ]; } if (!$outputName) { $outputName = pathinfo($jasperFile, PATHINFO_FILENAME); } $outputDir = storage_path('app/reports/output/JPN'); if (!is_dir($outputDir)) { mkdir($outputDir, 0755, true); } $output = $outputDir . '/' . $outputName; $options = [ 'format' => ['pdf'], 'locale' => 'en', 'params' => [ 'HEADER_USER_ID' => 25 ], 'locale' => 'ja_JP', ]; // putenv('CLASSPATH=' . '/var/www/html/docker/sail_8.4/fonts/NotoSansJP-Regular.jar'); try { $jasper = new PHPJasper; $result = $jasper->process( $jasperFile, $output, $options, )->execute(); Log::info("Jasper processing completed successfully."); Log::info("Jasper processing output: " . ($result ?? 'No output')); $pdfFile = $output . '.pdf'; if (file_exists($pdfFile)) { return [ 'success' => true, 'message' => 'PDF generated successfully', 'file_path' => $pdfFile ]; } else { Log::error("PDF generation completed but file not found: $pdfFile"); return [ 'success' => false, 'message' => 'PDF generation completed but file not found' ]; } } catch (Exception $e) { Log::error("Error generating PDF: " . $e->getMessage()); return [ 'success' => false, 'message' => 'Error generating PDF: ' . $e->getMessage() ]; } }
Screenshots
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
japanese font error i am using sail
To Reproduce
public function generatePdf($jasperFile, $outputName = null)
{
Screenshots
The text was updated successfully, but these errors were encountered: