B4J Question BANano CallInlinePHP

giannimaione

Well-Known Member
Licensed User
Longtime User
Hello,
i test example with a lib fpdf.php here
B4X:
banano.CallInlinePHP("TestPDF", CreateMap("Name": "test"), "ID1")
'
Sub BANano_CallInlinePHPResult(Success As Boolean, UniqueID As String, Result As String)
    Log(Success)
    Log(UniqueID)
    Log(Result)
'maybe I have to manipulate the result ?
End Sub
'
#if PHP
function TestPDF($Name) {
    require('fpdf.php');
    $pdf = new FPDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    $pdf->Cell(40,10,'Prova pdf!');
    $pdf->Close();
    $pdf->Output('example_006.pdf', 'D');
}
#End If
log Succes is True
log Result is:
B4X:
%PDF-1.3
3 0 obj
<</Type /Page
/Parent 1 0 R
/Resources 2 0 R
/Contents 4 0 R>>
endobj
4 0 obj
<</Filter /FlateDecode /Length 70>>
stream
......
......
endstream
endobj
6 0 obj
<</Type /Font
/BaseFont /Helvetica-Bold
/Subtype /Type1
/Encoding /WinAnsiEncoding
/ToUnicode 5 0 R
>>
endobj
2 0 obj
<<
/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
/Font <<
/F1 6 0 R
>>
/XObject <<
>>
>>
endobj
7 0 obj
<<
/Producer (FPDF 1.86)
/CreationDate (D:20240627061938+00'00')
>>
endobj
8 0 obj
<<
/Type /Catalog
/Pages 1 0 R
>>
endobj
xref
0 9
0000000000 65535 f
0000000226 00000 n
0000000865 00000 n
0000000009 00000 n
0000000087 00000 n
0000000313 00000 n
0000000747 00000 n
0000000969 00000 n
0000001052 00000 n
trailer
<<
/Size 9
/Root 8 0 R
/Info 7 0 R
>>
startxref
1101
%EOF
but the pdf file is not generated;

testing ONLY php script (test.php), works well
localhost/test.php

maybe I have to manipulate the result ?
 
Top