Why should it be A4 instead of the same dimensions as png?
Show HN: PNG to PDF Conversion in the Browser
11–20 of 25 posts
Re: Show HN: PNG to PDF Conversion in the Browser
#12Why should it be A4 instead of the same dimensions as png?
Re: Show HN: PNG to PDF Conversion in the Browser
#13Really neat! Thanks for these. Can you tell me how to generally go about making these converters? I've always wondered how all these file conversions (especially the image ones) are developed. Is it specific for one file type to another or is there some general method which can be used? How is this achieved in the browser itself?
Most of these go through a canvas element, which is something a browser can "draw on". For conversion from jpg to png for example you don't need any libraries at all because your webbrowser can read and write both of these formats: "draw" jpg on a canvas and read it as png, done. For others like heic and pdf I used open source JS libraries such as pdfJS.
Re: Show HN: PNG to PDF Conversion in the Browser
#14For folks who need an offline tool, macOS has it in the right-click menu for most file formats under > Quick Actions.
Re: Show HN: PNG to PDF Conversion in the Browser
#15For folks who need an offline tool, macOS has it in the right-click menu for most file formats under > Quick Actions.
Hmmm, that sounds like something I'd consider upgrading up from Mojave for.
Re: Show HN: PNG to PDF Conversion in the Browser
#16Re: Show HN: PNG to PDF Conversion in the Browser
#17Why would you want to convert a PNG to PDF? I don't understand the point.
Re: Show HN: PNG to PDF Conversion in the Browser
#18Why would you want to convert a PNG to PDF? I don't understand the point.
Re: Show HN: PNG to PDF Conversion in the Browser
#19Why would you want to convert a PNG to PDF? I don't understand the point.
One example is that students often have to turn in files in PDF format but may not have a scanner for handwritten papers. It's not amazing quality, but this let's you take a photo with your phone and convert it to PDF for submission.
(For example, Microsoft Lens: https://apps.apple.com/ca/app/microsoft-lens-pdf-scanner/id9...)
Re: Show HN: PNG to PDF Conversion in the Browser
#20Earlier quoted context omitted.
One example is that students often have to turn in files in PDF format but may not have a scanner for handwritten papers. It's not amazing quality, but this let's you take a photo with your phone and convert it to PDF for submission.
There are bespoke tools for scanning documents with your phone and exporting to PDF. The quality is MUCH better this way, as it automatically crops, aligns, and dewarps the image, plus applies filters to adjust the colours. You would have a hard time differentiating this from a proper scan. (For example, Microsoft Lens: https://apps.apple.com/ca/app/microsoft-lens-pdf-scanner/id9... )