tynesidegroup / adonis-pdf Goto Github PK
View Code? Open in Web Editor NEWService provider for building PDFs using pdfmake
Service provider for building PDFs using pdfmake
did not quite understand how to open and save pdf
the example is not entirely clear, the readme file needs more explanation
this error generate when I add this provider adonis-pdf/providers/PdfProvider
to in my start/app.js
actual this provider name does not look like this provider name is
adonis-pdf/providers/PDFProvider
when I put this provider to start/app.js
then it's work
so please change in documents
Can use with view edge or html??
Hi
I have this problem when trying to create a pdf file on production I get the following error :
TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Socket'
| property 'parser' -> object with constructor 'HTTPParser'
--- property 'socket' closes the circle
On the develop file is created normally on the same source code
When locally in the env file, I change NODE_ENV parameter to "production" and code is not anywhere changed i get this error to.
Source Code:
`async generatePdf({response, auth, request,}){
const {status_uuid} = request.all()
const status = await Status.query().where('uuid', status_uuid).with('investor').with('plot', builderQuery => {builderQuery.with('settlement')}).with('offer').first()
if(!status){
return response.status(422).send({error: 'Bad Status'})
}
const status_json = status.toJSON()
const investor_name = `${status_json.investor.first_name} ${status_json.investor.last_name}`
const investor_address = `${status_json.investor.street} ${status_json.investor.house_number} ${status_json.investor.zip_code} ${status_json.investor.zip_code}`
const content = [
{text: first_text( status_json.plot.settlement.name , status_json.updated_at, status_json.investor.pesel, investor_address, investor_name, status_json.plot.number, status_json.plot.name), pageBreak: 'after'},
{text: second_text( status_json.plot.settlement.name , status_json.investor.pesel, investor_address, investor_name, status_json.plot.number, status_json.offer.deposit,status_json.plot.size)}
]
await PDF.create(content, response.response)
return response.header('Content-type', 'application/pdf')
}`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.