I am new to using APIs on laravel. I read through PHP GuzzleHttp, but i couldnt comprehend how to corelate it with ReportingCloud. I am trying to use
ReportingCloud Docs from https://docs.reporting.cloud/docs/chapter/introduction/whatisreportingcloud . Having followed the documentation, on https://docs.reporting.cloud/docs/chapter/introduction/first page shows generation a pdf version of invoice. i still dont get the code behind downloading of the pdf file. I tried checking if my template file exist which shows postive. i try using https://docs.reporting.cloud/docs/endpoint/document/merge on merging data to your template and it works fine.
my problem is how to get those files downloaded on my computer
Related
I tried using pdftk library from mikehaertl. I installed the composer file needed. But no pdf file is being generated. I also tried using the exact codes in mr.digital yt vid, still no file. Ive tried tweaking some codes like removing the access, uninstalling the lib and reinstalling it again.
You can check here the exact codes i tried using.
https://github.com/mrdigitalau/PHP-PDFTK-Tutorial
I removed the request methon from generate PHP file and define access with the generatePDF file from classes. Any help? Thankyou
Generate a downloadable PDF file and it should be automatically saved in the folder that is declared in the codes as well
Im working on a Laravel backend and I need to edit a PDF file allocated in a s3 bucket. When I try opening the PDF with $pdf->setSourceFile($url) I get an error saying Given stream is not seekable!
I can get the file contents using Storage::disk(ENV('FILESYSTEM'))->url($url);, and return it to the front end and that works fine, so I know the path and the permissions are correct. I would like to the content to the setSourceFile($contents) method, intead of the url. is there any way to do this?
By the way, Im using the Laravel filesystem
Edit: I have tried copying the file from s3 to the server and then open it with PDF. I couldn't reach it, but I don't think that's a good way to do it.
First of all: You cannot edit a PDF document with FPDI
As the error message says, the source stream needs to be seekable which seems not be the case with the stream wrapper you're currently using.
You should download the file and create a reader instance of it:
$pdf->setSourceFile(StreamReader::createByString($pdfString));
I'm using Google app engine 1.9 and I want to unzip a uploaded .zip file using PHP. Since the ZipArchive is not available in App Engine I tried using PclZip (http://www.phpconcept.net/pclzip/) as described in this post
https://code.google.com/p/googleappengine/issues/detail?id=9856
However, once I tried it, I get the following error.
Here, I'm giving the public url of the .zip file. And the url is something like https://my-storage.storage.googleapis.com/folder/my_file.zip (This is not the real url).
"PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file 'https://my-storage.storage.googleapis.com/folder/my_file.zip'"
I also tried changing the url as gs://my-storage/folder/my_file.zip' format and it gives me the following error.
"PCLZIP_ERR_BAD_FORMAT (-10) : Unable to go to the end of the archive 'gs://my-storage/folder/my_file.zip'"
What am I doing wrong here?
I am having problem running script of PHPWord.
I am trying to run sample example. Text.php after running it doesn't show anything. I checked it loads class successfully. Documentation.
I would like to able to run script anyone has this problem.
This is what i did -
Downloaded PHPWord_0.6.2_Beta.zip from Download link.
Extracted the zip under htdocs/core/phpword.
Created swap.php and pasted the whole code what was mentioned at Link
Commented, this is it was showing error.
//$myTextElement->setBold();
//$myTextElement->setName('Verdana');
//$myTextElement->setSize(22);
Now i run swap.php file and helloWorld.docx successfully created. You can flag a message if you want in that file. Let me know if you have any query.
Im currently working on a cms, and building an ajax / php remote updater script. The cms files are located on Github, and im using the API to get the file changes and source of those changes. As you can see here: https://api.github.com/repos/Plexis/Plexis/commits/116743cefde6765a4d4a8d0558bd17c4908dd586
Under "files" it lists all the changed files. The problem is, renamed / moved files. I cant seem to get a solid idea of how to get the original file so i can unlink it with php. If i try to get all the trees, that can take a ajax request per directoy... That's just too much. Anyone have an idea where i can get the source file's name and location before it was renamed / moved?
Might ask your changes as you're doing now, then for new files do not exist or could you try
https://api.github.com/repos/{user}/{repo}/commits?path={file.path}
for get her history. You can try with the hast too, the hash is the same event if the file has a diferent name