by IvanK_net · 6y ago · 0 comments
While other editors "add stuff on top of PDF", Photopea "chews through" each byte of a PDF, and tries to make as much sense of it as possible.
You can rewrite the existing text (with the same formatting), edit bézier curves, edit gradient fills. You can edit bitmaps on a pixel level. You can see the parameters as CSS or export it into an SVG.
Also, it is free. People open about 150,000 PDF files a month in it, but I hope it will get more popular in the future.
Demo PDF: https://www.photopea.com/api/img2/WEBSITE-ZLONIN-uprava.pdf
Photopea: https://www.photopea.com#%7B%22files%22:%5B%22https://www.ph... (press T and click into the text to edit it)
But it does indeed import each element of the PDF as a separate layer, and you have PDF export with options to leave text as-is, rasterize text, or vectorize it.
Two questions:
1) Does it set the resolution of the Photopea file, and the default resolution to re-export the PDF, to trying to detect the original resolution of images in the PDF? So that by importing and exporting, you're going to have a PDF of approximately the same quality and filesize?
2) Are you able to handle embedded fonts, including subsetted fonts? I assume that in that case you would vectorize it and wouldn't be able to type new characters... just want to know if I'm wrong in assuming that?
Thanks again a million times over for Photopea. It remains my absolute #1 inspiration of what one developer on their own can do. Never ceases to amaze. :)
That means, that PDF does not contain any DPI information. It is not needed at all. PDF rasterizer (e.g. a raster printer) can render it at any DPI. Photopea decodes and saves back bitmaps inside PDF in the original resolution. The rest is vector graphics.
2) For now, Photopea ignores embedded fonts. But it extracts the font name and in 98 % of cases, we already have the required font in our database of fonts, so we can render it identically.
That's why page dimensions are things like "/CropBox [0.0 0.0 595.27576 841.89001]". PDF points are the same as Postscript points, 1/72 of an inch, that is 25.4/72 mm. So those numbers mean a page 210mm wide and 297mm high: A4.
Any chance you will package it for desktop? It would be great for Linux.
Perhaps packaging it with electron could be an option, but it's an additional burden (I know by experience) that I'm not so sure is worth it.
Nice to see that you have the Photoshop UI there so I don't have to relearn anything.
[0]: On my machine: HEIC, JPEG, JPEG-2000, OpenEXR, PDF, PNG, TIFF
I've immediately posted it on HN (hopefully I won't be downvoted just for linking my own post).
Two suggestions: 1. Make it clear to users why install button is greyed out. I know it, but most won't. 2. Allow login with any oauth provider, not everyone likes to be tracked across the web
Is there a way to change resolution during editing? When I zoom in in Photopea, I can see individual pixels of text characters. With some PDFs pixels show up sooner, making text barely readable during editing.