You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue when attempting to merge PDF files using the IlovePDF API. Although my credits are being deducted each time I run the code, the downloaded PDF file ends up being empty (no content).
Here is the code I am using for the merge operation:
`$ilovepdf = new Ilovepdf(env('ILOVEPDF_PUBLIC_KEY'), env('ILOVEPDF_SECRET_KEY'));
// Start a merge task
$merger = $ilovepdf->newTask('merge');
// Add the tender PDF to the merge task
$merger->addFile(storage_path('app/files/toc/tender/bid/Tender_'.$tender->bid_no.'.pdf'));
// Rest of Documents
foreach ($TocsWithDocumentsAttached as $key => $section) {
foreach ($section as $serial => $toc) {
$merger->addFile(storage_path('app/'.$toc->file));
}
}
// Execute the merge task
$merger->execute();
$merger->download();
`
Steps to Reproduce:
Initialize the IlovePDF client with valid API keys.
Start a merge task and add multiple PDF files.
Execute the merge and attempt to download the resulting PDF.
Expected Behavior: The merged PDF should contain the content of all added files.
Actual Behavior: The downloaded PDF file is empty.
Additional Information:
I've verified that the file paths are correct and the files exist before merging.
No errors are thrown during the execution of the merge task.
Any help in resolving this issue would be greatly appreciated! Thank you.
The text was updated successfully, but these errors were encountered:
I'm experiencing an issue when attempting to merge PDF files using the IlovePDF API. Although my credits are being deducted each time I run the code, the downloaded PDF file ends up being empty (no content).
Here is the code I am using for the merge operation:
`$ilovepdf = new Ilovepdf(env('ILOVEPDF_PUBLIC_KEY'), env('ILOVEPDF_SECRET_KEY'));
// Start a merge task
$merger = $ilovepdf->newTask('merge');
// Add the tender PDF to the merge task
$merger->addFile(storage_path('app/files/toc/tender/bid/Tender_'.$tender->bid_no.'.pdf'));
// Rest of Documents
foreach ($TocsWithDocumentsAttached as $key => $section) {
foreach ($section as $serial => $toc) {
$merger->addFile(storage_path('app/'.$toc->file));
}
}
// Execute the merge task
$merger->execute();
$merger->download();
`
Steps to Reproduce:
Initialize the IlovePDF client with valid API keys.
Start a merge task and add multiple PDF files.
Execute the merge and attempt to download the resulting PDF.
Expected Behavior: The merged PDF should contain the content of all added files.
Actual Behavior: The downloaded PDF file is empty.
Additional Information:
I've verified that the file paths are correct and the files exist before merging.
No errors are thrown during the execution of the merge task.
Any help in resolving this issue would be greatly appreciated! Thank you.
The text was updated successfully, but these errors were encountered: