-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cariage return character is wrongly written #175
Comments
It seems that Photoshop puts |
@Agamnentzar, thank you for your quick response, ok, I see. |
The problem is that the data in that section looks like this: And I have no way of figuring out which numbers map to what property names, I managed to figure out some of the fields by just changing fields in Photoshop and seeing which one of these change values, but that doesn't work for all of the fields, so I'm stuck at this point until I have some way to find what these fields are. (My guess for why it is this way is that they wanted to compress the data so they replaced property names with numbers, and Photoshop has some internal dictionary that can translate numbers to names) |
Did you try if it works without |
@Agamnentzar, I see quite clearly the problem because I once built a rough .ai writer (less advanced than yours though) and had to deal with this kind of data also 😄 |
Hello and once again, thank you for the great work with this library which helps me so much ! 😊
Working with the following file:
input.zip
That looks like this in Photoshop:
![image](https://private-user-images.githubusercontent.com/11247504/331151903-5ed79be7-afbc-46dd-bee8-0744225874ad.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzgxNjYsIm5iZiI6MTczODk3Nzg2NiwicGF0aCI6Ii8xMTI0NzUwNC8zMzExNTE5MDMtNWVkNzliZTctYWZiYy00NmRkLWJlZTgtMDc0NDIyNTg3NGFkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAxMjQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0Y2ZkODExM2E4YjJiMzcwNGYxYzBiMTdhMjAyZGNiMjA0YmM2ZWY2M2MxZWE2MGUzZDhlNGViMWUyNjFiYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eMx7tSkBgWKkjf73lHn_UZEZfrVeNadG92fZL7qHpXs)
Notice the text has a paragraph spacing set so the line 3 is separated from the line 2 by the expected gap but this gap is not between the line 1 and 2 because they are separated by a carriage return character and not a line break character.
So if we take this file, read it and write it using the library, like this:
It then looks like this:
![image](https://private-user-images.githubusercontent.com/11247504/331153364-a75d97bb-3820-4492-827d-9fd6cf1f05a0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzgxNjYsIm5iZiI6MTczODk3Nzg2NiwicGF0aCI6Ii8xMTI0NzUwNC8zMzExNTMzNjQtYTc1ZDk3YmItMzgyMC00NDkyLTgyN2QtOWZkNmNmMWYwNWEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAxMjQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlOTViZjE4NzgxYWI5NTdkYzkwODMwMmMyNzZlOGNkOWNhZDU3NDA4ZmYzNDAzNzQ4OTk3NmYyMzU1YjBlYTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Y6Q_Nqt6YbasWnulAcgMqKP4BF9LclxAJsAxy9MqGDc)
For some reason, the carriage return character is not preserved.
I tried to play with it a bit using this code, to try all possible line breaks characters that I knew but none seems to produce the expected result:
And here's the visual result:
![image](https://private-user-images.githubusercontent.com/11247504/331154812-7ecab50e-cd90-4397-8677-e00ea3e66621.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NzgxNjYsIm5iZiI6MTczODk3Nzg2NiwicGF0aCI6Ii8xMTI0NzUwNC8zMzExNTQ4MTItN2VjYWI1MGUtY2Q5MC00Mzk3LTg2NzctZTAwZWEzZTY2NjIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDAxMjQyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0NmQ4MDk0NDUyYzQyM2QzYjMyZmUxN2JhODYxNjcxZDVhYzI1MWU2MTIzYzk0MWRjMzIwZmYxMjY4MjI5MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iYjUYjLFuKNhrWj5aZounHk6ydIxN8R8V1MNgi0w3-Y)
Hoping you can help with this 🤞
The text was updated successfully, but these errors were encountered: