Giter Site home page Giter Site logo

adonis-pdf's People

Contributors

liam-p-idhl avatar mann-o avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

adonis-pdf's Issues

not clear description

did not quite understand how to open and save pdf
the example is not entirely clear, the readme file needs more explanation

Cannot find module 'adonis-pdf/providers/PdfProvider'

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

Cannot create a pdf file on production.

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')



	}`

unknown
corgi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.