Skip to content
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

PArameter documentation #426

Closed
B0rner opened this issue Nov 15, 2023 · 2 comments
Closed

PArameter documentation #426

B0rner opened this issue Nov 15, 2023 · 2 comments
Assignees
Labels

Comments

@B0rner
Copy link

B0rner commented Nov 15, 2023

Hey,

in the readme.md there is an example, how to use the class, like this:

$result = Builder::create()
->writer(new PngWriter())
->writerOptions([])
->data('Custom QR code contents')
->encoding(new Encoding('UTF-8'))
->errorCorrectionLevel(ErrorCorrectionLevel::High)
->size(300)
->margin(10)
->roundBlockSizeMode(RoundBlockSizeMode::Margin)
->logoPath(DIR.'/assets/symfony.png')
->logoResizeToWidth(50)
->logoPunchoutBackground(true)
->labelText('This is the label')
->labelFont(new NotoSans(20))
->labelAlignment(LabelAlignment::Center)
->validateResult(false)
->build();

But I can't found any documentation about the valid parameters.

For example: errorCorrectionLevel(ErrorCorrectionLevel::High) What are the possible values?
Or what does 300stands for in ->size(300)? px? pt? em? I use size 300 with base64 output, but the image isshow very large. Maybe scaled by the browser maybe generated in >300px

Are there any alternative parameters for ->roundBlockSizeMode(RoundBlockSizeMode::Margin)??

Is there a detailed documentation for all the parameters, also for the writer, etc.?

@endroid
Copy link
Owner

endroid commented Nov 15, 2023

Hi @B0rner you can find the valid ErrorCorrectionLevel values in the enum and your IDE will suggest the available values when developing, the size is generally in pixels and the RoundBlockSizeMode values can be found in the enum and are documented at https://github.com/endroid/qr-code#round-block-size-mode. Good luck!

@endroid endroid closed this as completed Nov 15, 2023
@endroid endroid self-assigned this Nov 15, 2023
@B0rner
Copy link
Author

B0rner commented Nov 15, 2023

Thank you for answering that question so fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants