Comments (9)
Just updated and checked. Opened the file in Adobe Illustrator for good measure. Works perfectly. Thanks!
from qrcode.
The app I used is called QR Pop. The developer seems to utilize your library very well.
BTW, I am adding your library to my app Qrafter which is probably the oldest QR Code app on App Store that still gets regular updates. I just rewrote it using Swift, and your library was the last piece to make it perfect. :) Thank you very much again for creating such an awesome tool.
from qrcode.
Always great to hear that. Thank you so much!
from qrcode.
Hey mate, sorry to hear you're having issues.
I can see the same issues when trying to open your svg on my machine here. Very odd!
I just tried making the same style of QR code that you're showing and exported it to SVG using this code...
func testIssue19ExportSVGIssue() throws {
let d = QRCode.Document(utf8String: "This is a test")
d.design.shape.eye = QRCode.EyeShape.RoundedOuter()
d.design.shape.onPixels = QRCode.PixelShape.Circle()
let str = d.svg(dimension: 600)
try str.write(
to: URL(fileURLWithPath: "/tmp/qrcode.svg"),
atomically: true,
encoding: .utf8
)
}
which generated this file :-
Interestingly, I can view this file correctly in Finder (quicklook), Firefox, Inkscape, Safari and Sketch... these are the apps that I was using to test SVG export.
Can you tell me the settings you're using to generate the QR Code? What pixel style, what eye style? Even better, can you share your code that you're using to create the qr code?
from qrcode.
Here's an exact replica of your QR Code in svg (down to the pixels) generated using the current version of the library...
It's very odd. I'm wondering whether there's some combination of settings which is triggering the issue
from qrcode.
Ah! Would you possibly be located in a country that uses ',' as the decimal separator?
Because I believe thats the issue with the SVG export. SVG expects '.' as the decimal separator - and I'm using a NumberFormatter to format the float values in the SVG export. The NumberSeparator always uses the Locale to determine the decimal separator, thus it uses ',' which breaks the svg output
Give me a moment...
from qrcode.
Hi Darren,
Yes, that's the exact problem. I just came here to write that to say that I found the issue and you are a step ahead of me. My region uses "," instead of "." and the svg was becoming corrupt because of that. I changed the region to US to verify the issue was fixed before even touching my code.
from qrcode.
@keremerkan Okey - I've pushed up a new version (13.10.0) which should fix the issue.
Would you mind checking out the new release and see if it fixes your issue please?
from qrcode.
Brilliant mate. Thank you for reporting it - so glad I can help out.
Apologies for the inconvenience.
Oh and btw. which program in the App Store is using the library? Would be interested in having a look...
from qrcode.
Related Issues (20)
- No LogoTemplate HOT 4
- Numeric/Alphanumeric Support in QRCode External HOT 14
- Integration HOT 2
- Wrong getting image from QRCodePixelShapeFactory.shared.image HOT 2
- Can't add with package manager HOT 4
- Cannot find 'NSPoint' in scope HOT 4
- CocoaPods Podspec file support. HOT 3
- No such module 'QRCodeGenerator' HOT 12
- Circle QR HOT 1
- Enhancement suggestion: SVG images for examples HOT 9
- Enhancement suggestion: Quiet zone width option HOT 5
- Example question HOT 4
- New shiny pixel shape renders off center HOT 3
- Adding a logo template inset after creating a template seems not to affect created mask size HOT 6
- Ambiguous watchOS instructions in README.md HOT 5
- Build time Error in QRCode+Document.swift and QRCode+SVG.swift file... HOT 5
- Error in new Xcode 14 (SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060000d2b3b70):'QRCodeExternal'>)) HOT 7
- Support CocoaPods HOT 3
- XCFramework HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qrcode.