When saving as AI, layers cut using the Pathfinder fill in with "<Path>" layers in the shapes of the cutouts.
ctk-4200_sm.pdf To see this bug, open this PDF, then save it as AI without making any changes. Open the new AI file, and look at the parts that got filled in.
In addition, saving it as SVG offsets some of the shapes a tiny bit. To see that, simply save it as SVG without making any changes, open the exported SVG, and look closely at both.
In addition:
- When saving as PDF after splitting some layers (which can be done by duplicating a the layer and deleting opposite shapes on each one), they sometimes merge back together into one layer (although nothing looks different in the file itself).
- Every file converts to and saves as AI when put into Vectorpea instead of saving back to the original file, unlike in Photopea.
I have fixed the problem with exporting your PDF file as AI!
When you export a SVG, the coordinates of points are rounded to 1/10 of a pixel, so there could be an error of up to 1/20th of a pixel (from the original coordinate). I think it does not mind in practice.
Elements inside a PDF file are not structured into groups in any way. Photopea merges together as many objects as possible, to keep the number of layers low. But maybe we could do it differently in Vectorpea and keep each object separate.
OK, this is now partially resolved. However, I will show you the PDF layer merging issue in more detail shortly.
I have made Vectorpea work differently. It will not merge layers with the same style anymore, when loading a PDF.
Your original PDF file has about 2x more layers now, when opened in Vectorpea.
LCD display diagram demonstration with my issues
PDF merging layers on export
Before (every separate LCD in this diagram is on its own layer):
After (several LCDs merged themselves, you can see the color-coding for the LCD sets that merged):
PDF to SVG object offset (LCD spacing is no longer even)
Before export
After export
Could you please try all this in the version of Photopea that I have published eight minutes ago?
Another set of issues, please use this file for demonstration: !!_base_lcd2.pdf
- When merging the two layers in this document, the "4" fills in. You can sort of fix this by using the "Trim" pathfinder on these layers, swapping the two layers, and then then clicking Merge. However, the layers get put in a <Group> folder when you do that. This also happens with other vectorized letters and numbers with holes (e.g. a, b, d, e, g, o, p, q, A, B, D, O, P, Q, R, 4, 6, 8, 9)
- Unlike Photopea, saving a PDF, SVG, etc. in Vectorpea. automatically saves it as AI instead of writing to the original file (if permissions are granted).
- I can't select all layers with ⌘V (Command + V). This is on Google Chrome on macOS.
- The Pathfinder Tool is hidden by default, and I often take up to 15 seconds trying to find the option to enable it for layer merging. To make it less annoying, please turn it on by default, but don't automatically open the Pathfinder interface.
- How do I make an irregularly-shaped selection?
"When merging the two layers in this document, the "4" fills in." - how do you merge layers? Where should I click to see the problem?
"When merging the two layers in this document, the "4" fills in." - how do you merge layers? Where should I click to see the problem?
- Select both layers in the right-hand panel.
- Open the Pathfinder.
- Click "Merge".
I have fixed the problem with merging shapes with holes. Also, now, Pathfinder will always be in a sidebar, when you open Vectorpea for the first time.
Selecting all layers with Command+V? Is it a well-known shortcut of some software?
I have fixed the problem with merging shapes with holes. Also, now, Pathfinder will always be in a sidebar, when you open Vectorpea for the first time.
Selecting all layers with Command+V? Is it a well-known shortcut of some software?
- I don't know what software has a shortcut for selecting all layers.
- Unlike Photopea, saving a PDF, SVG, etc. in Vectorpea automatically saves it as AI instead of writing to the original file (if permissions are granted).
- Some object hitboxes are a bit off and clicking in certain areas doesn't select the object, but instead automatically deselects everything even while holding Shift, it especially happens when clicking not in the center of objects. To reproduce, download the file below, change the extension to AI, open it in Vectorpea, zoom in, and click on certain parts of some objects while holding Shift. The file extension was changed during the import because .AI files aren't supported in GitHub comments. lcd.txt
Oh no! The letter merging fill-in issue is back! To reproduce, download this file, rename the extension to .ai, open it in Vectorpea, then merge one of the following layers with any other layer in the Pathfinder:
- Path 44 (a g)
- Path 43 (♭) lcd.txt
In addition, some layer merges (usually occurs when merging a layer with one that is blank), it displays an error in the developer console (Ctrl + Shift + I) and doesn't merge the layers (if multiple layers with content are selected alongside the blank layer). To fix this:
- Blank layers are ignored or disappear.
- Trying to merge a single layer with one with no content, as well as anything else that triggers
Uncaught TypeError: Cannot read properties of undefined, would display an alert.
The problem with merging shapes with "holes" should be fixed now. Also, if you open an SVG or a PDF file, pressing Ctrl+S will replace the original file.
The SVG export offset issue, which you still haven't fixed, is preventing me from creating accurate LCD diagrams in SVG format. This happens even when the PDF is exported to SVG with a multiplied image scale. To reproduce, simply download the PDF below, and rename the extension to AI. Then, open it in Vectorpea, and export it as SVG with a scale of 1000%. lcd.pdf
In addition, I can't instantly scale a file to a specific size in the editor without exporting it. I want to scale the entire AI file to 10x its normal size.
The final issue is the automatic deselection of everything even while Shift is being held when clicking an area where there are no objects, forcing me to manually reselect those objects again.
I tried to export your PDF file as an SVG at 1000%, but I do not see any issues. Could you share a screenshot and highlight the problem in that screeshot?
PDF to SVG object offset (LCD spacing is no longer even)
Before export
After export
I can not see your images :( could you check your comment?
I can not see your images :( could you check your comment?
I can see them. Please look at this comment again: https://github.com/photopea/vectorpea/issues/87#issuecomment-3148723400
are you talking about the skewed rectangles, that have edges which are not perfectly parallel?
Yes.
I think I have fixed it. If you don't enable "minify", the precision should be better now.
It works, but only without "minify" enabled. It would be cool to be able to select which aspects of the SVG to minify and which ones to keep (e.g. keep precision but remove layer names and folders) to keep the file size as small as possible while keeping the precision.
so many options would be very confusing for the average user