question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use --landscape = true option

See original GitHub issue

I tried many times with command line

electron-pdf --input https://google.com --output ~/Desktop/test.pdf -l true -p Letter -w 2

However, I got the error window, then, I cannot generate the PDF with landscape

Shutting down...
Electron(91071,0x7fffc48183c0) malloc: *** error for object 0x7f934e6bacc0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug```

The command without `-l` option works well

electron-pdf --input https://google.com --output ~/Desktop/test.pdf -p Letter -w 2`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
codecounselorcommented, Apr 27, 2017

I’ve reproduced it, leave true off and just set -l (this is what the readme shows, but the description is confusing so I will update that)

If you set DEBUG you can see the options sent to printToPDF

> DEBUG=electron* electron-pdf --input http://google.com --output test.pdf -l -p Letter -w 2
Thu, 27 Apr 2017 18:15:47 GMT electronpdf:debug: { marginsType: 1,
  printBackground: true,
  printSelectionOnly: false,
  pageSize: 'Letter',
  landscape: true }
Thu, 27 Apr 2017 18:15:47 GMT electronpdf:info: Export Complete
Shutting down...

when you set -l true the value becomes 'true' which crashes things.

0reactions
Tin-Nguyencommented, Apr 27, 2017

thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

While generating pdf, landscape option doesn't work #3834
We are trying to generate pdf using puppeteer. Previously we had the landscape option working on Puppeteer 1.5.0 and node 8.9.4.
Read more >
Android - Emulator in landscape mode, screen does not rotate
Another answer here: in my case the problem was simply that the auto-rotate setting in the android emulator settings (accessible pulling down the ......
Read more >
SwiftUI: Force orientation on a pe… | Apple Developer Forums
I have a SwiftUI application in development, and for most screens, I'm fine with them being either landscape or portrait, and making designs...
Read more >
How to force landscape or portrait mode in apps like ...
The option always forces your screen to show content in landscape mode, regardless of what app you're using and how you're holding your ......
Read more >
Why won't my game rotate to Landscape orientation?
In the “Settings” display, scroll down to the “Lock Orientation” option. Review the current setting to ensure it is either set to “auto”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found