Showing preview only (1,954K chars total). Download the full file or copy to clipboard to get everything.
Repository: QuestPDF/library
Branch: main
Commit: 83195ce94769
Files: 479
Total size: 1.8 MB
Directory structure:
gitextract_ymraibqd/
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── companion_app_feedback.md
│ │ └── feature_request.md
│ ├── SECURITY.md
│ └── workflows/
│ └── main.yml
├── .gitignore
├── LICENSE.md
├── README.md
└── Source/
├── .config/
│ ├── dotnet-tools.json
│ └── stryker-config.json
├── .editorconfig
├── QuestPDF/
│ ├── Build/
│ │ ├── QuestPDF.targets
│ │ └── net4/
│ │ └── QuestPDF.targets
│ ├── Companion/
│ │ ├── CompanionExtensions.cs
│ │ ├── CompanionModels.cs
│ │ ├── CompanionService.cs
│ │ ├── Helpers.cs
│ │ ├── HotReloadManager.cs
│ │ └── Previewer.cs
│ ├── Drawing/
│ │ ├── DocumentCanvases/
│ │ │ ├── CompanionDocumentCanvas.cs
│ │ │ ├── DiscardDocumentCanvas.cs
│ │ │ ├── ImageDocumentCanvas.cs
│ │ │ ├── PdfDocumentCanvas.cs
│ │ │ ├── SemanticDocumentCanvas.cs
│ │ │ ├── SvgDocumentCanvas.cs
│ │ │ └── XpsDocumentCanvas.cs
│ │ ├── DocumentContainer.cs
│ │ ├── DocumentGenerator.cs
│ │ ├── DocumentPageSnapshot.cs
│ │ ├── DrawingCanvases/
│ │ │ ├── DiscardDrawingCanvas.cs
│ │ │ ├── ProxyDrawingCanvas.cs
│ │ │ ├── SemanticDrawingCanvas.cs
│ │ │ └── SkiaDrawingCanvas.cs
│ │ ├── Exceptions/
│ │ │ ├── DocumentComposeException.cs
│ │ │ ├── DocumentDrawingException.cs
│ │ │ ├── DocumentLayoutException.cs
│ │ │ └── InitializationException.cs
│ │ ├── FontManager.cs
│ │ ├── Proxy/
│ │ │ ├── ElementProxy.cs
│ │ │ ├── LayoutDebugging.cs
│ │ │ ├── LayoutOverflowVisualization.cs
│ │ │ ├── LayoutProxy.cs
│ │ │ ├── OverflowDebuggingProxy.cs
│ │ │ ├── SnapshotCacheRecorderProxy.cs
│ │ │ └── TreeTraversal.cs
│ │ ├── SemanticTreeManager.cs
│ │ ├── SpacePlan.cs
│ │ └── SpacePlanType.cs
│ ├── Elements/
│ │ ├── Alignment.cs
│ │ ├── ArtifactTag.cs
│ │ ├── AspectRatio.cs
│ │ ├── Column.cs
│ │ ├── Constrained.cs
│ │ ├── Container.cs
│ │ ├── ContentDirectionSetter.cs
│ │ ├── DebugArea.cs
│ │ ├── DebugPointer.cs
│ │ ├── Decoration.cs
│ │ ├── DefaultTextStyle.cs
│ │ ├── Dynamic.cs
│ │ ├── DynamicImage.cs
│ │ ├── DynamicSvgImage.cs
│ │ ├── ElementPositionLocator.cs
│ │ ├── Empty.cs
│ │ ├── EnsureSpace.cs
│ │ ├── Extend.cs
│ │ ├── Grid.cs
│ │ ├── Hyperlink.cs
│ │ ├── Image.cs
│ │ ├── Inlined.cs
│ │ ├── Layers.cs
│ │ ├── Lazy.cs
│ │ ├── Line.cs
│ │ ├── MultiColumn.cs
│ │ ├── Padding.cs
│ │ ├── Page.cs
│ │ ├── PageBreak.cs
│ │ ├── Placeholder.cs
│ │ ├── PreventPageBreak.cs
│ │ ├── RepeatContent.cs
│ │ ├── Rotate.cs
│ │ ├── Row.cs
│ │ ├── Scale.cs
│ │ ├── ScaleToFit.cs
│ │ ├── Section.cs
│ │ ├── SectionLink.cs
│ │ ├── SemanticTag.cs
│ │ ├── ShowEntire.cs
│ │ ├── ShowIf.cs
│ │ ├── ShowOnce.cs
│ │ ├── Shrink.cs
│ │ ├── SimpleRotate.cs
│ │ ├── SkipOnce.cs
│ │ ├── SourceCodePointer.cs
│ │ ├── StopPaging.cs
│ │ ├── StyledBox.cs
│ │ ├── SvgImage.cs
│ │ ├── SvgPath.cs
│ │ ├── Table/
│ │ │ ├── DynamicDictionary.cs
│ │ │ ├── ITableCellContainer.cs
│ │ │ ├── Table.cs
│ │ │ ├── TableCell.cs
│ │ │ ├── TableCellRenderingCommand.cs
│ │ │ ├── TableColumnDefinition.cs
│ │ │ ├── TableLayoutPlanner.cs
│ │ │ └── TableLayoutValidator.cs
│ │ ├── Text/
│ │ │ ├── Items/
│ │ │ │ ├── ITextBlockItem.cs
│ │ │ │ ├── TextBlockElement.cs
│ │ │ │ ├── TextBlockHyperlink.cs
│ │ │ │ ├── TextBlockPageNumber.cs
│ │ │ │ ├── TextBlockParagraphSpacing.cs
│ │ │ │ ├── TextBlockSectionLink.cs
│ │ │ │ └── TextBlockSpan.cs
│ │ │ ├── SkParagraphBuilderPoolManager.cs
│ │ │ └── TextBlock.cs
│ │ ├── Translate.cs
│ │ ├── Unconstrained.cs
│ │ └── ZIndex.cs
│ ├── Fluent/
│ │ ├── AlignmentExtensions.cs
│ │ ├── ColumnExtensions.cs
│ │ ├── ComponentExtentions.cs
│ │ ├── ConstrainedExtensions.cs
│ │ ├── ContentDirectionExtensions.cs
│ │ ├── DebugExtensions.cs
│ │ ├── DecorationExtensions.cs
│ │ ├── DocumentOperation.cs
│ │ ├── DynamicComponentExtensions.cs
│ │ ├── ElementExtensions.cs
│ │ ├── ExtendExtensions.cs
│ │ ├── GenerateExtensions.cs
│ │ ├── GridExtensions.cs
│ │ ├── ImageExtensions.cs
│ │ ├── InlinedExtensions.cs
│ │ ├── LayerExtensions.cs
│ │ ├── LineExtensions.cs
│ │ ├── MinimalApi.cs
│ │ ├── MultiColumnExtensions.cs
│ │ ├── PaddingExtensions.cs
│ │ ├── PageExtensions.cs
│ │ ├── RotateExtensions.cs
│ │ ├── RowExtensions.cs
│ │ ├── ScaleExtensions.cs
│ │ ├── SemanticExtensions.cs
│ │ ├── ShrinkExtensions.cs
│ │ ├── StyledBoxExtensions.cs
│ │ ├── SvgExtensions.cs
│ │ ├── TableExtensions.cs
│ │ ├── TextExtensions.cs
│ │ ├── TextSpanDescriptorExtensions.cs
│ │ ├── TextStyleExtensions.cs
│ │ └── TranslateExtensions.cs
│ ├── Helpers/
│ │ ├── CallerArgumentExpression.cs
│ │ ├── ColorParser.cs
│ │ ├── Colors.cs
│ │ ├── FontFeatures.cs
│ │ ├── Fonts.cs
│ │ ├── Helpers.cs
│ │ ├── IsExternalInit.cs
│ │ ├── LicenseChecker.cs
│ │ ├── NativeDependencyCompatibilityChecker.cs
│ │ ├── NativeDependencyProvider.cs
│ │ ├── PageSizes.cs
│ │ ├── Placeholders.cs
│ │ └── TemporaryStorage.cs
│ ├── Infrastructure/
│ │ ├── AspectRatioOption.cs
│ │ ├── BoxShadowStyle.cs
│ │ ├── Color.cs
│ │ ├── ContainerElement.cs
│ │ ├── ContentDirection.cs
│ │ ├── DocumentMetadata.cs
│ │ ├── DocumentSettings.cs
│ │ ├── Element.cs
│ │ ├── EmptyContainer.cs
│ │ ├── FontPosition.cs
│ │ ├── FontWeight.cs
│ │ ├── HorizontalAlignment.cs
│ │ ├── IComponent.cs
│ │ ├── IContainer.cs
│ │ ├── IContentDirectionAware.cs
│ │ ├── IDocument.cs
│ │ ├── IDocumentCanvas.cs
│ │ ├── IDocumentContainer.cs
│ │ ├── IDrawingCanvas.cs
│ │ ├── IDynamicComponent.cs
│ │ ├── IElement.cs
│ │ ├── IMergedDocument.cs
│ │ ├── IPageContext.cs
│ │ ├── ISemanticAware.cs
│ │ ├── IStateful.cs
│ │ ├── Image.cs
│ │ ├── ImageCompressionQuality.cs
│ │ ├── ImageFormat.cs
│ │ ├── ImageGenerationSettings.cs
│ │ ├── ImageScaling.cs
│ │ ├── ImageSize.cs
│ │ ├── LicenseType.cs
│ │ ├── PageContext.cs
│ │ ├── Position.cs
│ │ ├── Size.cs
│ │ ├── SourceCodePath.cs
│ │ ├── StaticImageCache.cs
│ │ ├── SvgImage.cs
│ │ ├── TextDirection.cs
│ │ ├── TextHorizontalAlignment.cs
│ │ ├── TextInjectedElementAlignment.cs
│ │ ├── TextStyle.cs
│ │ ├── TextStyleManager.cs
│ │ ├── Unit.cs
│ │ └── VerticalAlignment.cs
│ ├── LatoFont/
│ │ └── OFL.txt
│ ├── NugetStrongNameSigningKeyForQuestPDF.snk
│ ├── Qpdf/
│ │ ├── JobConfiguration.cs
│ │ ├── MimeHelper.cs
│ │ ├── QpdfAPI.cs
│ │ ├── QpdfNativeDependencyCompatibilityChecker.cs
│ │ └── SimpleJsonSerializer.cs
│ ├── QuestPDF.csproj
│ ├── Resources/
│ │ ├── Contributors.md
│ │ ├── Description.md
│ │ ├── Documentation.xml
│ │ ├── ExternalDependencyLicenses/
│ │ │ ├── emsdk.txt
│ │ │ ├── expat.txt
│ │ │ ├── harfbuzz.txt
│ │ │ ├── libgrapheme.txt
│ │ │ ├── libjpeg-turbo.txt
│ │ │ ├── libpng.txt
│ │ │ ├── libwebp.txt
│ │ │ ├── ninja-build.txt
│ │ │ ├── qpdf.txt
│ │ │ ├── readme.txt
│ │ │ ├── skia.txt
│ │ │ ├── wuffs.txt
│ │ │ └── zlib.txt
│ │ ├── LatinWords.txt
│ │ ├── MimeTypes.csv
│ │ ├── PackageLicense.md
│ │ └── ReleaseNotes.txt
│ ├── Settings.cs
│ └── Skia/
│ ├── SkBitmap.cs
│ ├── SkBoxShadow.cs
│ ├── SkCanvas.cs
│ ├── SkCanvasMatrix.cs
│ ├── SkData.cs
│ ├── SkDateTime.cs
│ ├── SkDocument.cs
│ ├── SkImage.cs
│ ├── SkNativeDependencyCompatibilityChecker.cs
│ ├── SkPaint.cs
│ ├── SkPdfDocument.cs
│ ├── SkPdfTag.cs
│ ├── SkPicture.cs
│ ├── SkPictureRecorder.cs
│ ├── SkPoint.cs
│ ├── SkRect.cs
│ ├── SkResourceProvider.cs
│ ├── SkRoundedRect.cs
│ ├── SkSemanticNodeSpecialId.cs
│ ├── SkSize.cs
│ ├── SkSvgCanvas.cs
│ ├── SkSvgImage.cs
│ ├── SkText.cs
│ ├── SkWriteStream.cs
│ ├── SkXpsDocument.cs
│ ├── SkiaAPI.cs
│ ├── Text/
│ │ ├── SkFontCollection.cs
│ │ ├── SkFontManager.cs
│ │ ├── SkParagraph.cs
│ │ ├── SkParagraphBuilder.cs
│ │ ├── SkTextStyle.cs
│ │ ├── SkTypeface.cs
│ │ ├── SkTypefaceProvider.cs
│ │ └── SkUnicode.cs
│ └── Utf8StringMarshaller.cs
├── QuestPDF.Companion.TestRunner/
│ ├── Program.cs
│ └── QuestPDF.Companion.TestRunner.csproj
├── QuestPDF.ConformanceTests/
│ ├── DecorationTests.cs
│ ├── DynamicTests.cs
│ ├── FooterTests.cs
│ ├── HeaderTests.cs
│ ├── HyperlinkInFooterTests.cs
│ ├── HyperlinkTests.cs
│ ├── IgnoreTests.cs
│ ├── ImageTests.cs
│ ├── LazyTests.cs
│ ├── LineTests.cs
│ ├── ListTests.cs
│ ├── MultiColumnTests.cs
│ ├── OrderOfSemanticItemsTests.cs
│ ├── QuestPDF.ConformanceTests.csproj
│ ├── Resources/
│ │ ├── zugferd-factur-x.xml
│ │ └── zugferd-xmp-metadata.xml
│ ├── StyledBoxTests.cs
│ ├── SvgTests.cs
│ ├── Table/
│ │ ├── TableWithFooterTests.cs
│ │ ├── TableWithHeaderCellsSpanningMultipleColumnsTests.cs
│ │ ├── TableWithHeaderCellsSpanningMultipleRowsTests.cs
│ │ ├── TableWithHorizontalHeadersTests.cs
│ │ ├── TableWithVerticalHeadersTests.cs
│ │ └── TableWithoutHeadersTests.cs
│ ├── TableOfContentsTests.cs
│ ├── TestEngine/
│ │ ├── ConformanceTestBase.cs
│ │ ├── MustangConformanceTestRunner.cs
│ │ ├── SemanticAwareDrawingCanvas.cs
│ │ ├── SemanticTreeTestRunner.cs
│ │ └── VeraPdfConformanceTestRunner.cs
│ ├── TestsSetup.cs
│ └── ZugferdTests.cs
├── QuestPDF.DocumentationExamples/
│ ├── AccessibilityExamples.cs
│ ├── AlignmentExamples.cs
│ ├── AspectRatioExamples.cs
│ ├── BackgroundExamples.cs
│ ├── BarcodeExamples.cs
│ ├── BorderExamples.cs
│ ├── ChartExamples.cs
│ ├── CodePatterns/
│ │ ├── CodePatternAddressComponentExample.cs
│ │ ├── CodePatternCapturePositionExample.cs
│ │ ├── CodePatternComponentProgressbarComponentExample.cs
│ │ ├── CodePatternConfigurableComponentExample.cs
│ │ ├── CodePatternContentStylingExample.cs
│ │ ├── CodePatternDocumentStructureExample.cs
│ │ ├── CodePatternDynamicComponentExample.cs
│ │ ├── CodePatternExecutionOrderExample.cs
│ │ ├── CodePatternExtesionMethodExample.cs
│ │ └── CodePatternLocalHelpersExample.cs
│ ├── ColorsExamples.cs
│ ├── ColumnExamples.cs
│ ├── ComplexGraphicsExamples.cs
│ ├── ConstrainedExamples.cs
│ ├── ContentDirectionExamples.cs
│ ├── CustomFirstPageExample.cs
│ ├── DebugAreaExamples.cs
│ ├── DecorationExamples.cs
│ ├── DefaultTextStyleExamples.cs
│ ├── DocumentOperationExamples.cs
│ ├── EnsureSpaceExamples.cs
│ ├── FlipExamples.cs
│ ├── HyperlinkExamples.cs
│ ├── ImageExamples.cs
│ ├── InlinedExamples.cs
│ ├── LayersExamples.cs
│ ├── LazyExamples.cs
│ ├── LicenseSetup.cs
│ ├── LineExamples.cs
│ ├── ListExamples.cs
│ ├── MapExample.cs
│ ├── MergingDocumentsExamples.cs
│ ├── MultiColumnExamples.cs
│ ├── PaddingExamples.cs
│ ├── PageBreakExamples.cs
│ ├── PageExamples.cs
│ ├── PlaceholderExamples.cs
│ ├── PreventPageBreakExamples.cs
│ ├── QuestPDF.DocumentationExamples.csproj
│ ├── RepeatExamples.cs
│ ├── Resources/
│ │ └── semantic-book-content.json
│ ├── RotateExamples.cs
│ ├── RoundedCornersExamples.cs
│ ├── RowExamples.cs
│ ├── ScaleExamples.cs
│ ├── ScaleToFitExamples.cs
│ ├── SectionExamples.cs
│ ├── SemanticExamples.cs
│ ├── ShadowExamples.cs
│ ├── ShowEntireExamples.cs
│ ├── ShowOnceExamples.cs
│ ├── SkiaSharpHelpers.cs
│ ├── SkiaSharpIntegrationExamples.cs
│ ├── SkipOnceExamples.cs
│ ├── StopPagingExamples.cs
│ ├── TableExamples.cs
│ ├── Text/
│ │ ├── ParagraphStyleExamples.cs
│ │ ├── TextBasicExamples.cs
│ │ ├── TextInjectContent.cs
│ │ └── TextStyleExamples.cs
│ ├── TranslateExamples.cs
│ ├── UnconstrainedExamples.cs
│ └── ZIndexExamples.cs
├── QuestPDF.LayoutTests/
│ ├── ColumnTests.cs
│ ├── LineTests.cs
│ ├── MultiColumnTests.cs
│ ├── PaddingTests.cs
│ ├── QuestPDF.LayoutTests.csproj
│ ├── RotateTests.cs
│ ├── RowTests.cs
│ ├── ScaleTests.cs
│ ├── Setup.cs
│ ├── ShowIfTests.cs
│ ├── ShrinkTests.cs
│ ├── SimpleRotateTests.cs
│ ├── StopPagingTests.cs
│ ├── TableTests.cs
│ ├── TestEngine/
│ │ ├── ContinuousBlock.cs
│ │ ├── DrawingRecorder.cs
│ │ ├── ElementObserver.cs
│ │ ├── ElementObserverSetter.cs
│ │ ├── FluentExtensions.cs
│ │ ├── LayoutTest.cs
│ │ └── SolidBlock.cs
│ ├── TranslateTests.cs
│ └── Usings.cs
├── QuestPDF.ReportSample/
│ ├── DataSource.cs
│ ├── Helpers.cs
│ ├── Layouts/
│ │ ├── DifferentHeadersTemplate.cs
│ │ ├── Helpers.cs
│ │ ├── ImagePlaceholder.cs
│ │ ├── PhotoTemplate.cs
│ │ ├── SectionTemplate.cs
│ │ ├── StandardReport.cs
│ │ └── TableOfContentsTemplate.cs
│ ├── Models.cs
│ ├── QuestPDF.ReportSample.csproj
│ ├── Tests.cs
│ └── Typography.cs
├── QuestPDF.UnitTests/
│ ├── AlignmentTests.cs
│ ├── AspectRatioTests.cs
│ ├── ColumnTests.cs
│ ├── ConstrainedTests.cs
│ ├── DecorationTests.cs
│ ├── DocumentCompressionTests.cs
│ ├── DocumentOperationTests.cs
│ ├── DynamicImageTests.cs
│ ├── EnsureSpaceTests.cs
│ ├── ExtendTests.cs
│ ├── ExternalLinkTests.cs
│ ├── FontManagerTests.cs
│ ├── ImageGenerationTests.cs
│ ├── ImageTests.cs
│ ├── InternalLinkTests.cs
│ ├── InternalLocationTests.cs
│ ├── LayersTests.cs
│ ├── LicenseSetup.cs
│ ├── LineTests.cs
│ ├── PaddingTests.cs
│ ├── PageBreakTests.cs
│ ├── QuestPDF.UnitTests.csproj
│ ├── RotateTests.cs
│ ├── RowTests.cs
│ ├── ScaleTests.cs
│ ├── ShowEntireTests.cs
│ ├── ShowOnceTest.cs
│ ├── SimpleRotateTests.cs
│ ├── StyledBoxTests.cs
│ ├── TestEngine/
│ │ ├── ElementMock.cs
│ │ ├── MockCanvas.cs
│ │ ├── OperationBase.cs
│ │ ├── OperationRecordingCanvas.cs
│ │ ├── Operations/
│ │ │ ├── CanvasDrawImageOperation.cs
│ │ │ ├── CanvasDrawRectangleOperation.cs
│ │ │ ├── CanvasDrawTextOperation.cs
│ │ │ ├── CanvasRotateOperation.cs
│ │ │ ├── CanvasScaleOperation.cs
│ │ │ ├── CanvasTranslateOperation.cs
│ │ │ ├── ChildDrawOperation.cs
│ │ │ ├── ChildMeasureOperation.cs
│ │ │ └── ElementMeasureOperation.cs
│ │ ├── SimpleContainerTests.cs
│ │ └── TestPlan.cs
│ ├── TextSpanTests.cs
│ ├── TextStyleTests.cs
│ ├── TranslateTests.cs
│ ├── UnconstrainedTests.cs
│ └── UnitConversionTests.cs
├── QuestPDF.VisualTests/
│ ├── LineTests.cs
│ ├── QuestPDF.VisualTests.csproj
│ ├── RotateTests.cs
│ ├── SimpleRotateTests.cs
│ ├── StyledBoxTests.cs
│ ├── TestsSetup.cs
│ ├── TextStyleTests.cs
│ └── VisualTestEngine.cs
├── QuestPDF.ZUGFeRD/
│ ├── GenerationTest.cs
│ ├── QuestPDF.ZUGFeRD.csproj
│ ├── resource-factur-x.xml
│ └── resource-zugferd-metadata.xml
├── QuestPDF.slnx
├── global.json
└── nuget.config
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at marcin@ziabek.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
================================================
FILE: .github/FUNDING.yml
================================================
github: QuestPDF
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Please provide an example, minimalistic code that shows the problem.
Providing working example or example repository greatly helps us investigate the problem and react faster.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment**
What version of the library do you use?
What operating system do you use? (OS type, x64 vs x86 vs arm64)
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/companion_app_feedback.md
================================================
---
name: Companion App Feedback
about: Suggest an idea for this project
title: ''
labels: 'companion-app'
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/SECURITY.md
================================================
# Security Policy
## Supported Versions
| Version | Supported | Scope | License |
|-----------|--------------------|----------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------|
| 2024.X.Y | :white_check_mark: | full: feature, quality and bug-fix updates ([branch](https://github.com/QuestPDF/QuestPDF)) | Hybrid: Community MIT, Professional, Enterprise |
| 2023.X.Y | :white_check_mark: | limited until Q4 2024: quality and bug-fix updates ([branch](https://github.com/QuestPDF/QuestPDF)) | Hybrid: Community MIT, Professional, Enterprise |
| 2022.12.X | :x: | supported until Q2 2024, no longer supported ([branch](https://github.com/QuestPDF/QuestPDF/tree/2022.12.X-support)) | MIT |
| Older | :x: | no support | MIT |
## Reporting a Vulnerability
Please report any code vulnerabilities using GitHub Issues. We are trying to respond within 1 day and analyze reported situation as soon as possible.
Please collaborate with us to find best solutation available.
Once the vulnerability is recognized and fixed, the issue is closed with appropraite message.
================================================
FILE: .github/workflows/main.yml
================================================
name: Build, Test And Create Nuget Package
permissions: {}
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
main:
name: ${{ matrix.runtime.name }}
runs-on: ${{ matrix.runtime.runs-on }}
container: ${{ matrix.runtime.container }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
runtime:
- name: win-x64
runs-on: windows-latest-xlarge
# - name: win-x86
# runs-on: windows-latest-xlarge
- name: linux-x64
runs-on: ubuntu-latest-xlarge
container: ubuntu:24.04
- name: linux-arm64
runs-on: ubuntu-latest-xlarge-arm64
container: ubuntu:24.04
- name: linux-musl-x64
runs-on: ubuntu-latest-xlarge
container: alpine:3.20
- name: osx-x64
runs-on: macos-latest-large
- name: osx-arm64
runs-on: macos-latest-xlarge
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Build Tools (Linux)
if: matrix.runtime.name == 'linux-x64' || matrix.runtime.name == 'linux-arm64'
shell: sh
run: |
apt update --yes
apt upgrade --yes
# required by actions/setup-dotnet
apt install bash wget --yes
# required by conformance testing tools: veraPDF and mustang
apt install unzip default-jre --yes
java -version
- name: Install Build Tools (Alpine)
if: matrix.runtime.name == 'linux-musl-x64'
shell: sh
run: |
apk update
apk upgrade
# required by actions/setup-dotnet
apk add bash wget
# required by dotnet build command
apk add libstdc++ libgcc
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Install veraPDF - PDF conformance testing tool
if: matrix.runtime.name == 'linux-x64'
run: |
mkdir -p ~/verapdf
cd ~/verapdf
wget -q https://software.verapdf.org/rel/verapdf-installer.zip
unzip -q verapdf-installer.zip
rm verapdf-installer.zip
mv verapdf* verapdf
cd verapdf
printf "1\n\nO\n1\nY\nY\nN\n1\nY\n\n" | ./verapdf-install
alias verapdf='/root/verapdf/verapdf'
verapdf --version
- name: Install mustang - ZUGFeRD conformance testing tool
if: matrix.runtime.name == 'linux-x64'
run: |
mkdir -p /root/mustang
cd /root/mustang
wget https://repo1.maven.org/maven2/org/mustangproject/Mustang-CLI/2.20.0/Mustang-CLI-2.20.0.jar -O mustang-cli.jar
alias mustang='java -jar /root/mustang/mustang-cli.jar'
mustang --help
- name: Build and test solution
shell: bash
working-directory: ./Source
env:
VERAPDF_EXECUTABLE_PATH: '/root/verapdf/verapdf'
MUSTANG_EXECUTABLE_PATH: '/root/mustang/mustang-cli.jar'
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
run: |
dotnet build --configuration Release --property WarningLevel=0
dotnet test QuestPDF.UnitTests --configuration Release --runtime ${{ matrix.runtime.name }} --framework net10.0
dotnet test QuestPDF.LayoutTests --configuration Release --runtime ${{ matrix.runtime.name }} --framework net10.0
dotnet test QuestPDF.VisualTests --configuration Release --runtime ${{ matrix.runtime.name }} --framework net10.0
dotnet test QuestPDF.DocumentationExamples --configuration Release --runtime ${{ matrix.runtime.name }} --framework net10.0
dotnet test QuestPDF.ReportSample --configuration Release --runtime ${{ matrix.runtime.name }} --framework net10.0
dotnet test QuestPDF.ZUGFeRD --configuration Release --runtime ${{ matrix.runtime.name }} --framework net10.0
if [ "${{ matrix.runtime.name }}" == "linux-x64" ]; then
dotnet test QuestPDF.ConformanceTests --configuration Release --runtime ${{ matrix.runtime.name }} --framework net10.0
fi
dotnet build QuestPDF/QuestPDF.csproj --configuration Release --property WarningLevel=0 --property BUILD_PACKAGE=true
TEST_EXECUTION_PATH='QuestPDF.ReportSample/bin/Release/net10.0/${{ matrix.runtime.name }}'
mkdir -p testOutput/${{ matrix.runtime.name }}
cp -r $TEST_EXECUTION_PATH/report.pdf testOutput/${{ matrix.runtime.name }}
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: questpdf-test-results-${{ matrix.runtime.name }}
path: |
**/*.pdf
- name: Upload nuget artifacts
uses: actions/upload-artifact@v4
if: ${{ matrix.runtime.name == 'win-x64' }}
with:
name: questpdf-nuget-package
path: |
**/*.nupkg
**/*.snupkg
!.nuget
merge:
runs-on: ubuntu-latest
needs: main
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: questpdf-test-results
pattern: questpdf-test-results-*
delete-merged: true
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
artifacts/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
*.ncrunchsolution
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Project Rider
*.iml
.idea
# macOS
.DS_Store
**/.DS_Store
================================================
FILE: LICENSE.md
================================================
# QuestPDF License
## License Selection Guide
Welcome to QuestPDF! This guide will help you understand how to select the appropriate license for our library, based on your usage context.
The licensing options for QuestPDF include the MIT license (which is free), and two tiers of paid licenses: the Professional License and the Enterprise License.
### License Equality
We believe in offering the full power of QuestPDF to all our users, regardless of the license they choose. Whether you're operating under our Community MIT, Professional, or Enterprise licenses, you can enjoy the same comprehensive range of features:
- Full access to all QuestPDF features.
- Support for commercial usage.
- Freedom to create and deploy unlimited closed-source projects, applications, and APIs.
- Royalty-free redistribution of the compiled library with your applications.
Transitive Dependency Usage
If you're using QuestPDF as a transitive dependency, you're free to use it under the MIT license without any cost. However, you're welcomed and encouraged to support the project by purchasing a paid license if you find the library valuable.
### Non-profit Usage
If you represent an open-source project, a charitable organization, or are using QuestPDF for evaluation, learning or training purposes, you can also use QuestPDF for free under the MIT license.
### Small Businesses
For companies generating less than $1M USD in annual gross revenue, you can use QuestPDF under the MIT license for free.
### Larger Businesses
Companies with an annual gross revenue exceeding $1M USD are required to purchase a paid license. The type of license you need depends on the number of developers working on projects that use QuestPDF:
Professional License - If there are up to 10 developers in your company who are using QuestPDF, you need to purchase the Professional License.
Enterprise License - If your company has more than 10 developers using QuestPDF, the Enterprise License is the right choice.
### Beyond Compliance
Remember, purchasing a license isn't just about adhering to our guidelines, but also supporting the development of QuestPDF. Your contribution helps us to improve the library and offer top-notch support to all users.
<br>
<hr>
<br>
## QuestPDF Community MIT License
### License Permissions
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
### Copyright
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
### Limitation Of Liability
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<br>
<hr>
<br>
## QuestPDF Professional and Enterprise Use License
### Do No Harm
By downloading or using the Software, the Licensee agrees not to utilize the software in a manner which is disparaging to QuestPDF, and not to rent, lease or otherwise transfer rights to the Software.
### License Permissions
Grants the use of the Software by a specified number of developers to create and deploy closed-source software for unlimited end user organizations ("The Organization") in multiple locations. This license covers unlimited applications or projects. The Software may be deployed upon any number of machines for the end-use of The Organization. This license also intrinsically covers for development, staging and production servers for each project.
Grants the right to distribute the Software (without royalty) as part of packaged commercial products.
### License Fees
A. If you wish to use the Software in a production environment, the purchase of a license is required. This license is perpetual, granting you continued use of the Software in accordance with the terms and conditions of this Agreement. The cost of the license is as indicated on the pricing page.
B. Upon purchasing a license, you are also enrolled in a yearly, recurring subscription for software updates. This subscription is valid for a period of one year from the date of purchase, and it will automatically renew each year unless cancelled. We recommend maintaining your subscription as long as you are performing active software development to ensure you have access to the latest updates and improvements to the Software.
C. However, it should be noted that the perpetual license allows use of only the latest library revision available at the time of or within the active subscription period, in accordance with the terms and conditions of this Agreement.
D. If you wish to use the Software in a non-production environment, such as for testing and evaluation purposes, you may download and access the source and/or binaries at no charge. This access is subject to all license limitations and restrictions set forth in this Agreement.
### Ownership
QuestPDF shall at all times retain ownership of the QuestPDF Software library and all subsequent copies.
### Copyright
Title, ownership rights, and intellectual property rights in and to the Software shall remain with QuestPDF. The Software is protected by the international copyright laws. Title, ownership rights, and intellectual property rights in and to the content accessed through the Software is the property of the applicable content owner and may be protected by applicable copyright or other law. This License gives you no rights to such content.
### Limitation Of Liability
THIS SOFTWARE IS PROVIDED "AS IS," WITHOUT A WARRANTY OF ANY KIND. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. QUESTPDF AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL QUESTPDF OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF QUESTPDF HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
================================================
FILE: README.md
================================================
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/9535de26-aeac-42ac-ac45-019a2893ed6b">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/e9d197ee-0cad-44f0-9efa-80ad68c31abe">
<img src="https://github.com/user-attachments/assets/e9d197ee-0cad-44f0-9efa-80ad68c31abe" width="300">
</picture>
<br>
<br>
## Modern PDF library for C# developers
QuestPDF is a production-ready library that lets you design documents the way you design software: with clean, maintainable, strong-typed C# code.
Stop fighting with HTML-to-PDF conversion. Build pixel-perfect reports, invoices, and exports using the language and tools you already love.
[](https://github.com/QuestPDF/QuestPDF)
<br>
[](https://www.nuget.org/packages/QuestPDF/)
<br>
[](https://www.questpdf.com/license.html)
<br>
<hr>
[Home Page](https://www.questpdf.com)
•
[Quick Start](https://www.questpdf.com/quick-start.html)
•
[Real-world Invoice Tutorial](https://www.questpdf.com/invoice-tutorial.html)
•
[Features Overview](https://www.questpdf.com/features-overview.html)
•
[License & Pricing](https://www.questpdf.com/license/)
•
[NuGet](https://www.nuget.org/packages/QuestPDF)
<hr>
<br>
## 🚀 Quick start
Learn how easy it is to design, implement and generate PDF documents using QuestPDF. <br>
Effortlessly create documents of all types such as invoices and reports.
```c#
using QuestPDF.Fluent;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
// set your license here:
// QuestPDF.Settings.License = LicenseType.Community;
Document.Create(container =>
{
container.Page(page =>
{
page.Size(PageSizes.A4);
page.Margin(2, Unit.Centimetre);
page.PageColor(Colors.White);
page.DefaultTextStyle(x => x.FontSize(20));
page.Header()
.Text("Hello PDF!")
.SemiBold().FontSize(36).FontColor(Colors.Blue.Medium);
page.Content()
.PaddingVertical(1, Unit.Centimetre)
.Column(x =>
{
x.Spacing(20);
x.Item().Text(Placeholders.LoremIpsum());
x.Item().Image(Placeholders.Image(200, 100));
});
page.Footer()
.AlignCenter()
.Text(x =>
{
x.Span("Page ");
x.CurrentPageNumber();
});
});
})
.GeneratePdf("hello.pdf");
```
The code above produces the following PDF document:
<img width="300" alt="image" src="https://github.com/user-attachments/assets/46784e17-e8be-41d2-87f4-d6322c3b5e52" />
[](https://www.questpdf.com/quick-start.html)
> [!TIP]
> The library is free for individuals, non-profits, all FOSS projects, and organizations under $1M in annual revenue.
> Read more about licensing [here](https://www.questpdf.com/license/)
<br>
<br>
## Installation
QuestPDF is available as a NuGet package. You can install it through your IDE by searching for phrase `QuestPDF`. If you are not familiar how to do that, please refer to the following guides:
- [Visual Studio](https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio)
- [Visual Code](https://code.visualstudio.com/docs/csharp/package-management)
- [JetBrains Rider](https://www.jetbrains.com/help/rider/Using_NuGet.html)
Or use the following command in your terminal:
```bash
dotnet add package QuestPDF
```
<br>
<br>
## Everything you need to generate PDFs
From layout and styling to production features, QuestPDF gives you the flexibility to create documents of any complexity.
### 🎨 Visual Content:
- Page attributes (header, footer, background, watermark, margin),
- Text (font style, paragraph style, page numbers),
- Styled containers (background, border, rounded corners, colors and gradients, shadows),
- Lines (vertical and horizontal, colors and gradients, dash pattern)
- Images (PNG, JPG, WEBP, SVG),
### 🔀 Layout:
- Tables,
- Lists,
- Layers,
- Column / Row,
- Inlined,
### 📐 Positional:
- Alignment,
- Size Controls (width / height),
- Padding,
### 🛠️ Other:
- Page Breaking Control,
- Aspect Ratio,
- Integrations (maps, charts, barcodes, QR codes),
- Hyperlinks,
- Z-index,
[](https://www.questpdf.com/features-overview.html)
<br>
<br>
## Familiar Programming Patterns
Use your existing programming language and patterns to ship faster with less training.
Loops, conditionals, functions are natively supported. Leverage IntelliSense, inspections, navigation, and safe refactoring.
```csharp
container.Column(column =>
{
column.Item().Text("Order Items").Bold();
if (Model.ShowSummary)
column.Item().Element(ComposeOrderSummary);
foreach (var item in Model.Items)
column.Item().Element(c => ComposeItem(c, item));
});
```
Review document changes like any other code. Get clean diffs, PR approvals, and traceable history.
```diff
void ComposeItem(IContainer container, OrderItem item)
{
container
.Border(1, Colors.Grey.Darken2)
.Background(item.HighlightColor)
- .Padding(12)
+ .Padding(16)
.Row(row =>
{
row.RelativeItem().Text(item.Name);
row.AutoItem().Text($"{item.Price:F2} USD");
});
}
```
<br>
<br>
## Companion App
Accelerate development with live document preview and hot-reload capability. See your changes instantly without recompiling.
- Explore PDF document hierarchy and navigate its structure
- Quickly magnify and measure content
- Debug runtime exceptions with stack traces and code snippets
- Identify, understand and solve layout errors
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/7ab596d4-eebc-44e6-b36d-c358b16ed0ba">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/39d4c08c-6a78-4743-8837-208c0c1718fd">
<img src="https://github.com/user-attachments/assets/ce394258-1f10-498d-b65f-26c9fbed2994" width="600">
</picture>
[]([https://www.questpdf.com/companion/features.html](https://www.questpdf.com/companion/usage.html))
[](https://www.questpdf.com/companion/features.html)
<br>
<br>
## Enterprise-grade foundations
- **Predictable Development** — Eliminate CSS debugging, browser quirks, and layout surprises common with HTML-to-PDF tools. What you code is what you get.
- **Source-available** - Entire QuestPDF source code is available for review and customization, ensuring transparency and compliance with your organization's requirements.
- **Complete Data Privacy** - QuestPDF runs entirely within your infrastructure with no external API calls, internet requirement, or background data collection. As a company, we do not access, collect, store, or process your private data.
- **Comprehensive Layout Engine** - A powerful layout engine built specifically for PDF generation. Gain full control over document structure, precise content positioning, and automatic pagination.
- **Advanced Language Support** - Create multilingual documents with full RTL language support, advanced text shaping, and bi-directional layout handling.
- **High Performance** - Generate thousands of pages per second while maintaining minimal CPU and memory usage. Perfect for high-throughput enterprise applications.
- **Optimized File Size** - Drastically reduce file sizes without compromising quality. Benefit from automatic font subsetting, optimal image compression, and efficient file compression.
<br>
<br>
## Perform common PDF operations
Leverage a powerful C# Fluent API to create, customize, and manage your PDF documents with ease.
- Merge documents
- Attach files
- Extract pages
- Encrypt / decrypt
- Extend metadata
– Limit access
- Optimize for Web
- Overlay / underlay
```c#
DocumentOperation
.LoadFile("input.pdf")
.TakePages("1-10")
.MergeFile("appendix.pdf", "1-z") // all pages
.AddAttachment(new DocumentAttachment
{
FilePath = "metadata.xml"
})
.Encrypt(new Encryption256Bit
{
OwnerPassword = "mypassword",
AllowPrinting = true,
AllowContentExtraction = false
})
.Save("final-document.pdf");
```
[](https://www.questpdf.com/concepts/document-operations.html)
<br>
<br>
## Works everywhere you do
Deploy on any major operating system and integrate seamlessly with your favorite IDEs, cloud platforms, and development tools.
| Platform | Support |
|----------|---------|
| **Operating Systems** | Windows, Linux, macOS |
| **Frameworks** | .NET 6+ and .NET Framework 4.6.2+ |
| **Cloud** | Azure, AWS, Google Cloud, Others |
| **Containers** | Docker, Kubernetes |
| **IDEs** | Visual Studio, VS Code, JetBrains Rider, Others |
<br>
<br>
## Industry-standard PDF compliance
Generate PDF documents that meet the strictest archival and accessibility requirements. Every build is automatically validated using the open-source veraPDF and Mustang tools.
- PDF/A (Archival):
- Purpose: ISO 19005 standard for long-term preservation. Ensures PDFs remain readable and visually identical for decades without external dependencies.
- Supported Standards: `PDF/A-2b`, `PDF/A-2u`, `PDF/A-2a`, `PDF/A-3b`, `PDF/A-3u`, `PDF/A-3a`
- PDF/UA (Accessibility):
- Purpose: ISO 14289 standard for universal accessibility. Includes full support for screen readers and assistive technologies for people with disabilities.
- Supported Standards: `PDF/UA-1`
- EN 16931 (E-Invoicing):
- Purpose: European standard for electronic invoicing. Embeds structured invoice data (XML) within PDF documents for automated processing.
- Supported Standards: `ZUGFeRD`, `Factur-X`
<br>
<br>
## Fair and Sustainable License
A model that benefits everyone. Commercial licensing provides businesses with legal safety and long-term stability, while funding a feature-complete, unrestricted library for the open-source community.
- Actively maintained with regular feature, quality, and security updates
- Full source code available on GitHub
- All features included in every tier without restrictions
- Predictable pricing: no per-seat, per-server, or usage fees
> [!TIP]
> Free for individuals, non-profits, all FOSS projects, and organizations under $1M in annual revenue.
[](https://www.questpdf.com/license.html)
[](https://www.questpdf.com/license/guide.html)
<br>
<br>
## See a real-world example
Follow our detailed tutorial and see how easy it is to generate a fully functional invoice with fewer than 250 lines of C# code.
- Step-by-step guidance
- Production-ready code
- Best practices included
<img width="300" alt="Example Invoice" src="https://github.com/user-attachments/assets/dd268fe2-e558-4b9a-944d-b2f41ce52940" />
[](https://www.questpdf.com/invoice-tutorial.html)
<br>
<br>
## Community QuestPDF
We are incredibly grateful to our .NET Community for their positive reviews and recommendations of the QuestPDF library.
Your support and feedback are invaluable and motivate us to keep improving and expanding this project.
Thank you for helping us grow and reach more developers!
### Nick Chapsas: The Easiest Way to Create PDFs in .NET
[](https://www.youtube.com/watch?v=_M0IgtGWnvE)
### JetBrains: OSS Power-Ups: QuestPDF
[](https://www.youtube.com/watch?v=-iYvZvpLX0g)
<br>
<br>
## Please help by giving a star ⭐
GitHub stars guide developers toward great tools. If you find this project valuable, please give it a star – it helps the community and takes just a second!
<img src="https://github.com/user-attachments/assets/cb7077b5-ebbf-493b-96c4-af6ae25eca56" width="700" />
================================================
FILE: Source/.config/dotnet-tools.json
================================================
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-stryker": {
"version": "3.11.1",
"commands": [
"dotnet-stryker"
]
}
}
}
================================================
FILE: Source/.config/stryker-config.json
================================================
{
"stryker-config":
{
"solution": "../QuestPDF.sln",
"project": "QuestPDF/QuestPDF.csproj",
"test-projects": ["../QuestPDF.LayoutTests/QuestPDF.LayoutTests.csproj"],
"mutate": ["**/*Column.cs"],
"reporters": [
"progress",
"html"
],
"disable-mix-mutants": true,
"disable-bail": true
}
}
================================================
FILE: Source/.editorconfig
================================================
# Rules in this file were initially inferred by Visual Studio IntelliCode from the D:\GithubRepos\QuestPDF codebase based on best match to current usage at 16.03.2022
# You can modify the rules from these initially generated values to suit your own policies
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
[*.cs]
#Core editorconfig formatting - indentation
#use soft tabs (spaces) for indentation
indent_style = space
#Formatting - new line options
#place catch statements on a new line
csharp_new_line_before_catch = true
#place else statements on a new line
csharp_new_line_before_else = true
#require members of anonymous types to be on separate lines
csharp_new_line_before_members_in_anonymous_types = true
#require members of object intializers to be on separate lines
csharp_new_line_before_members_in_object_initializers = true
#require braces to be on a new line for object_collection_array_initializers, methods, anonymous_types, control_blocks, types, and lambdas (also known as "Allman" style)
csharp_new_line_before_open_brace =all
#Formatting - organize using options
#sort System.* using directives alphabetically, and place them before other usings
dotnet_sort_system_directives_first = true
#Formatting - spacing options
#require NO space between a cast and the value
csharp_space_after_cast = false
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_after_colon_in_inheritance_clause = true
#require a space after a keyword in a control flow statement such as a for loop
csharp_space_after_keywords_in_control_flow_statements = true
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_before_colon_in_inheritance_clause = true
#remove space within empty argument list parentheses
csharp_space_between_method_call_empty_parameter_list_parentheses = false
#remove space between method call name and opening parenthesis
csharp_space_between_method_call_name_and_opening_parenthesis = false
#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
csharp_space_between_method_call_parameter_list_parentheses = false
#remove space within empty parameter list parentheses for a method declaration
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
csharp_space_between_method_declaration_parameter_list_parentheses = false
#Formatting - wrapping options
#leave code block on single line
csharp_preserve_single_line_blocks = true
#Style - Code block preferences
#prefer no curly braces if allowed
csharp_prefer_braces = false:suggestion
#Style - expression bodied member options
#prefer block bodies for constructors
csharp_style_expression_bodied_constructors = false:suggestion
#prefer block bodies for methods
csharp_style_expression_bodied_methods = false:suggestion
#prefer expression-bodied members for properties
csharp_style_expression_bodied_properties = true:suggestion
#Style - expression level options
#prefer out variables to be declared inline in the argument list of a method call when possible
csharp_style_inlined_variable_declaration = true:suggestion
#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_member_access = true:suggestion
#Style - Expression-level preferences
#prefer objects to be initialized using object initializers when possible
dotnet_style_object_initializer = true:suggestion
#prefer inferred anonymous type member names
dotnet_style_prefer_inferred_anonymous_type_member_names = false:suggestion
#prefer inferred tuple element names
dotnet_style_prefer_inferred_tuple_names = true:suggestion
#Style - implicit and explicit types
#prefer var over explicit type in all cases, unless overridden by another code style rule
csharp_style_var_elsewhere = true:suggestion
#prefer var is used to declare variables with built-in system types such as int
csharp_style_var_for_built_in_types = true:suggestion
#prefer var when the type is already mentioned on the right-hand side of a declaration expression
csharp_style_var_when_type_is_apparent = true:suggestion
#Style - language keyword and framework type options
#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
#Style - Miscellaneous preferences
#prefer local functions over anonymous functions
csharp_style_pattern_local_over_anonymous_function = true:suggestion
#Style - modifier options
#prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods.
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
#Style - Modifier preferences
#when this rule is set to a list of modifiers, prefer the specified ordering.
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
#Style - Pattern matching
#prefer pattern matching instead of is expression with type casts
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
#Style - qualification options
#prefer fields not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_field = false:suggestion
#prefer methods not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_method = false:suggestion
#prefer properties not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_property = false:suggestion
[*.{cs,vb}]
tab_width=4
indent_size=4
================================================
FILE: Source/QuestPDF/Build/QuestPDF.targets
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\..\LatoFont\*.*">
<Visible>$(TargetFramework.StartsWith('net4'))</Visible>
<Link>LatoFont\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
================================================
FILE: Source/QuestPDF/Build/net4/QuestPDF.targets
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\..\..\runtimes\**\*.*">
<Link>runtimes\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
================================================
FILE: Source/QuestPDF/Companion/CompanionExtensions.cs
================================================
using System;
using System.Threading;
using System.Threading.Tasks;
using QuestPDF.Drawing;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
namespace QuestPDF.Companion
{
public static class CompanionExtensions
{
static CompanionExtensions()
{
LicenseChecker.ValidateLicense();
}
#if NET6_0_OR_GREATER
/// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="companion.supported"]/*' />
public static void ShowInCompanion(this IDocument document, int port = 12500)
{
document.ShowInCompanionAsync(port).ConfigureAwait(true).GetAwaiter().GetResult();
}
/// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="companion.supported"]/*' />
public static async Task ShowInCompanionAsync(this IDocument document, int port = 12500, CancellationToken cancellationToken = default)
{
Settings.EnableCaching = false;
Settings.EnableDebugging = true;
if (document is MergedDocument)
throw new NotSupportedException("The QuestPDF Companion App does not currently support merged documents. Please use the tool with a single document at a time.");
var companionService = new CompanionService(port);
using var cancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
companionService.OnCompanionStopped += () => cancellationTokenSource.Cancel();
await companionService.Connect();
companionService.StartRenderRequestedPageSnapshotsTask(cancellationToken);
await RefreshPreview();
HotReloadManager.UpdateApplicationRequested += (_, _) =>
{
CompanionService.IsDocumentHotReloaded = true;
RefreshPreview();
};
await KeepApplicationAlive(cancellationTokenSource.Token);
Task RefreshPreview()
{
try
{
var pictures = DocumentGenerator.GenerateCompanionContent(document);
return companionService.RefreshPreview(pictures);
}
catch (Exception exception)
{
return companionService.InformAboutGenericException(exception);
}
}
async Task KeepApplicationAlive(CancellationToken cancellationToken)
{
while (true)
{
if (cancellationToken.IsCancellationRequested)
return;
await Task.Delay(TimeSpan.FromSeconds(1), cancellationToken);
}
}
}
#else
/// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="companion.notSupported"]/*' />
public static void ShowInCompanion(this IDocument document, int port = 12500)
{
throw new Exception("The hot-reload feature requires .NET 6 or later.");
}
/// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="companion.notSupported"]/*' />
public static async Task ShowInCompanionAsync(this IDocument document, int port = 12500, CancellationToken cancellationToken = default)
{
throw new Exception("The hot-reload feature requires .NET 6 or later.");
}
#endif
}
}
================================================
FILE: Source/QuestPDF/Companion/CompanionModels.cs
================================================
using System;
using System.Collections.Generic;
using QuestPDF.Drawing;
using QuestPDF.Infrastructure;
namespace QuestPDF.Companion
{
sealed class PageSnapshotIndex
{
public int PageIndex { get; set; }
public int ZoomLevel { get; set; }
public override string ToString() => $"{ZoomLevel}/{PageIndex}";
}
static internal class CompanionCommands
{
internal sealed class Notify
{
private static readonly string CurrentClientId = Guid.NewGuid().ToString();
public string ClientId => CurrentClientId;
public LicenseType License => Settings.License ?? LicenseType.Community;
}
internal sealed class UpdateDocumentStructure
{
public bool IsDocumentHotReloaded { get; set; }
public ICollection<PageSize> Pages { get; set; }
public DocumentHierarchyElement Hierarchy { get; set; }
public sealed class PageSize
{
public float Width { get; set; }
public float Height { get; set; }
}
internal sealed record DocumentHierarchyElement
{
internal Element Element { get; set; }
public string ElementType { get; set; }
public string? Hint { get; set; }
public string? SearchableContent { get; set; }
public bool IsSingleChildContainer { get; set; }
public ICollection<PageLocation> PageLocations { get; set; }
public ICollection<LayoutErrorMeasurement> LayoutErrorMeasurements { get; set; }
public ICollection<ElementProperty> Properties { get; set; }
public SourceCodePath? SourceCodeDeclarationPath { get; set; }
public ICollection<DocumentHierarchyElement> Children { get; set; }
}
internal sealed class PageLocation
{
public int PageNumber { get; init; }
public float Left { get; init; }
public float Top { get; init; }
public float Right { get; init; }
public float Bottom { get; init; }
}
internal sealed class LayoutErrorMeasurement
{
public int PageNumber { get; set; }
public ElementSize? AvailableSpace { get; set; }
public ElementSize? MeasurementSize { get; set; }
public SpacePlanType? SpacePlanType { get; set; }
public string? WrapReason { get; set; }
public bool IsLayoutErrorRootCause { get; set; }
}
internal sealed class SourceCodePath
{
public string FilePath { get; set; }
public int LineNumber { get; set; }
}
}
internal sealed class ProvideRenderedDocumentPage
{
public ICollection<RenderedPage> Pages { get; set; }
internal sealed class RenderedPage
{
public int PageIndex { get; set; }
public int ZoomLevel { get; set; }
public string ImageData { get; set; } // base64
}
}
internal sealed class ShowGenericException
{
public GenericExceptionDetails Exception { get; set; }
internal sealed class GenericExceptionDetails
{
public string Type { get; set; }
public string Message { get; set; }
public ICollection<StackFrame> StackTrace { get; set; }
public GenericExceptionDetails? InnerException { get; set; }
}
internal sealed class StackFrame
{
public string CodeLocation { get; set; }
public string? FileName { get; set; }
public int? LineNumber { get; set; }
}
}
internal sealed class ElementSize
{
public float Width { get; set; }
public float Height { get; set; }
}
internal sealed class ElementProperty
{
public string Label { get; set; }
public string Value { get; set; }
}
internal sealed class GetVersionCommandResponse
{
public ICollection<int> SupportedVersions { get; set; }
}
}
}
================================================
FILE: Source/QuestPDF/Companion/CompanionService.cs
================================================
#if NET6_0_OR_GREATER
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;
using QuestPDF.Drawing;
using QuestPDF.Drawing.DocumentCanvases;
namespace QuestPDF.Companion
{
internal sealed class CompanionService
{
private int Port { get; }
private HttpClient HttpClient { get; }
public event Action? OnCompanionStopped;
private const int RequiredCompanionApiVersion = 3;
private static CompanionDocumentSnapshot? CurrentDocumentSnapshot { get; set; }
public static bool IsCompanionAttached { get; private set; }
public static bool IsDocumentHotReloaded { get; set; } = false;
JsonSerializerOptions JsonSerializerOptions = new()
{
MaxDepth = 256,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }
};
public CompanionService(int port)
{
IsCompanionAttached = true;
Port = port;
HttpClient = new()
{
BaseAddress = new Uri($"http://localhost:{port}/"),
Timeout = TimeSpan.FromSeconds(5)
};
}
public async Task Connect()
{
await CheckIfCompanionIsRunning();
await CheckCompanionVersionCompatibility();
StartNotifyPresenceTask();
}
private async Task CheckIfCompanionIsRunning()
{
try
{
using var result = await HttpClient.GetAsync("/ping");
result.EnsureSuccessStatusCode();
}
catch
{
throw new Exception("Cannot connect to the QuestPDF Companion tool. Please ensure that the tool is running and the port is correct. Learn more: https://www.questpdf.com/companion/usage.html");
}
}
internal async Task StartNotifyPresenceTask()
{
while (true)
{
try
{
using var result = await HttpClient.PostAsJsonAsync($"/v{RequiredCompanionApiVersion}/notify", new CompanionCommands.Notify(), JsonSerializerOptions);
}
catch
{
}
await Task.Delay(TimeSpan.FromMilliseconds(250));
}
}
private async Task CheckCompanionVersionCompatibility()
{
using var result = await HttpClient.GetAsync("/version");
var response = await result.Content.ReadFromJsonAsync<CompanionCommands.GetVersionCommandResponse>();
if (response.SupportedVersions.Contains(RequiredCompanionApiVersion))
return;
throw new Exception($"The QuestPDF Companion application is not compatible. Please install the QuestPDF Companion tool in a proper version.");
}
public async Task RefreshPreview(CompanionDocumentSnapshot companionDocumentSnapshot)
{
// clean old state
if (CurrentDocumentSnapshot != null)
{
foreach (var companionPageSnapshot in CurrentDocumentSnapshot.Pictures)
companionPageSnapshot.Picture.Dispose();
}
// set new state
CurrentDocumentSnapshot = companionDocumentSnapshot;
var documentStructure = new CompanionCommands.UpdateDocumentStructure
{
Hierarchy = companionDocumentSnapshot.Hierarchy.ImproveHierarchyStructure(),
IsDocumentHotReloaded = IsDocumentHotReloaded,
Pages = companionDocumentSnapshot
.Pictures
.Select(x => new CompanionCommands.UpdateDocumentStructure.PageSize
{
Width = x.Size.Width,
Height = x.Size.Height
})
.ToArray()
};
await HttpClient.PostAsJsonAsync($"/v{RequiredCompanionApiVersion}/documentPreview/update", documentStructure, JsonSerializerOptions);
}
public void StartRenderRequestedPageSnapshotsTask(CancellationToken cancellationToken)
{
Task.Run(async () =>
{
while (!cancellationToken.IsCancellationRequested)
{
try
{
await RenderRequestedPageSnapshots();
}
catch
{
await Task.Delay(TimeSpan.FromMilliseconds(250), cancellationToken);
}
}
});
}
private async Task RenderRequestedPageSnapshots()
{
// get requests
var getRequestedSnapshots = await HttpClient.GetAsync($"/v{RequiredCompanionApiVersion}/documentPreview/getRenderingRequests");
getRequestedSnapshots.EnsureSuccessStatusCode();
var requestedSnapshots = await getRequestedSnapshots.Content.ReadFromJsonAsync<ICollection<PageSnapshotIndex>>();
if (!requestedSnapshots.Any())
return;
if (CurrentDocumentSnapshot == null)
return;
// render snapshots
if (!requestedSnapshots.Any())
return;
var renderingTasks = requestedSnapshots
.Select(index => Task.Run(() =>
{
var image = CurrentDocumentSnapshot
.Pictures
.ElementAt(index.PageIndex)
.RenderImage(index.ZoomLevel);
return new CompanionCommands.ProvideRenderedDocumentPage.RenderedPage
{
PageIndex = index.PageIndex,
ZoomLevel = index.ZoomLevel,
ImageData = Convert.ToBase64String(image)
};
}))
.ToList();
var renderedPages = await Task.WhenAll(renderingTasks);
var command = new CompanionCommands.ProvideRenderedDocumentPage { Pages = renderedPages };
await HttpClient.PostAsJsonAsync($"/v{RequiredCompanionApiVersion}/documentPreview/provideRenderedImages", command);
}
internal async Task InformAboutGenericException(Exception exception)
{
var command = new CompanionCommands.ShowGenericException
{
Exception = Map(exception)
};
await HttpClient.PostAsJsonAsync($"/v{RequiredCompanionApiVersion}/genericException/show", command, JsonSerializerOptions);
return;
static CompanionCommands.ShowGenericException.GenericExceptionDetails Map(Exception exception)
{
return new CompanionCommands.ShowGenericException.GenericExceptionDetails
{
Type = exception.GetType().FullName ?? "Unknown",
Message = exception.Message,
StackTrace = exception.StackTrace.ParseStackTrace(),
InnerException = exception.InnerException == null ? null : Map(exception.InnerException)
};
}
}
}
}
#endif
================================================
FILE: Source/QuestPDF/Companion/Helpers.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using QuestPDF.Drawing.Proxy;
using QuestPDF.Elements;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
namespace QuestPDF.Companion;
internal static class CompanionModelHelpers
{
internal static CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement ExtractHierarchy(this Element container)
{
var layoutTree = container.ExtractElementsOfType<LayoutProxy>().Single();
return Traverse(layoutTree);
CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement Traverse(TreeNode<LayoutProxy> node)
{
var child = node.Value.Child;
while (child is ElementProxy elementProxy)
child = elementProxy.Child;
if (child is Container)
return Traverse(node.Children.Single());
var hierarchyElement = MapToHierarchyElement(node);
// special case to optimize the hierarchy structure in the Companion App
if (child is StyledBox styledBox)
{
var customContentChildren = styledBox
.GetCompanionCustomContent()
.Select(x => hierarchyElement with { ElementType = x.Type, Hint = x.Hint })
.ToArray();
if (customContentChildren.Length == 0)
return hierarchyElement;
for (var i = 0; i <= customContentChildren.Length - 2; i++)
customContentChildren[i].Children = [customContentChildren[i + 1]];
return customContentChildren.First();
}
return hierarchyElement;
}
CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement MapToHierarchyElement(TreeNode<LayoutProxy> node)
{
var layout = node.Value;
var child = layout.Child;
while (child is ElementProxy proxy)
child = proxy.Child;
return new CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement
{
Element = child,
ElementType = child.GetType().Name,
Hint = child.GetCompanionHint(),
SearchableContent = child.GetCompanionSearchableContent(),
PageLocations = layout.Snapshots,
SourceCodeDeclarationPath = GetSourceCodePath(child.CodeLocation),
LayoutErrorMeasurements = layout.LayoutErrorMeasurements,
IsSingleChildContainer = child is ContainerElement,
Properties = child.GetCompanionProperties()?.Select(x => new CompanionCommands.ElementProperty { Label = x.Key, Value = x.Value }).ToList() ?? [],
Children = node.Children.Select(Traverse).ToList()
};
}
}
private static CompanionCommands.UpdateDocumentStructure.SourceCodePath? GetSourceCodePath(SourceCodePath? path)
{
if (path == null)
return null;
return new CompanionCommands.UpdateDocumentStructure.SourceCodePath
{
FilePath = path.Value.FilePath,
LineNumber = path.Value.LineNumber
};
}
#if NET6_0_OR_GREATER
internal static CompanionCommands.ShowGenericException.StackFrame[] ParseStackTrace(this string stackTrace)
{
var lines = stackTrace.Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries);
var frames = new List<CompanionCommands.ShowGenericException.StackFrame>();
foreach (string line in lines)
{
var fullMatch = Regex.Match(line, @"at\s+(?<codeLocation>.+)\s+in\s(?<fileName>.+)\s*:line\s(?<lineNumber>\d+)");
var codeOnlyMatch = Regex.Match(line, @"at\s+(?<codeLocation>.+)");
if (fullMatch.Success)
{
frames.Add(new CompanionCommands.ShowGenericException.StackFrame
{
CodeLocation = fullMatch.Groups["codeLocation"].Value,
FileName = fullMatch.Groups["fileName"].Value,
LineNumber = int.Parse(fullMatch.Groups["lineNumber"].Value)
});
}
else if (codeOnlyMatch.Success)
{
frames.Add(new CompanionCommands.ShowGenericException.StackFrame
{
CodeLocation = codeOnlyMatch.Groups["codeLocation"].Value
});
}
}
return frames.ToArray();
}
#endif
internal static CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement ImproveHierarchyStructure(this CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement root)
{
var document = FindDocumentStructurePointersThat(root, x => x == DocumentStructureTypes.Document).Single();
document.IsSingleChildContainer = false;
var pages = FindDocumentStructurePointersThat(document, x => x == DocumentStructureTypes.Page).ToList();
foreach (var page in pages)
{
page.IsSingleChildContainer = false;
page.Children = FindDocumentStructurePointersThat(page, x => x is not (DocumentStructureTypes.Document or DocumentStructureTypes.Page)).ToList();
}
document.Children = pages;
if (pages.Count == 1)
document.Children = pages.Single().Children;
return document;
ICollection<CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement> FindDocumentStructurePointersThat(CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement root, Predicate<DocumentStructureTypes> predicate)
{
var result = new List<CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement>();
Traverse(root);
return result;
void Traverse(CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement element)
{
if (element.Element is DebugPointer { Type: DebugPointerType.DocumentStructure } debugPointer && Enum.TryParse<DocumentStructureTypes>(debugPointer.Label, out var structureType) && predicate(structureType))
{
result.Add(element);
return;
}
foreach (var child in element.Children)
Traverse(child);
}
}
}
}
================================================
FILE: Source/QuestPDF/Companion/HotReloadManager.cs
================================================
#if NET6_0_OR_GREATER
using System;
using QuestPDF.Companion;
[assembly: System.Reflection.Metadata.MetadataUpdateHandler(typeof(HotReloadManager))]
namespace QuestPDF.Companion
{
/// <summary>
/// Helper to subscribe to hot reload notifications.
/// </summary>
internal static class HotReloadManager
{
public static event EventHandler? UpdateApplicationRequested;
public static void UpdateApplication(Type[]? _)
{
UpdateApplicationRequested?.Invoke(null, EventArgs.Empty);
}
}
}
#endif
================================================
FILE: Source/QuestPDF/Companion/Previewer.cs
================================================
using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using QuestPDF.Companion;
using QuestPDF.Drawing;
using QuestPDF.Infrastructure;
namespace QuestPDF.Previewer;
public static class PreviewerExtensions
{
private const string ObsoleteMessage = "The Previewer application is no longer supprted. Please use a new QuestPDF Companion application by calling ShowInCompanion() or ShowInCompanionAsync() methods.";
#if NET6_0_OR_GREATER
[Obsolete(ObsoleteMessage)]
[ExcludeFromCodeCoverage]
public static void ShowInPreviewer(this IDocument document, int port = 12500)
{
throw new NotImplementedException(ObsoleteMessage);
}
[Obsolete(ObsoleteMessage)]
[ExcludeFromCodeCoverage]
public static Task ShowInPreviewerAsync(this IDocument document, int port = 12500, CancellationToken cancellationToken = default)
{
throw new NotImplementedException(ObsoleteMessage);
}
#else
[Obsolete(ObsoleteMessage)]
[ExcludeFromCodeCoverage]
public static void ShowInPreviewer(this IDocument document, int port = 12500)
{
throw new NotSupportedException(ObsoleteMessage);
}
[Obsolete(ObsoleteMessage)]
[ExcludeFromCodeCoverage]
public static async Task ShowInPreviewerAsync(this IDocument document, int port = 12500, CancellationToken cancellationToken = default)
{
throw new NotSupportedException(ObsoleteMessage);
}
#endif
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentCanvases/CompanionDocumentCanvas.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using QuestPDF.Companion;
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Drawing.DocumentCanvases
{
internal sealed class CompanionPageSnapshot
{
public SkPicture Picture { get; set; }
public Size Size { get; set; }
public CompanionPageSnapshot(SkPicture picture, Size size)
{
Picture = picture;
Size = size;
}
public byte[] RenderImage(int zoomLevel)
{
// prepare canvas
var scale = (float)Math.Pow(2, zoomLevel);
using var bitmap = new SkBitmap((int)(Size.Width * scale), (int)(Size.Height * scale));
using var canvas = SkCanvas.CreateFromBitmap(bitmap);
canvas.Scale(scale, scale);
// draw white background
using var backgroundPaint = new SkPaint();
backgroundPaint.SetSolidColor(Colors.White);
var backgroundRect = new SkRect(0, 0, Size.Width, Size.Height);
canvas.DrawRectangle(backgroundRect, backgroundPaint);
// draw content
canvas.DrawPicture(Picture);
// export as image
using var encodedBitmapData = bitmap.EncodeAsJpeg(90);
return encodedBitmapData.ToBytes();
}
}
internal sealed class CompanionDocumentSnapshot
{
public ICollection<CompanionPageSnapshot> Pictures { get; set; }
public CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement Hierarchy { get; set; }
}
internal sealed class CompanionDocumentCanvas : IDocumentCanvas, IDisposable
{
private ProxyDrawingCanvas DrawingCanvas { get; } = new();
private Size CurrentPageSize { get; set; } = Size.Zero;
private ICollection<CompanionPageSnapshot> PageSnapshots { get; } = new List<CompanionPageSnapshot>();
internal CompanionCommands.UpdateDocumentStructure.DocumentHierarchyElement Hierarchy { get; set; }
public CompanionDocumentSnapshot GetContent()
{
return new CompanionDocumentSnapshot
{
Pictures = PageSnapshots,
Hierarchy = Hierarchy
};
}
#region IDisposable
~CompanionDocumentCanvas()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
DrawingCanvas.Dispose();
GC.SuppressFinalize(this);
}
#endregion
#region IDocumentCanvas
public void SetSemanticTree(SemanticTreeNode? semanticTree)
{
}
public void BeginDocument()
{
PageSnapshots.Clear();
}
public void EndDocument()
{
}
public void BeginPage(Size size)
{
CurrentPageSize = size;
DrawingCanvas.Target = new SkiaDrawingCanvas(size.Width, size.Height);
DrawingCanvas.SetZIndex(0);
}
public void EndPage()
{
Debug.Assert(!CurrentPageSize.IsCloseToZero());
using var pictureRecorder = new SkPictureRecorder();
using var canvas = pictureRecorder.BeginRecording(CurrentPageSize.Width, CurrentPageSize.Height);
using var snapshot = DrawingCanvas.GetSnapshot();
snapshot.DrawOnSkCanvas(canvas);
canvas.Save();
var picture = pictureRecorder.EndRecording();
PageSnapshots.Add(new CompanionPageSnapshot(picture, CurrentPageSize));
}
public IDrawingCanvas GetDrawingCanvas()
{
return DrawingCanvas;
}
#endregion
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentCanvases/DiscardDocumentCanvas.cs
================================================
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing.DocumentCanvases;
internal sealed class DiscardDocumentCanvas : IDocumentCanvas
{
private DiscardDrawingCanvas DrawingCanvas { get; } = new();
public void SetSemanticTree(SemanticTreeNode? semanticTree)
{
}
public void BeginDocument()
{
}
public void EndDocument()
{
}
public void BeginPage(Size size)
{
}
public void EndPage()
{
}
public IDrawingCanvas GetDrawingCanvas()
{
return DrawingCanvas;
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentCanvases/ImageDocumentCanvas.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Drawing.DocumentCanvases
{
internal sealed class ImageDocumentCanvas : IDocumentCanvas, IDisposable
{
private ImageGenerationSettings Settings { get; }
private SkBitmap Bitmap { get; set; }
private SkCanvas? CurrentPageCanvas { get; set; }
private ProxyDrawingCanvas DrawingCanvas { get; } = new();
internal ICollection<byte[]> Images { get; } = new List<byte[]>();
public ImageDocumentCanvas(ImageGenerationSettings settings)
{
Settings = settings;
}
#region IDisposable
~ImageDocumentCanvas()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
CurrentPageCanvas?.Dispose();
Bitmap?.Dispose();
DrawingCanvas?.Dispose();
GC.SuppressFinalize(this);
}
#endregion
#region IDocumentCanvas
public void SetSemanticTree(SemanticTreeNode? semanticTree)
{
}
public void BeginDocument()
{
}
public void EndDocument()
{
CurrentPageCanvas?.Dispose();
Bitmap?.Dispose();
}
public void BeginPage(Size size)
{
var scalingFactor = Settings.RasterDpi / (float) PageSizes.PointsPerInch;
Bitmap = new SkBitmap((int) (size.Width * scalingFactor), (int) (size.Height * scalingFactor));
CurrentPageCanvas = SkCanvas.CreateFromBitmap(Bitmap);
CurrentPageCanvas.Scale(scalingFactor, scalingFactor);
if (Settings.ImageFormat == ImageFormat.Jpeg)
{
using var whitePaint = new SkPaint();
whitePaint.SetSolidColor(Colors.White);
CurrentPageCanvas.DrawRectangle(new SkRect(0, 0, size.Width, size.Height), whitePaint);
}
DrawingCanvas.Target = new SkiaDrawingCanvas(size.Width, size.Height);
DrawingCanvas.SetZIndex(0);
}
public void EndPage()
{
Debug.Assert(CurrentPageCanvas != null);
using var documentPageSnapshot = DrawingCanvas.GetSnapshot();
documentPageSnapshot.DrawOnSkCanvas(CurrentPageCanvas);
CurrentPageCanvas.Save();
CurrentPageCanvas.Dispose();
CurrentPageCanvas = null;
using var imageData = EncodeBitmap();
var imageBytes = imageData.ToBytes();
Images.Add(imageBytes);
Bitmap.Dispose();
SkData EncodeBitmap()
{
return Settings.ImageFormat switch
{
ImageFormat.Jpeg => Bitmap.EncodeAsJpeg(Settings.ImageCompressionQuality.ToQualityValue()),
ImageFormat.Png => Bitmap.EncodeAsPng(),
ImageFormat.Webp => Bitmap.EncodeAsWebp(Settings.ImageCompressionQuality.ToQualityValue()),
_ => throw new ArgumentOutOfRangeException()
};
}
}
public IDrawingCanvas GetDrawingCanvas()
{
return DrawingCanvas;
}
#endregion
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentCanvases/PdfDocumentCanvas.cs
================================================
using System;
using System.Diagnostics;
using System.Linq;
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Drawing.Exceptions;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Drawing.DocumentCanvases
{
internal sealed class PdfDocumentCanvas : IDocumentCanvas, IDisposable
{
private SkWriteStream WriteStream { get; }
private DocumentMetadata DocumentMetadata { get; }
private DocumentSettings DocumentSettings { get; }
private SkPdfTag? SemanticTag { get; set; }
private SkDocument? Document { get; set; }
private SkCanvas? CurrentPageCanvas { get; set; }
private ProxyDrawingCanvas DrawingCanvas { get; } = new();
public PdfDocumentCanvas(SkWriteStream stream, DocumentMetadata documentMetadata, DocumentSettings documentSettings)
{
WriteStream = stream;
DocumentMetadata = documentMetadata;
DocumentSettings = documentSettings;
}
private SkDocument CreatePdf()
{
// do not extract to another method, as it will cause the SkText objects
// to be disposed before the SkPdfDocument is created
using var title = new SkText(DocumentMetadata.Title);
using var author = new SkText(DocumentMetadata.Author);
using var subject = new SkText(DocumentMetadata.Subject);
using var keywords = new SkText(DocumentMetadata.Keywords);
using var creator = new SkText(DocumentMetadata.Creator);
using var producer = new SkText(DocumentMetadata.Producer);
using var language = new SkText(DocumentMetadata.Language);
var internalMetadata = new SkPdfDocumentMetadata
{
Title = title,
Author = author,
Subject = subject,
Keywords = keywords,
Creator = creator,
Producer = producer,
Language = language,
CreationDate = new SkDateTime(DocumentMetadata.CreationDate),
ModificationDate = new SkDateTime(DocumentMetadata.ModifiedDate),
PDFA_Conformance = GetPDFAConformanceLevel(DocumentSettings.PDFA_Conformance),
PDFUA_Conformance = GetPDFUAConformanceLevel(DocumentSettings.PDFUA_Conformance),
RasterDPI = DocumentSettings.ImageRasterDpi,
CompressDocument = DocumentSettings.CompressDocument,
SemanticNodeRoot = SemanticTag?.Instance ?? IntPtr.Zero
};
try
{
return SkPdfDocument.Create(WriteStream, internalMetadata);
}
catch (TypeInitializationException exception)
{
throw new InitializationException("PDF", exception);
}
}
static Skia.PDFA_Conformance GetPDFAConformanceLevel(Infrastructure.PDFA_Conformance conformanceLevel)
{
return conformanceLevel switch
{
Infrastructure.PDFA_Conformance.None => Skia.PDFA_Conformance.None,
// Infrastructure.PDFA_Conformance.PDFA_1A => Skia.PDFA_Conformance.PDFA_1A,
// Infrastructure.PDFA_Conformance.PDFA_1B => Skia.PDFA_Conformance.PDFA_1B,
Infrastructure.PDFA_Conformance.PDFA_2A => Skia.PDFA_Conformance.PDFA_2A,
Infrastructure.PDFA_Conformance.PDFA_2B => Skia.PDFA_Conformance.PDFA_2B,
Infrastructure.PDFA_Conformance.PDFA_2U => Skia.PDFA_Conformance.PDFA_2U,
Infrastructure.PDFA_Conformance.PDFA_3A => Skia.PDFA_Conformance.PDFA_3A,
Infrastructure.PDFA_Conformance.PDFA_3B => Skia.PDFA_Conformance.PDFA_3B,
Infrastructure.PDFA_Conformance.PDFA_3U => Skia.PDFA_Conformance.PDFA_3U,
_ => throw new ArgumentOutOfRangeException(nameof(conformanceLevel), conformanceLevel, "Unsupported PDF/A conformance level")
};
}
static Skia.PDFUA_Conformance GetPDFUAConformanceLevel(Infrastructure.PDFUA_Conformance conformanceLevel)
{
return conformanceLevel switch
{
Infrastructure.PDFUA_Conformance.None => Skia.PDFUA_Conformance.None,
Infrastructure.PDFUA_Conformance.PDFUA_1 => Skia.PDFUA_Conformance.PDFUA_1,
_ => throw new ArgumentOutOfRangeException(nameof(conformanceLevel), conformanceLevel, "Unsupported PDF/UA conformance level")
};
}
#region IDisposable
~PdfDocumentCanvas()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
Document?.Dispose();
CurrentPageCanvas?.Dispose();
DrawingCanvas?.Dispose();
SemanticTag?.Dispose();
// don't dispose WriteStream - its lifetime is managed externally
GC.SuppressFinalize(this);
}
#endregion
#region IDocumentCanvas
public void SetSemanticTree(SemanticTreeNode? semanticTree)
{
if (semanticTree == null)
{
SemanticTag?.Dispose();
SemanticTag = null;
return;
}
SemanticTag = Convert(semanticTree);
static SkPdfTag Convert(SemanticTreeNode node)
{
var result = SkPdfTag.Create(node.NodeId, node.Type, node.Alt, node.Lang);
var children = node.Children.Select(Convert).ToArray();
result.SetChildren(children);
foreach (var nodeAttribute in node.Attributes)
result.AddAttribute(nodeAttribute.Owner, nodeAttribute.Name, nodeAttribute.Value);
return result;
}
}
public void BeginDocument()
{
Document ??= CreatePdf();
}
public void EndDocument()
{
Document?.Close();
Document?.Dispose();
}
public void BeginPage(Size size)
{
CurrentPageCanvas = Document?.BeginPage(size.Width, size.Height);
DrawingCanvas.Target = new SkiaDrawingCanvas(size.Width, size.Height);
DrawingCanvas.SetZIndex(0);
}
public void EndPage()
{
Debug.Assert(CurrentPageCanvas != null);
using var documentPageSnapshot = DrawingCanvas.GetSnapshot();
documentPageSnapshot.DrawOnSkCanvas(CurrentPageCanvas);
CurrentPageCanvas.Save();
CurrentPageCanvas.Dispose();
CurrentPageCanvas = null;
Document.EndPage();
}
public IDrawingCanvas GetDrawingCanvas()
{
return DrawingCanvas;
}
#endregion
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentCanvases/SemanticDocumentCanvas.cs
================================================
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing.DocumentCanvases;
internal sealed class SemanticDocumentCanvas : IDocumentCanvas
{
private SemanticDrawingCanvas DrawingCanvas { get; } = new();
public void SetSemanticTree(SemanticTreeNode? semanticTree)
{
}
public void BeginDocument()
{
}
public void EndDocument()
{
}
public void BeginPage(Size size)
{
}
public void EndPage()
{
}
public IDrawingCanvas GetDrawingCanvas()
{
return DrawingCanvas;
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentCanvases/SvgDocumentCanvas.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Drawing.DocumentCanvases
{
internal sealed class SvgDocumentCanvas : IDocumentCanvas, IDisposable
{
private SkCanvas? CurrentPageCanvas { get; set; }
private ProxyDrawingCanvas DrawingCanvas { get; } = new();
private MemoryStream WriteStream { get; set; }
private SkWriteStream SkiaStream { get; set; }
internal ICollection<string> Images { get; } = new List<string>();
#region IDisposable
~SvgDocumentCanvas()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
CurrentPageCanvas?.Dispose();
WriteStream?.Dispose();
SkiaStream?.Dispose();
DrawingCanvas?.Dispose();
GC.SuppressFinalize(this);
}
#endregion
#region IDocumentCanvas
public void SetSemanticTree(SemanticTreeNode? semanticTree)
{
}
public void BeginDocument()
{
}
public void EndDocument()
{
CurrentPageCanvas?.Dispose();
WriteStream?.Dispose();
SkiaStream?.Dispose();
}
public void BeginPage(Size size)
{
WriteStream?.Dispose();
SkiaStream?.Dispose();
WriteStream = new MemoryStream();
SkiaStream = new SkWriteStream(WriteStream);
CurrentPageCanvas = SkSvgCanvas.CreateSvg(size.Width, size.Height, SkiaStream);
DrawingCanvas.Target = new SkiaDrawingCanvas(size.Width, size.Height);
DrawingCanvas.SetZIndex(0);
}
public void EndPage()
{
Debug.Assert(CurrentPageCanvas != null);
using var documentPageSnapshot = DrawingCanvas.GetSnapshot();
documentPageSnapshot.DrawOnSkCanvas(CurrentPageCanvas);
CurrentPageCanvas.Save();
CurrentPageCanvas.Dispose();
CurrentPageCanvas = null;
SkiaStream.Flush();
var data = WriteStream.ToArray();
var svgImage = Encoding.UTF8.GetString(data);
Images.Add(svgImage);
SkiaStream.Dispose();
WriteStream.Dispose();
}
public IDrawingCanvas GetDrawingCanvas()
{
return DrawingCanvas;
}
#endregion
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentCanvases/XpsDocumentCanvas.cs
================================================
using System;
using System.Diagnostics;
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Drawing.Exceptions;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Drawing.DocumentCanvases
{
internal sealed class XpsDocumentCanvas : IDocumentCanvas, IDisposable
{
private SkDocument Document { get; }
private SkCanvas? CurrentPageCanvas { get; set; }
private ProxyDrawingCanvas DrawingCanvas { get; } = new();
public XpsDocumentCanvas(SkWriteStream stream, DocumentSettings documentSettings)
{
Document = CreateXps(stream, documentSettings);
}
private static SkDocument CreateXps(SkWriteStream stream, DocumentSettings documentSettings)
{
try
{
return SkXpsDocument.Create(stream, documentSettings.ImageRasterDpi);
}
catch (TypeInitializationException exception)
{
throw new InitializationException("XPS", exception);
}
}
#region IDisposable
~XpsDocumentCanvas()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
Document?.Dispose();
CurrentPageCanvas?.Dispose();
DrawingCanvas?.Dispose();
GC.SuppressFinalize(this);
}
#endregion
#region IDocumentCanvas
public void SetSemanticTree(SemanticTreeNode? semanticTree)
{
}
public void BeginDocument()
{
}
public void EndDocument()
{
Document?.Close();
Document?.Dispose();
}
public void BeginPage(Size size)
{
CurrentPageCanvas = Document?.BeginPage(size.Width, size.Height);
DrawingCanvas.Target = new SkiaDrawingCanvas(size.Width, size.Height);
DrawingCanvas.SetZIndex(0);
}
public void EndPage()
{
Debug.Assert(CurrentPageCanvas != null);
using var documentPageSnapshot = DrawingCanvas.GetSnapshot();
documentPageSnapshot.DrawOnSkCanvas(CurrentPageCanvas);
CurrentPageCanvas.Save();
CurrentPageCanvas.Dispose();
CurrentPageCanvas = null;
Document.EndPage();
}
public IDrawingCanvas GetDrawingCanvas()
{
return DrawingCanvas;
}
#endregion
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentContainer.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Elements;
using QuestPDF.Fluent;
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing
{
internal sealed class DocumentContainer : IDocumentContainer
{
internal List<IComponent> Pages { get; set; } = [];
internal Container Compose()
{
var container = new Container();
ComposeContainer(container);
return container;
void ComposeContainer(IContainer container)
{
if (Pages.Count == 0)
Pages.Add(new Page());
container = container.DebugPointer(DebugPointerType.DocumentStructure, DocumentStructureTypes.Document.ToString());
if (Pages.Count == 1)
{
container.Component(Pages.First());
return;
}
container
.Column(column =>
{
Pages
.SelectMany(x => new List<Action>()
{
() => column.Item().PageBreak(),
() => column.Item().SemanticTag("Part").Component(x)
})
.Skip(1)
.ToList()
.ForEach(x => x());
});
}
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentGenerator.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Companion;
using QuestPDF.Drawing.DocumentCanvases;
using QuestPDF.Drawing.Exceptions;
using QuestPDF.Drawing.Proxy;
using QuestPDF.Elements;
using QuestPDF.Elements.Text;
using QuestPDF.Elements.Text.Items;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
using PDFA_Conformance = QuestPDF.Infrastructure.PDFA_Conformance;
using PDFUA_Conformance = QuestPDF.Infrastructure.PDFUA_Conformance;
namespace QuestPDF.Drawing
{
static class DocumentGenerator
{
static DocumentGenerator()
{
SkNativeDependencyCompatibilityChecker.Test();
}
internal static void GeneratePdf(SkWriteStream stream, IDocument document)
{
LicenseChecker.ValidateLicense();
var metadata = document.GetMetadata();
var settings = document.GetSettings();
if (Settings.License == LicenseType.Evaluation)
metadata.Producer = "QuestPDF (Evaluation Mode)";
using var canvas = new PdfDocumentCanvas(stream, metadata, settings);
RenderDocument(canvas, document, settings);
}
internal static void GenerateXps(SkWriteStream stream, IDocument document)
{
LicenseChecker.ValidateLicense();
var settings = document.GetSettings();
using var canvas = new XpsDocumentCanvas(stream, settings);
RenderDocument(canvas, document, settings);
}
internal static ICollection<byte[]> GenerateImages(IDocument document, ImageGenerationSettings imageGenerationSettings)
{
LicenseChecker.ValidateLicense();
var documentSettings = document.GetSettings();
documentSettings.ImageRasterDpi = imageGenerationSettings.RasterDpi;
using var canvas = new ImageDocumentCanvas(imageGenerationSettings);
RenderDocument(canvas, document, documentSettings);
return canvas.Images;
}
internal static ICollection<string> GenerateSvg(IDocument document)
{
LicenseChecker.ValidateLicense();
using var canvas = new SvgDocumentCanvas();
RenderDocument(canvas, document, document.GetSettings());
return canvas.Images;
}
internal static CompanionDocumentSnapshot GenerateCompanionContent(IDocument document)
{
using var canvas = new CompanionDocumentCanvas();
RenderDocument(canvas, document, DocumentSettings.Default);
return canvas.GetContent();
}
internal static void RenderDocument(IDocumentCanvas canvas, IDocument document, DocumentSettings settings)
{
if (document is MergedDocument mergedDocument)
{
RenderMergedDocument(canvas, mergedDocument, settings);
return;
}
var semanticTreeManager = CreateSemanticTreeManager(settings);
var useOriginalImages = canvas is ImageDocumentCanvas;
var content = ConfigureContent(document, settings, semanticTreeManager, useOriginalImages);
if (canvas is CompanionDocumentCanvas)
content.VisitChildren(x => x.CreateProxy(y => new LayoutProxy(y)));
try
{
var pageContext = new PageContext();
RenderPass(pageContext, new SemanticDocumentCanvas(), content);
pageContext.ProceedToNextRenderingPhase();
canvas.ConfigureWithSemanticTree(semanticTreeManager);
canvas.BeginDocument();
RenderPass(pageContext, canvas, content);
canvas.EndDocument();
if (canvas is CompanionDocumentCanvas companionCanvas)
companionCanvas.Hierarchy = content.ExtractHierarchy();
}
finally
{
content.ReleaseDisposableChildren();
}
}
private static void RenderMergedDocument(IDocumentCanvas canvas, MergedDocument document, DocumentSettings settings)
{
var useOriginalImages = canvas is ImageDocumentCanvas;
var sharedPageContent = new PageContext();
var useSharedPageContext = document.PageNumberStrategy == MergedDocumentPageNumberStrategy.Continuous;
var semanticTreeManager = CreateSemanticTreeManager(settings);
var semanticDocumentCanvas = new SemanticDocumentCanvas();
var documentParts = Enumerable
.Range(0, document.Documents.Count)
.Select(index => new
{
DocumentId = index,
Content = ConfigureContent(document.Documents[index], settings, semanticTreeManager, useOriginalImages),
PageContext = useSharedPageContext ? sharedPageContent : new PageContext()
})
.ToList();
try
{
foreach (var documentPart in documentParts)
{
documentPart.PageContext.SetDocumentId(documentPart.DocumentId);
RenderPass(documentPart.PageContext, semanticDocumentCanvas, documentPart.Content);
}
foreach (var documentPart in documentParts)
documentPart.PageContext.ProceedToNextRenderingPhase();
canvas.ConfigureWithSemanticTree(semanticTreeManager);
canvas.BeginDocument();
foreach (var documentPart in documentParts)
{
documentPart.PageContext.SetDocumentId(documentPart.DocumentId);
RenderPass(documentPart.PageContext, canvas, documentPart.Content);
documentPart.Content.ReleaseDisposableChildren();
}
canvas.EndDocument();
}
finally
{
documentParts.ForEach(x => x.Content.ReleaseDisposableChildren());
}
}
private static SemanticTreeManager? CreateSemanticTreeManager(DocumentSettings settings)
{
return IsDocumentSemanticAware() ? new SemanticTreeManager() : null;
bool IsDocumentSemanticAware()
{
if (settings.PDFUA_Conformance is not PDFUA_Conformance.None)
return true;
//if (settings.PDFA_Conformance is PDFA_Conformance.PDFA_1A or PDFA_Conformance.PDFA_2A or PDFA_Conformance.PDFA_3A)
if (settings.PDFA_Conformance is PDFA_Conformance.PDFA_2A or PDFA_Conformance.PDFA_3A)
return true;
return false;
}
}
private static void ConfigureWithSemanticTree(this IDocumentCanvas canvas, SemanticTreeManager? semanticTreeManager)
{
if (semanticTreeManager == null)
return;
var semanticTree = semanticTreeManager.GetSemanticTree();
semanticTreeManager.Reset();
canvas.SetSemanticTree(semanticTree);
}
private static Container ConfigureContent(IDocument document, DocumentSettings settings, SemanticTreeManager? semanticTreeManager, bool useOriginalImages)
{
var container = new DocumentContainer();
document.Compose(container);
var content = container.Compose();
content.ApplyInheritedAndGlobalTexStyle(TextStyle.Default);
content.ApplyContentDirection(settings.ContentDirection);
content.ApplyDefaultImageConfiguration(settings.ImageRasterDpi, settings.ImageCompressionQuality, useOriginalImages);
if (Settings.EnableCaching)
content.ApplyCaching();
if (semanticTreeManager != null)
{
content.ApplySemanticParagraphs();
content.InjectSemanticTreeManager(semanticTreeManager);
}
return content;
}
private static void RenderPass(PageContext pageContext, IDocumentCanvas canvas, ContainerElement content)
{
content.InjectDependencies(pageContext, canvas.GetDrawingCanvas());
content.VisitChildren(x => (x as IStateful)?.ResetState(hardReset: true));
while(true)
{
pageContext.IncrementPageNumber();
var spacePlan = content.Measure(Size.Max);
if (spacePlan.Type == SpacePlanType.Wrap)
{
pageContext.DecrementPageNumber();
canvas.EndDocument();
#if NET6_0_OR_GREATER
if (!CompanionService.IsCompanionAttached)
ThrowLayoutException();
#else
ThrowLayoutException();
#endif
ApplyLayoutDebugging();
}
try
{
canvas.BeginPage(spacePlan);
content.Draw(spacePlan);
}
catch (Exception exception)
{
canvas.EndDocument();
throw new DocumentDrawingException("An exception occured during document drawing.", exception);
}
canvas.EndPage();
if (spacePlan.Type == SpacePlanType.FullRender)
break;
}
void ApplyLayoutDebugging()
{
content.VisitChildren(x => (x as SnapshotCacheRecorderProxy)?.Dispose());
content.RemoveExistingProxiesOfType<SnapshotCacheRecorderProxy>();
content.ApplyLayoutOverflowDetection();
content.Measure(Size.Max);
var overflowState = content.ExtractElementsOfType<OverflowDebuggingProxy>().Single();
overflowState.StopMeasuring();
overflowState.TryToFixTheLayoutOverflowIssue();
content.ApplyContentDirection();
content.InjectDependencies(pageContext, canvas.GetDrawingCanvas());
content.VisitChildren(x => (x as LayoutProxy)?.CaptureLayoutErrorMeasurement());
content.RemoveExistingProxiesOfType<OverflowDebuggingProxy>();
}
void ThrowLayoutException()
{
var newLine = "\n";
var newParagraph = newLine + newLine;
const string debuggingSettingsName = $"{nameof(QuestPDF)}.{nameof(Settings)}.{nameof(Settings.EnableDebugging)}";
var message =
$"The provided document content contains conflicting size constraints. " +
$"For example, some elements may require more space than is available. {newParagraph}";
if (Settings.EnableDebugging)
{
var (ancestors, layout) = GenerateLayoutExceptionDebuggingInfo();
var ancestorsText = ancestors.FormatAncestors();
var layoutText = layout.FormatLayoutSubtree();
message +=
$"The layout issue is likely present in the following part of the document: {newParagraph}{ancestorsText}{newParagraph}" +
$"To learn more, please analyse the document measurement of the problematic location: {newParagraph}{layoutText}" +
$"{LayoutDebugging.LayoutVisualizationLegend}{newParagraph}" +
$"This detailed information is generated because you run the application with a debugger attached or with the {debuggingSettingsName} flag set to true. ";
}
else
{
message +=
$"To further investigate the location of the root cause, please run the application with a debugger attached or set the {debuggingSettingsName} flag to true. " +
$"The library will generate additional debugging information such as probable code problem location and detailed layout measurement overview.";
}
throw new DocumentLayoutException(message);
}
(ICollection<Element> ancestors, TreeNode<OverflowDebuggingProxy> layout) GenerateLayoutExceptionDebuggingInfo()
{
content.RemoveExistingProxies();
content.ApplyLayoutOverflowDetection();
content.Measure(Size.Max);
var overflowState = content.ExtractElementsOfType<OverflowDebuggingProxy>().Single();
overflowState.StopMeasuring();
overflowState.TryToFixTheLayoutOverflowIssue();
var rootCause = overflowState.FindLayoutOverflowVisualizationNodes().First();
var ancestors = rootCause
.ExtractAncestors()
.Select(x => x.Value.Child)
.Where(x => x is DebugPointer or SourceCodePointer)
.Reverse()
.ToArray();
var layout = rootCause
.ExtractAncestors()
.First(x => x.Value.Child is SourceCodePointer or DebugPointer)
.Children
.First();
return (ancestors, layout);
}
}
internal static void InjectSemanticTreeManager(this Element content, SemanticTreeManager semanticTreeManager)
{
content.VisitChildren(x =>
{
if (x is ISemanticAware semanticAware)
{
semanticAware.SemanticTreeManager = semanticTreeManager;
}
else if (x is TextBlock textBlock)
{
foreach (var textBlockElement in textBlock.Items.OfType<TextBlockElement>())
{
textBlockElement.Element.InjectSemanticTreeManager(semanticTreeManager);
}
}
});
}
internal static void InjectDependencies(this Element content, IPageContext pageContext, IDrawingCanvas canvas)
{
content.VisitChildren(x =>
{
if (x == null)
return;
x.PageContext = pageContext;
x.Canvas = canvas;
});
}
internal static void ApplyCaching(this Element? content)
{
var canApplyCaching = Traverse(content);
if (canApplyCaching)
content?.CreateProxy(x => new SnapshotCacheRecorderProxy(x));
// returns true if can apply caching
bool Traverse(Element? content)
{
if (content is TextBlock textBlock)
{
foreach (var textBlockItem in textBlock.Items)
{
if (textBlockItem is TextBlockPageNumber)
return false;
if (textBlockItem is TextBlockElement textBlockElement && !Traverse(textBlockElement.Element))
return false;
}
return true;
}
if (content is Lazy lazy)
return lazy.IsCacheable;
if (content is DynamicHost)
return false;
if (content is ContainerElement containerElement)
return Traverse(containerElement.Child);
if (content is MultiColumn multiColumn)
{
var multiColumnSupportsCaching = Traverse(multiColumn.Content) && Traverse(multiColumn.Spacer);
multiColumn.Content.RemoveExistingProxies();
multiColumn.Spacer.RemoveExistingProxies();
return multiColumnSupportsCaching;
}
var canApplyCachingPerChild = content.GetChildren().Select(Traverse).ToArray();
if (canApplyCachingPerChild.All(x => x))
return true;
if (content is Row row && row.Items.Any(x => x.Type == RowItemType.Auto))
return false;
var childIndex = 0;
content.CreateProxy(x =>
{
var canApplyCaching = canApplyCachingPerChild[childIndex];
childIndex++;
return canApplyCaching ? new SnapshotCacheRecorderProxy(x) : x;
});
return false;
}
}
internal static void ApplyContentDirection(this Element? content, ContentDirection? direction = null)
{
if (content == null)
return;
if (content is ContentDirectionSetter contentDirectionSetter)
{
ApplyContentDirection(contentDirectionSetter.Child, contentDirectionSetter.ContentDirection);
return;
}
if (content is IContentDirectionAware contentDirectionAware)
contentDirectionAware.ContentDirection = direction ?? contentDirectionAware.ContentDirection;
foreach (var child in content.GetChildren())
ApplyContentDirection(child, direction);
}
internal static void ApplyDefaultImageConfiguration(this Element? content, int imageRasterDpi, ImageCompressionQuality imageCompressionQuality, bool useOriginalImages)
{
content.VisitChildren(x =>
{
if (x is QuestPDF.Elements.Image image)
{
image.TargetDpi ??= imageRasterDpi;
image.CompressionQuality ??= imageCompressionQuality;
image.UseOriginalImage |= useOriginalImages;
}
if (x is QuestPDF.Elements.DynamicImage dynamicImage)
{
dynamicImage.TargetDpi ??= imageRasterDpi;
dynamicImage.CompressionQuality ??= imageCompressionQuality;
dynamicImage.UseOriginalImage |= useOriginalImages;
}
if (x is DynamicHost dynamicHost)
{
dynamicHost.ImageTargetDpi ??= imageRasterDpi;
dynamicHost.ImageCompressionQuality ??= imageCompressionQuality;
dynamicHost.UseOriginalImage |= useOriginalImages;
}
if (x is Lazy lazy)
{
lazy.ImageTargetDpi ??= imageRasterDpi;
lazy.ImageCompressionQuality ??= imageCompressionQuality;
lazy.UseOriginalImage |= useOriginalImages;
}
if (x is TextBlock textBlock)
{
foreach (var textBlockElement in textBlock.Items.OfType<TextBlockElement>())
{
textBlockElement.Element.ApplyDefaultImageConfiguration(imageRasterDpi, imageCompressionQuality, useOriginalImages);
}
}
});
}
internal static void ApplyInheritedAndGlobalTexStyle(this Element? content, TextStyle documentDefaultTextStyle)
{
if (content == null)
return;
if (content is TextBlock textBlock)
{
textBlock.DefaultTextStyle = textBlock.DefaultTextStyle.ApplyInheritedStyle(documentDefaultTextStyle).ApplyGlobalStyle();
foreach (var textBlockItem in textBlock.Items)
{
if (textBlockItem is TextBlockSpan textSpan)
textSpan.Style = textSpan.Style.ApplyInheritedStyle(documentDefaultTextStyle).ApplyGlobalStyle();
if (textBlockItem is TextBlockElement textElement)
ApplyInheritedAndGlobalTexStyle(textElement.Element, documentDefaultTextStyle);
}
return;
}
if (content is DynamicHost dynamicHost)
dynamicHost.TextStyle = dynamicHost.TextStyle.ApplyInheritedStyle(documentDefaultTextStyle);
if (content is Lazy lazy)
lazy.TextStyle = lazy.TextStyle.ApplyInheritedStyle(documentDefaultTextStyle);
if (content is DefaultTextStyle defaultTextStyleElement)
documentDefaultTextStyle = defaultTextStyleElement.TextStyle.ApplyInheritedStyle(documentDefaultTextStyle);
if (content is ContainerElement containerElement)
{
ApplyInheritedAndGlobalTexStyle(containerElement.Child, documentDefaultTextStyle);
}
else
{
foreach (var child in content.GetChildren())
ApplyInheritedAndGlobalTexStyle(child, documentDefaultTextStyle);
}
}
internal static void ApplySemanticParagraphs(this Element root)
{
var isFooterContext = false;
Traverse(root);
void Traverse(Element element)
{
if (element is SemanticTag { TagType: "H" or "H1" or "H2" or "H3" or "H4" or "H5" or "H6" or "P" or "Lbl" })
{
return;
}
else if (element is ArtifactTag)
{
// ignore all Text elements that are marked as artifacts
}
else if (element is DebugPointer { Type: DebugPointerType.DocumentStructure, Label: nameof(DocumentStructureTypes.Footer) } debugPointer)
{
isFooterContext = true;
Traverse(debugPointer.Child);
isFooterContext = false;
}
else if (element is ContainerElement container)
{
if (container.Child is TextBlock textBlock)
{
var textBlockContainsPageNumber = textBlock.Items.Any(x => x is TextBlockPageNumber);
if (isFooterContext && textBlockContainsPageNumber)
{
container.CreateProxy(x => new ArtifactTag
{
Child = x,
Id = SkSemanticNodeSpecialId.PaginationArtifact
});
}
else
{
container.CreateProxy(x => new SemanticTag
{
Child = x,
TagType = "P"
});
}
}
else
{
Traverse(container.Child);
}
}
else
{
foreach (var child in element.GetChildren())
Traverse(child);
}
}
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/DocumentPageSnapshot.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Skia;
namespace QuestPDF.Drawing;
internal class DocumentPageSnapshot : IDisposable
{
public List<LayerSnapshot> Layers { get; init; }
~DocumentPageSnapshot()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
foreach (var layer in Layers)
layer.Picture.Dispose();
Layers.Clear();
GC.SuppressFinalize(this);
}
public class LayerSnapshot
{
public int ZIndex { get; init; }
public SkPicture Picture { get; init; }
}
public void DrawOnSkCanvas(SkCanvas canvas)
{
foreach (var layerSnapshot in Layers.OrderBy(x => x.ZIndex))
canvas.DrawPicture(layerSnapshot.Picture);
}
}
================================================
FILE: Source/QuestPDF/Drawing/DrawingCanvases/DiscardDrawingCanvas.cs
================================================
using System;
using System.Collections.Generic;
using System.Numerics;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
using QuestPDF.Skia.Text;
namespace QuestPDF.Drawing.DrawingCanvases
{
internal sealed class DiscardDrawingCanvas : IDrawingCanvas
{
private Stack<Matrix4x4> MatrixStack { get; } = new();
private Matrix4x4 CurrentMatrix { get; set; } = Matrix4x4.Identity;
private int CurrentZIndex { get; set; } = 0;
public DocumentPageSnapshot GetSnapshot()
{
return new DocumentPageSnapshot();
}
public void DrawSnapshot(DocumentPageSnapshot snapshot)
{
}
public void Save()
{
MatrixStack.Push(CurrentMatrix);
}
public void Restore()
{
CurrentMatrix = MatrixStack.Pop();
}
public void SetZIndex(int index)
{
CurrentZIndex = index;
}
public int GetZIndex()
{
return CurrentZIndex;
}
public SkCanvasMatrix GetCurrentMatrix()
{
return SkCanvasMatrix.FromMatrix4x4(CurrentMatrix);
}
public void SetMatrix(SkCanvasMatrix matrix)
{
CurrentMatrix = matrix.ToMatrix4x4();
}
public void Translate(Position vector)
{
CurrentMatrix = Matrix4x4.CreateTranslation(vector.X, vector.Y, 0) * CurrentMatrix;
}
public void Scale(float scaleX, float scaleY)
{
CurrentMatrix = Matrix4x4.CreateScale(scaleX, scaleY, 1) * CurrentMatrix;
}
public void Rotate(float angle)
{
CurrentMatrix = Matrix4x4.CreateRotationZ((float)Math.PI * angle / 180f) * CurrentMatrix;
}
public void DrawLine(Position start, Position end, SkPaint paint)
{
}
public void DrawRectangle(Position vector, Size size, SkPaint paint)
{
}
public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect outerRect, SkPaint paint)
{
}
public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
{
}
public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lineTo)
{
}
public void DrawImage(SkImage image, Size size)
{
}
public void DrawPicture(SkPicture picture)
{
}
public void DrawSvgPath(string path, Color color)
{
}
public void DrawSvg(SkSvgImage svgImage, Size size)
{
}
public void DrawOverflowArea(SkRect area)
{
}
public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
{
}
public void ClipRectangle(SkRect clipArea)
{
}
public void ClipRoundedRectangle(SkRoundedRect clipArea)
{
}
public void DrawHyperlink(Size size, string url, string? description)
{
}
public void DrawSectionLink(Size size, string sectionName, string? description)
{
}
public void DrawSection(string sectionName)
{
}
public int GetSemanticNodeId()
{
return 0;
}
public void SetSemanticNodeId(int nodeId)
{
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/DrawingCanvases/ProxyDrawingCanvas.cs
================================================
using System;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
using QuestPDF.Skia.Text;
namespace QuestPDF.Drawing.DrawingCanvases;
internal sealed class ProxyDrawingCanvas : IDrawingCanvas, IDisposable
{
public IDrawingCanvas Target { get; set; }
#region IDisposable
~ProxyDrawingCanvas()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
(Target as IDisposable)?.Dispose();
GC.SuppressFinalize(this);
}
#endregion
#region IDrawingCanvas
public DocumentPageSnapshot GetSnapshot()
{
return Target.GetSnapshot();
}
public void DrawSnapshot(DocumentPageSnapshot snapshot)
{
Target.DrawSnapshot(snapshot);
}
public void Save()
{
Target.Save();
}
public void Restore()
{
Target.Restore();
}
public void SetZIndex(int index)
{
Target.SetZIndex(index);
}
public int GetZIndex()
{
return Target.GetZIndex();
}
public SkCanvasMatrix GetCurrentMatrix()
{
return Target.GetCurrentMatrix();
}
public void SetMatrix(SkCanvasMatrix matrix)
{
Target.SetMatrix(matrix);
}
public void Translate(Position vector)
{
Target.Translate(vector);
}
public void Scale(float scaleX, float scaleY)
{
Target.Scale(scaleX, scaleY);
}
public void Rotate(float angle)
{
Target.Rotate(angle);
}
public void DrawLine(Position start, Position end, SkPaint paint)
{
Target.DrawLine(start, end, paint);
}
public void DrawRectangle(Position vector, Size size, SkPaint paint)
{
Target.DrawRectangle(vector, size, paint);
}
public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect outerRect, SkPaint paint)
{
Target.DrawComplexBorder(innerRect, outerRect, paint);
}
public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
{
Target.DrawShadow(shadowRect, shadow);
}
public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lineTo)
{
Target.DrawParagraph(paragraph, lineFrom, lineTo);
}
public void DrawImage(SkImage image, Size size)
{
Target.DrawImage(image, size);
}
public void DrawPicture(SkPicture picture)
{
Target.DrawPicture(picture);
}
public void DrawSvgPath(string path, Color color)
{
Target.DrawSvgPath(path, color);
}
public void DrawSvg(SkSvgImage svgImage, Size size)
{
Target.DrawSvg(svgImage, size);
}
public void DrawOverflowArea(SkRect area)
{
Target.DrawOverflowArea(area);
}
public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
{
Target.ClipOverflowArea(availableSpace, requiredSpace);
}
public void ClipRectangle(SkRect clipArea)
{
Target.ClipRectangle(clipArea);
}
public void ClipRoundedRectangle(SkRoundedRect clipArea)
{
Target.ClipRoundedRectangle(clipArea);
}
public void DrawHyperlink(Size size, string url, string? description)
{
Target.DrawHyperlink(size, url, description);
}
public void DrawSectionLink(Size size, string sectionName, string? description)
{
Target.DrawSectionLink(size, sectionName, description);
}
public void DrawSection(string sectionName)
{
Target.DrawSection(sectionName);
}
public int GetSemanticNodeId()
{
return Target.GetSemanticNodeId();
}
public void SetSemanticNodeId(int nodeId)
{
Target.SetSemanticNodeId(nodeId);
}
#endregion
}
================================================
FILE: Source/QuestPDF/Drawing/DrawingCanvases/SemanticDrawingCanvas.cs
================================================
using System;
using System.Collections.Generic;
using System.Numerics;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
using QuestPDF.Skia.Text;
namespace QuestPDF.Drawing.DrawingCanvases
{
internal sealed class SemanticDrawingCanvas : IDrawingCanvas
{
private Stack<Matrix4x4> MatrixStack { get; } = new();
private Matrix4x4 CurrentMatrix { get; set; } = Matrix4x4.Identity;
private int CurrentZIndex { get; set; } = 0;
public DocumentPageSnapshot GetSnapshot()
{
return new DocumentPageSnapshot();
}
public void DrawSnapshot(DocumentPageSnapshot snapshot)
{
}
public void Save()
{
MatrixStack.Push(CurrentMatrix);
}
public void Restore()
{
CurrentMatrix = MatrixStack.Pop();
}
public void SetZIndex(int index)
{
CurrentZIndex = index;
}
public int GetZIndex()
{
return CurrentZIndex;
}
public SkCanvasMatrix GetCurrentMatrix()
{
return SkCanvasMatrix.FromMatrix4x4(CurrentMatrix);
}
public void SetMatrix(SkCanvasMatrix matrix)
{
CurrentMatrix = matrix.ToMatrix4x4();
}
public void Translate(Position vector)
{
CurrentMatrix = Matrix4x4.CreateTranslation(vector.X, vector.Y, 0) * CurrentMatrix;
}
public void Scale(float scaleX, float scaleY)
{
CurrentMatrix = Matrix4x4.CreateScale(scaleX, scaleY, 1) * CurrentMatrix;
}
public void Rotate(float angle)
{
CurrentMatrix = Matrix4x4.CreateRotationZ((float)Math.PI * angle / 180f) * CurrentMatrix;
}
public void DrawLine(Position start, Position end, SkPaint paint)
{
}
public void DrawRectangle(Position vector, Size size, SkPaint paint)
{
}
public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect outerRect, SkPaint paint)
{
}
public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
{
}
public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lineTo)
{
}
public void DrawImage(SkImage image, Size size)
{
}
public void DrawPicture(SkPicture picture)
{
}
public void DrawSvgPath(string path, Color color)
{
}
public void DrawSvg(SkSvgImage svgImage, Size size)
{
}
public void DrawOverflowArea(SkRect area)
{
}
public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
{
}
public void ClipRectangle(SkRect clipArea)
{
}
public void ClipRoundedRectangle(SkRoundedRect clipArea)
{
}
public void DrawHyperlink(Size size, string url, string? description)
{
}
public void DrawSectionLink(Size size, string sectionName, string? description)
{
}
public void DrawSection(string sectionName)
{
}
public int GetSemanticNodeId()
{
return 0;
}
public void SetSemanticNodeId(int nodeId)
{
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/DrawingCanvases/SkiaDrawingCanvas.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
using QuestPDF.Skia.Text;
namespace QuestPDF.Drawing.DrawingCanvases
{
internal sealed class SkiaDrawingCanvas : IDrawingCanvas, IDisposable
{
public float Width { get; }
public float Height { get; }
public SkiaDrawingCanvas(float width, float height)
{
Width = width;
Height = height;
}
~SkiaDrawingCanvas()
{
Dispose();
}
public void Dispose()
{
CurrentCanvas?.Dispose();
CurrentCanvas = null;
foreach (var layer in ZIndexCanvases.Values)
{
layer.Canvas.Dispose();
layer.PictureRecorder.Dispose();
}
ZIndexCanvases.Clear();
GC.SuppressFinalize(this);
}
#region ZIndex
private SkCanvas CurrentCanvas { get; set; }
private int CurrentZIndex { get; set; } = 0;
private IDictionary<int, (SkPictureRecorder PictureRecorder, SkCanvas Canvas)> ZIndexCanvases { get; } = new Dictionary<int, (SkPictureRecorder, SkCanvas)>();
private SkCanvas GetCanvasForZIndex(int zIndex)
{
if (ZIndexCanvases.TryGetValue(zIndex, out var value))
return value.Canvas;
var pictureRecorder = new SkPictureRecorder();
var canvas = pictureRecorder.BeginRecording(Width, Height);
ZIndexCanvases.Add(zIndex, (pictureRecorder, canvas));
return canvas;
}
#endregion
#region ICanvas
public DocumentPageSnapshot GetSnapshot()
{
return new DocumentPageSnapshot
{
Layers = ZIndexCanvases
.Select(zindex =>
{
using var pictureRecorder = zindex.Value.PictureRecorder;
var picture = pictureRecorder.EndRecording();
zindex.Value.Canvas.Dispose();
return new DocumentPageSnapshot.LayerSnapshot
{
ZIndex = zindex.Key,
Picture = picture
};
})
.ToList()
};
}
public void DrawSnapshot(DocumentPageSnapshot snapshot)
{
foreach (var snapshotLayer in snapshot.Layers.OrderBy(x => x.ZIndex))
{
var canvas = GetCanvasForZIndex(snapshotLayer.ZIndex);
canvas.Save();
canvas.SetCurrentMatrix(SkCanvasMatrix.Identity);
canvas.DrawPicture(snapshotLayer.Picture);
canvas.Restore();
}
}
public void Save()
{
CurrentCanvas.Save();
}
public void Restore()
{
CurrentCanvas.Restore();
}
public void SetZIndex(int index)
{
var currentMatrix = CurrentCanvas?.GetCurrentMatrix() ?? SkCanvasMatrix.Identity;
CurrentZIndex = index;
CurrentCanvas = GetCanvasForZIndex(CurrentZIndex);
CurrentCanvas.SetCurrentMatrix(currentMatrix);
}
public int GetZIndex()
{
return CurrentZIndex;
}
public SkCanvasMatrix GetCurrentMatrix()
{
return CurrentCanvas.GetCurrentMatrix();
}
public void SetMatrix(SkCanvasMatrix matrix)
{
CurrentCanvas.SetCurrentMatrix(matrix);
}
public void Translate(Position vector)
{
CurrentCanvas.Translate(vector.X, vector.Y);
}
public void Scale(float scaleX, float scaleY)
{
CurrentCanvas.Scale(scaleX, scaleY);
}
public void Rotate(float angle)
{
CurrentCanvas.Rotate(angle);
}
public void DrawLine(Position start, Position end, SkPaint paint)
{
var startPoint = new SkPoint(start.X, start.Y);
var endPoint = new SkPoint(end.X, end.Y);
CurrentCanvas.DrawLine(startPoint, endPoint, paint);
}
public void DrawRectangle(Position vector, Size size, SkPaint paint)
{
var position = new SkRect(vector.X, vector.Y, vector.X + size.Width, vector.Y + size.Height);
CurrentCanvas.DrawRectangle(position, paint);
}
public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect outerRect, SkPaint paint)
{
CurrentCanvas.DrawComplexBorder(innerRect, outerRect, paint);
}
public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
{
CurrentCanvas.DrawShadow(shadowRect, shadow);
}
public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lineTo)
{
CurrentCanvas.DrawParagraph(paragraph, lineFrom, lineTo);
}
public void DrawImage(SkImage image, Size size)
{
CurrentCanvas.DrawImage(image, size.Width, size.Height);
}
public void DrawPicture(SkPicture picture)
{
CurrentCanvas.DrawPicture(picture);
}
public void DrawSvgPath(string path, Color color)
{
CurrentCanvas.DrawSvgPath(path, color);
}
public void DrawSvg(SkSvgImage svgImage, Size size)
{
CurrentCanvas.DrawSvg(svgImage, size.Width, size.Height);
}
public void DrawOverflowArea(SkRect area)
{
CurrentCanvas.DrawOverflowArea(area);
}
public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
{
CurrentCanvas.ClipOverflowArea(availableSpace, requiredSpace);
}
public void ClipRectangle(SkRect clipArea)
{
CurrentCanvas.ClipRectangle(clipArea);
}
public void ClipRoundedRectangle(SkRoundedRect clipArea)
{
CurrentCanvas.ClipRoundedRectangle(clipArea);
}
public void DrawHyperlink(Size size, string url, string? description)
{
CurrentCanvas.AnnotateUrl(size.Width, size.Height, url, description);
}
public void DrawSectionLink(Size size, string sectionName, string? description)
{
CurrentCanvas.AnnotateDestinationLink(size.Width, size.Height, sectionName, description);
}
public void DrawSection(string sectionName)
{
CurrentCanvas.AnnotateDestination(sectionName);
}
private int CurrentSemanticNodeId { get; set; } = 0;
public int GetSemanticNodeId()
{
return CurrentSemanticNodeId;
}
public void SetSemanticNodeId(int nodeId)
{
CurrentSemanticNodeId = nodeId;
foreach (var canvas in ZIndexCanvases)
canvas.Value.Canvas.SetSemanticNodeId(nodeId);
}
#endregion
}
}
================================================
FILE: Source/QuestPDF/Drawing/Exceptions/DocumentComposeException.cs
================================================
using System;
namespace QuestPDF.Drawing.Exceptions
{
public sealed class DocumentComposeException : Exception
{
internal DocumentComposeException(string message) : base(message)
{
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/Exceptions/DocumentDrawingException.cs
================================================
using System;
namespace QuestPDF.Drawing.Exceptions
{
public sealed class DocumentDrawingException : Exception
{
internal DocumentDrawingException(string message) : base(message)
{
}
internal DocumentDrawingException(string message, Exception inner) : base(message, inner)
{
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/Exceptions/DocumentLayoutException.cs
================================================
using System;
namespace QuestPDF.Drawing.Exceptions
{
public sealed class DocumentLayoutException : Exception
{
internal DocumentLayoutException(string message) : base(message)
{
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/Exceptions/InitializationException.cs
================================================
using System;
namespace QuestPDF.Drawing.Exceptions
{
public sealed class InitializationException : Exception
{
internal InitializationException(string message) : base(message)
{
}
internal InitializationException(string message, Exception inner) : base(message, inner)
{
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/FontManager.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
using QuestPDF.Skia.Text;
namespace QuestPDF.Drawing
{
/// <summary>
/// <para>By default, the library searches all fonts available in the runtime environment.</para>
/// <para>This may work well on the development environment but may fail in the cloud where fonts are usually not installed.</para>
/// <para>It is safest deploy font files along with the application and then register them using this class.</para>
/// </summary>
public static class FontManager
{
internal static SkTypefaceProvider TypefaceProvider { get; } = new();
internal static SkFontManager CurrentFontManager => Settings.UseEnvironmentFonts ? SkFontManager.Global : SkFontManager.Local;
static FontManager()
{
SkNativeDependencyCompatibilityChecker.Test();
RegisterLibraryDefaultFonts();
}
[Obsolete("Since version 2022.8 this method has been renamed. Please use the RegisterFontWithCustomName method.")]
[ExcludeFromCodeCoverage]
public static void RegisterFontType(string fontName, Stream stream)
{
RegisterFontWithCustomName(fontName, stream);
}
/// <summary>
/// Registers a TrueType font from a stream under the provided custom <paramref name="fontName"/>.
/// Refer to this font by using the same name as a font family in the <see cref="TextStyle"/> API later on.
/// <a href="https://www.questpdf.com/api-reference/text/font-management.html#manual-font-registration">Learn more</a>
/// </summary>
public static void RegisterFontWithCustomName(string fontName, Stream stream)
{
using var fontData = SkData.FromStream(stream);
TypefaceProvider.AddTypefaceFromData(fontData);
TypefaceProvider.AddTypefaceFromData(fontData, fontName);
}
/// <summary>
/// Registers a TrueType font from a stream. The font family name and all related attributes are detected automatically.
/// <a href="https://www.questpdf.com/api-reference/text/font-management.html#manual-font-registration">Learn more</a>
/// </summary>
public static void RegisterFont(Stream stream)
{
using var fontData = SkData.FromStream(stream);
TypefaceProvider.AddTypefaceFromData(fontData);
}
/// <summary>
/// Registers a TrueType font from an embedded resource. The font family name and all related attributes are detected automatically.
/// <a href="https://www.questpdf.com/api-reference/text/font-management.html#manual-font-registration">Learn more</a>
/// </summary>
/// <param name="pathName">Path to the embedded resource (the case-sensitive name of the manifest resource being requested).</param>
public static void RegisterFontFromEmbeddedResource(string pathName)
{
using var stream = Assembly.GetCallingAssembly().GetManifestResourceStream(pathName);
if (stream == null)
throw new ArgumentException($"Cannot load font file from an embedded resource. Please make sure that the resource is available or the path is correct: {pathName}");
RegisterFont(stream);
}
private static void RegisterLibraryDefaultFonts()
{
var fontFilePaths = SearchFontFiles();
foreach (var fileName in fontFilePaths)
{
try
{
using var fontFileStream = File.OpenRead(fileName);
RegisterFont(fontFileStream);
}
catch
{
}
}
ICollection<string> SearchFontFiles()
{
const int maxFilesToScan = 100_000;
var applicationFiles = Settings
.FontDiscoveryPaths
.Where(Directory.Exists)
.Select(TryEnumerateFiles)
.SelectMany(file => file)
.Take(maxFilesToScan)
.ToList();
if (applicationFiles.Count == maxFilesToScan)
throw new InvalidOperationException($"The library has reached the limit of {maxFilesToScan} files to scan for font files. Please adjust the {nameof(Settings.FontDiscoveryPaths)} collection to include only the necessary directories. The reason of this exception is to prevent scanning too many files and avoid performance issues on the application startup.");
var supportedFontExtensions = new[] { ".ttf", ".otf", ".ttc", ".pfb" };
return applicationFiles
.Where(x => supportedFontExtensions.Contains(Path.GetExtension(x).ToLowerInvariant()))
.ToList();
ICollection<string> TryEnumerateFiles(string path)
{
try
{
return Directory
.EnumerateFiles(path, "*.*", SearchOption.AllDirectories)
.Take(maxFilesToScan)
.ToArray();
}
catch
{
return Array.Empty<string>();
}
}
}
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/Proxy/ElementProxy.cs
================================================
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing.Proxy
{
internal class ElementProxy : ContainerElement
{
}
}
================================================
FILE: Source/QuestPDF/Drawing/Proxy/LayoutDebugging.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuestPDF.Elements;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing.Proxy;
internal static class LayoutDebugging
{
internal static SpacePlan TryMeasureWithOverflow(this Element element, Size availableSpace)
{
return TryVerticalOverflow()
?? TryHorizontalOverflow()
?? TryUnconstrainedOverflow()
?? SpacePlan.Wrap("Extending the available space does not allow the child to fit on the page.");
SpacePlan? TryOverflow(Size targetSpace)
{
var contentSize = element.Measure(targetSpace);
return contentSize.Type == SpacePlanType.Wrap ? null : contentSize;
}
SpacePlan? TryVerticalOverflow()
{
var overflowSpace = new Size(availableSpace.Width, Size.Infinity);
return TryOverflow(overflowSpace);
}
SpacePlan? TryHorizontalOverflow()
{
var overflowSpace = new Size(Size.Infinity, availableSpace.Height);
return TryOverflow(overflowSpace);
}
SpacePlan? TryUnconstrainedOverflow()
{
var overflowSpace = new Size(Size.Infinity, Size.Infinity);
return TryOverflow(overflowSpace);
}
}
public static void ApplyLayoutOverflowDetection(this Element container)
{
container.VisitChildren(x =>
{
x.CreateProxy(y => y is ElementProxy ? y : new OverflowDebuggingProxy(y));
});
}
public static void TryToFixTheLayoutOverflowIssue(this TreeNode<OverflowDebuggingProxy> hierarchyRoot)
{
Traverse(hierarchyRoot);
void Traverse(TreeNode<OverflowDebuggingProxy> element)
{
if (element.Value.Child is DebugPointer or SourceCodePointer or Container)
{
Traverse(element.Children.First());
return;
}
if (element.Value.AvailableSpace is null)
return;
// element was not part of the current layout measurement,
// it could not impact the process
if (element.Value.SpacePlan is null)
return;
// element is empty,
// it could not impact the process
if (element.Value.SpacePlan?.Type is SpacePlanType.Empty)
return;
// element renders fully,
// it could not impact the process
if (element.Value.SpacePlan?.Type is SpacePlanType.FullRender)
return;
// when the current element is partially rendering, it likely has no issues,
// however, in certain cases, it may contain a child that is a root cause
if (element.Value.SpacePlan?.Type is SpacePlanType.PartialRender)
{
foreach (var child in element.Children)
Traverse(child);
return;
}
// all the code below relates to element that is wrapping,
// it could be a root cause, or contain a child (even deeply nested) that is the root cause
// strategy:
// the current element does not contain any wrapping children, no obvious root causes,
// if it renders at least partially with extended space, it is a layout root cause
if (element.Children.All(x => x.Value.SpacePlan?.Type is not SpacePlanType.Wrap) && MeasureElementWithExtendedSpace() is not SpacePlanType.Wrap)
{
element.Value.CreateProxy(x => new LayoutOverflowVisualization { Child = x });
return;
}
// strategy:
// the current element contains wrapping children, they are likely the root cause,
// traverse them and attempt to fix them
foreach (var child in element.Children.Where(x => x.Value.SpacePlan?.Type is SpacePlanType.Wrap).ToList())
Traverse(child);
// check if fixing wrapping children resolved the issue under original constraints
if (MeasureElementWithOriginalSpace() is not SpacePlanType.Wrap)
return;
// fixing wrapping children was not sufficient under original constraints;
// if this element fits with extended space, it is also a root cause
if (MeasureElementWithExtendedSpace() is not SpacePlanType.Wrap)
{
element.Value.CreateProxy(x => new LayoutOverflowVisualization { Child = x });
return;
}
// strategy:
// the current element has layout issues but no obvious/trivial root causes,
// possibly the problem is in nested children of partial rendering children
foreach (var child in element.Children.Where(x => x.Value.SpacePlan?.Type is SpacePlanType.PartialRender).ToList())
Traverse(child);
// check if fixing partial children resolved the issue under original constraints
if (MeasureElementWithOriginalSpace() is not SpacePlanType.Wrap)
return;
// none of the attempts above have fixed the layout issue,
// the element itself is the root cause
element.Value.CreateProxy(x => new LayoutOverflowVisualization { Child = x });
SpacePlanType MeasureElementWithExtendedSpace()
{
return element.Value.TryMeasureWithOverflow(element.Value.AvailableSpace!.Value).Type;
}
SpacePlanType MeasureElementWithOriginalSpace()
{
return element.Value.Measure(element.Value.AvailableSpace!.Value).Type;
}
}
}
public static void RemoveExistingProxies(this Element content)
{
content.RemoveExistingProxiesOfType<ElementProxy>();
}
public static void RemoveExistingProxiesOfType<TProxy>(this Element content) where TProxy : ElementProxy
{
content.VisitChildren(x =>
{
x.CreateProxy(y =>
{
if (y is not TProxy proxy)
return y;
(proxy as IDisposable)?.Dispose();
return proxy.Child;
});
});
}
public static void StopMeasuring(this TreeNode<OverflowDebuggingProxy> parent)
{
parent.Value.StopMeasuring();
foreach (var child in parent.Children)
StopMeasuring(child);
}
public static IEnumerable<TreeNode<OverflowDebuggingProxy>> FindLayoutOverflowVisualizationNodes(this TreeNode<OverflowDebuggingProxy> rootNode)
{
var result = new List<TreeNode<OverflowDebuggingProxy>>();
Traverse(rootNode);
return result;
void Traverse(TreeNode<OverflowDebuggingProxy> node)
{
if (node.Value.Child is LayoutOverflowVisualization)
result.Add(node);
foreach (var child in node.Children)
Traverse(child);
}
}
public static string FormatAncestors(this IEnumerable<Element> ancestors)
{
var result = new StringBuilder();
foreach (var ancestor in ancestors)
Format(ancestor);
return result.ToString();
void Format(Element node)
{
if (node is DebugPointer debugPointer)
{
result.AppendLine($"-> {debugPointer.Label}");
}
else if (node is SourceCodePointer sourceCodePointer)
{
result.AppendLine($"-> In method: {sourceCodePointer.MethodName}");
result.AppendLine($" Called from: {sourceCodePointer.CalledFrom}");
result.AppendLine($" Source path: {sourceCodePointer.FilePath}");
result.AppendLine($" Line number: {sourceCodePointer.LineNumber}");
}
else
{
}
result.AppendLine();
}
}
public static string FormatLayoutSubtree(this TreeNode<OverflowDebuggingProxy> root)
{
var indentationCache = Enumerable.Range(0, 128).Select(x => x * 3).Select(x => new string(' ', x)).ToArray();
var indentationLevel = 0;
var result = new StringBuilder();
Traverse(root);
return result.ToString();
void Traverse(TreeNode<OverflowDebuggingProxy> parent)
{
var proxy = parent.Value;
if (proxy.Child is Container)
{
Traverse(parent.Children.First());
return;
}
var indent = indentationCache[indentationLevel];
foreach (var content in Format(proxy))
result.AppendLine($"{indent}{content}");
result.AppendLine();
result.AppendLine();
if (proxy.AvailableSpace is null || proxy.SpacePlan is null)
return;
indentationLevel++;
foreach (var child in parent.Children)
Traverse(child);
indentationLevel--;
}
static IEnumerable<string> Format(OverflowDebuggingProxy proxy)
{
var child = proxy.Child;
if (child is LayoutOverflowVisualization layoutOverflowVisualization)
child = layoutOverflowVisualization.Child;
var title = GetTitle();
yield return title;
yield return new string('=', title.Length + 1);
if (proxy is { AvailableSpace: not null, SpacePlan: not null })
{
yield return $"Available Space: {proxy.AvailableSpace}";
yield return $"Space Plan: {proxy.SpacePlan}";
if (proxy.SpacePlan?.Type == SpacePlanType.Wrap)
yield return "Wrap Reason: " + (proxy.SpacePlan?.WrapReason ?? "Unknown");
yield return new string('-', title.Length + 1);
}
foreach (var configuration in child.GetElementConfiguration())
yield return $"{configuration.Property}: {configuration.Value}";
string GetTitle()
{
var elementName = child.GetType().Name;
if (proxy.Child is LayoutOverflowVisualization)
return $"🚨 {elementName} 🚨";
var indicator = proxy.SpacePlan?.Type switch
{
SpacePlanType.Wrap => "🔴",
SpacePlanType.PartialRender => "🟡",
SpacePlanType.FullRender => "🟢",
SpacePlanType.Empty => "🟢",
_ => "⚪️"
};
return $"{indicator} {elementName}";
}
}
}
public static IEnumerable<(string Property, string Value)> GetElementConfiguration(this IElement element)
{
return element
.GetType()
.GetProperties()
.Select(x => new
{
Property = x.Name.PrettifyName(),
Value = x.GetValue(element)
})
.Where(x => !(x.Value is IElement))
.Where(x => x.Value is string || !(x.Value is IEnumerable))
.Where(x => !(x.Value is TextStyle))
.Select(x => (x.Property, x.Value?.ToString() ?? "-"));
}
public const string LayoutVisualizationLegend =
"Legend: \n" +
"🚨 - Element that is likely the root cause of the layout issue based on library heuristics and prediction. \n" +
"🔴 - Element that cannot be drawn due to the provided layout constraints. This element likely causes the layout issue, or one of its descendant children is responsible for the problem. \n" +
"🟡 - Element that can be partially drawn on the page and will also be rendered on the consecutive page. In more complex layouts, this element may also cause issues or contain a child that is the actual root cause.\n" +
"🟢 - Element that is successfully and completely drawn on the page.\n" +
"⚪️ - Element that has not been drawn on the faulty page. Its children are omitted.\n";
}
================================================
FILE: Source/QuestPDF/Drawing/Proxy/LayoutOverflowVisualization.cs
================================================
using System;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Drawing.Proxy;
internal sealed class LayoutOverflowVisualization : ElementProxy, IContentDirectionAware
{
private const float BorderThickness = 1.5f;
private readonly Color LineColor = Colors.Red.Medium;
private readonly Color AvailableAreaColor = Colors.Green.Medium;
private const byte AreaOpacity = 64;
public ContentDirection ContentDirection { get; set; }
internal override SpacePlan Measure(Size availableSpace)
{
if (Size.Equal(availableSpace, Size.Zero))
return SpacePlan.Wrap("There is no available space.");
var childSize = base.Measure(availableSpace);
if (childSize.Type == SpacePlanType.FullRender)
return childSize;
var minimalSize = Child.TryMeasureWithOverflow(availableSpace);
if (minimalSize.Type is SpacePlanType.Wrap)
return minimalSize;
var width = Math.Min(availableSpace.Width, minimalSize.Width);
var height = Math.Min(availableSpace.Height, minimalSize.Height);
return new SpacePlan(minimalSize.Type, width, height);
}
internal override void Draw(Size availableSpace)
{
// measure content area
var childSize = base.Measure(availableSpace);
if (childSize.Type is SpacePlanType.Empty or SpacePlanType.FullRender)
{
Child?.Draw(availableSpace);
return;
}
Canvas = Child.Canvas;
// check overflow area
var contentArea = Child.TryMeasureWithOverflow(availableSpace);
var contentSize = contentArea.Type is SpacePlanType.Wrap
? Size.Max
: contentArea;
// draw content
var translate = ContentDirection == ContentDirection.RightToLeft
? new Position(availableSpace.Width - contentSize.Width, 0)
: Position.Zero;
Canvas.Translate(translate);
Child?.Draw(contentSize);
Canvas.Translate(translate.Reverse());
// draw overflow area
var overflowTranslate = ContentDirection == ContentDirection.RightToLeft ? new Position(availableSpace.Width, 0) : Position.Zero;
var overflowScale = ContentDirection == ContentDirection.RightToLeft ? -1 : 1;
Canvas.Translate(overflowTranslate);
Canvas.Scale(overflowScale, 1);
DrawOverflowArea(availableSpace, contentSize);
Canvas.Scale(overflowScale, 1);
Canvas.Translate(overflowTranslate.Reverse());
}
private void DrawOverflowArea(Size availableSpace, Size contentSize)
{
using var availableSpacePaint = new SkPaint();
availableSpacePaint.SetSolidColor(AvailableAreaColor.WithAlpha(AreaOpacity));
Canvas.DrawRectangle(Position.Zero, availableSpace, availableSpacePaint);
Canvas.Save();
Canvas.ClipOverflowArea(new SkRect(0, 0, availableSpace.Width, availableSpace.Height), new SkRect(0, 0, contentSize.Width, contentSize.Height));
Canvas.DrawOverflowArea(new SkRect(0, 0, contentSize.Width, contentSize.Height));
Canvas.Restore();
using var borderPaint = new SkPaint();
borderPaint.SetStroke(BorderThickness);
borderPaint.SetSolidColor(LineColor);
Canvas.DrawRectangle(Position.Zero, contentSize, borderPaint);
}
}
================================================
FILE: Source/QuestPDF/Drawing/Proxy/LayoutProxy.cs
================================================
using System.Collections.Generic;
using QuestPDF.Companion;
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Elements;
using QuestPDF.Elements.Text;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using Image = QuestPDF.Elements.Image;
using SvgImage = QuestPDF.Elements.SvgImage;
namespace QuestPDF.Drawing.Proxy;
internal sealed class LayoutProxy : ElementProxy
{
public List<CompanionCommands.UpdateDocumentStructure.PageLocation> Snapshots { get; } = new();
public List<CompanionCommands.UpdateDocumentStructure.LayoutErrorMeasurement> LayoutErrorMeasurements { get; } = new();
public LayoutProxy(Element child)
{
Child = child;
}
internal override void Draw(Size availableSpace)
{
var size = ProvideIntrinsicSize() ? Child.Measure(availableSpace) : availableSpace;
base.Draw(availableSpace);
if (!Canvas.Is<SkiaDrawingCanvas>())
return;
var matrix = Canvas.GetCurrentMatrix();
Snapshots.Add(new CompanionCommands.UpdateDocumentStructure.PageLocation
{
PageNumber = PageContext.CurrentPage,
Left = matrix.TranslateX,
Top = matrix.TranslateY,
Right = matrix.TranslateX + size.Width,
Bottom = matrix.TranslateY + size.Height
});
bool ProvideIntrinsicSize()
{
// Image or DynamicImage or SvgImage or DynamicSvgImage should be excluded
// They rely on the AspectRation component to provide true intrinsic size
return Child is TextBlock or AspectRatio or Unconstrained or SemanticTag or ArtifactTag;
}
}
internal void CaptureLayoutErrorMeasurement()
{
var child = Child;
while (true)
{
if (child is OverflowDebuggingProxy overflowDebuggingProxy)
{
if (overflowDebuggingProxy.AvailableSpace == null || overflowDebuggingProxy.SpacePlan == null)
break;
LayoutErrorMeasurements.Add(new CompanionCommands.UpdateDocumentStructure.LayoutErrorMeasurement
{
PageNumber = PageContext.CurrentPage,
AvailableSpace = new CompanionCommands.ElementSize
{
Width = overflowDebuggingProxy.AvailableSpace.Value.Width,
Height = overflowDebuggingProxy.AvailableSpace.Value.Height
},
MeasurementSize = new CompanionCommands.ElementSize
{
Width = overflowDebuggingProxy.SpacePlan.Value.Width,
Height = overflowDebuggingProxy.SpacePlan.Value.Height
},
SpacePlanType = overflowDebuggingProxy.SpacePlan?.Type,
WrapReason = overflowDebuggingProxy.SpacePlan?.WrapReason,
IsLayoutErrorRootCause = overflowDebuggingProxy.Child.GetType() == typeof(LayoutOverflowVisualization)
});
}
if (child is not ElementProxy proxy)
break;
child = proxy.Child;
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/Proxy/OverflowDebuggingProxy.cs
================================================
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing.Proxy;
internal sealed class OverflowDebuggingProxy : ElementProxy
{
public bool IsMeasuring { get; private set; } = true;
public Size? AvailableSpace { get; private set; }
public SpacePlan? SpacePlan { get; private set; }
public OverflowDebuggingProxy(Element child)
{
Child = child;
}
internal override SpacePlan Measure(Size availableSpace)
{
var spacePlan = Child.Measure(availableSpace);
if (IsMeasuring && !Size.Equal(availableSpace, Size.Zero))
{
AvailableSpace = availableSpace;
SpacePlan = spacePlan;
}
return spacePlan;
}
public void StopMeasuring()
{
IsMeasuring = false;
}
}
================================================
FILE: Source/QuestPDF/Drawing/Proxy/SnapshotCacheRecorderProxy.cs
================================================
using System;
using System.Collections.Generic;
using QuestPDF.Drawing.DrawingCanvases;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Drawing.Proxy;
internal sealed class SnapshotCacheRecorderProxy : ElementProxy, IDisposable
{
private ProxyDrawingCanvas RecorderCanvas { get; } = new();
private Dictionary<(int pageNumber, float availableWidth, float availableHeight), SpacePlan> MeasureCache { get; } = new();
private Dictionary<int, DocumentPageSnapshot> DrawCache { get; } = new();
~SnapshotCacheRecorderProxy()
{
this.WarnThatFinalizerIsReached();
Dispose();
}
public void Dispose()
{
RecorderCanvas?.Dispose();
foreach (var cacheValue in DrawCache.Values)
cacheValue.Dispose();
GC.SuppressFinalize(this);
}
public SnapshotCacheRecorderProxy(Element child)
{
Child = child;
}
private void Initialize()
{
if (Child.Canvas == RecorderCanvas)
return;
Child.VisitChildren(x => x.Canvas = RecorderCanvas);
}
internal override SpacePlan Measure(Size availableSpace)
{
Initialize();
var cacheItem = (PageContext.CurrentPage, availableSpace.Width, availableSpace.Height);
if (MeasureCache.TryGetValue(cacheItem, out var measurement))
return measurement;
RecorderCanvas.Target = new DiscardDrawingCanvas();
var result = base.Measure(availableSpace);
RecorderCanvas.Target = null;
MeasureCache[cacheItem] = result;
return result;
}
internal override void Draw(Size availableSpace)
{
if (DrawCache.TryGetValue(PageContext.CurrentPage, out var snapshot))
{
Canvas.DrawSnapshot(snapshot);
snapshot.Dispose();
DrawCache.Remove(PageContext.CurrentPage);
return;
}
using var skiaCanvas = new SkiaDrawingCanvas(Size.Max.Width, Size.Max.Height);
RecorderCanvas.Target = skiaCanvas;
RecorderCanvas.SetZIndex(Canvas.GetZIndex());
RecorderCanvas.SetMatrix(Canvas.GetCurrentMatrix());
base.Draw(availableSpace);
DrawCache[PageContext.CurrentPage] = skiaCanvas.GetSnapshot();
RecorderCanvas.Target = null;
}
}
================================================
FILE: Source/QuestPDF/Drawing/Proxy/TreeTraversal.cs
================================================
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing.Proxy;
internal sealed class TreeNode<T>
{
public T Value { get; }
public TreeNode<T>? Parent { get; set; }
public ICollection<TreeNode<T>> Children { get; } = new List<TreeNode<T>>();
public TreeNode(T Value)
{
this.Value = Value;
}
}
internal static class TreeTraversal
{
public static IEnumerable<TreeNode<T>> ExtractElementsOfType<T>(this Element element) where T : Element
{
if (element is T proxy)
{
var result = new TreeNode<T>(proxy);
foreach (var treeNode in proxy.GetChildren().SelectMany(ExtractElementsOfType<T>))
{
result.Children.Add(treeNode);
treeNode.Parent = result;
}
yield return result;
}
else
{
foreach (var treeNode in element.GetChildren().SelectMany(ExtractElementsOfType<T>))
yield return treeNode;
}
}
public static IEnumerable<TreeNode<T>> Flatten<T>(this TreeNode<T> element) where T : Element
{
yield return element;
foreach (var child in element.Children)
foreach (var innerChild in Flatten(child))
yield return innerChild;
}
public static IEnumerable<TreeNode<T>> ExtractAncestors<T>(this TreeNode<T> node)
{
while (true)
{
node = node.Parent;
if (node is null)
yield break;
yield return node;
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/SemanticTreeManager.cs
================================================
using System;
using System.Collections.Generic;
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing;
internal class SemanticTreeNode
{
public int NodeId { get; set; }
public string Type { get; set; } = "";
public string? Alt { get; set; }
public string? Lang { get; set; }
public IList<SemanticTreeNode> Children { get; } = [];
public ICollection<Attribute> Attributes { get; } = [];
public class Attribute
{
public string Owner { get; set; }
public string Name { get; set; }
public object Value { get; set; }
}
}
class SemanticTreeManager
{
private int CurrentNodeId { get; set; }
private SemanticTreeNode? Root { get; set; }
private Stack<SemanticTreeNode> Stack { get; set; } = [];
public SemanticTreeManager()
{
PopulateWithTopLevelNode();
}
private void PopulateWithTopLevelNode()
{
AddNode(new SemanticTreeNode
{
NodeId = GetNextNodeId(),
Type = "Document"
});
}
public int GetNextNodeId()
{
CurrentNodeId++;
return CurrentNodeId;
}
public void AddNode(SemanticTreeNode node)
{
if (Root == null)
{
Root = node;
Stack.Push(node);
return;
}
Stack.Peek()?.Children.Add(node);
}
public void PushOnStack(SemanticTreeNode node)
{
Stack.Push(node);
}
public void PopStack()
{
Stack.Pop();
}
public SemanticTreeNode PeekStack()
{
return Stack.Peek();
}
public void Reset()
{
CurrentNodeId = 0;
Root = null;
Stack.Clear();
}
public SemanticTreeNode? GetSemanticTree()
{
return Root;
}
#region Artifacts
private int ArtifactNestingLevel { get; set; } = 0;
public void BeginArtifactContent()
{
ArtifactNestingLevel++;
}
public void EndArtifactContent()
{
ArtifactNestingLevel--;
}
public bool IsCurrentContentArtifact()
{
return ArtifactNestingLevel > 0;
}
#endregion
#region State
public class StateSnapshot
{
internal int CurrentNodeId { get; init; }
}
public StateSnapshot GetState()
{
return new StateSnapshot
{
CurrentNodeId = CurrentNodeId
};
}
public void SetState(StateSnapshot state)
{
CurrentNodeId = state.CurrentNodeId;
}
#endregion
}
class SemanticTreeSnapshots(SemanticTreeManager? semanticTreeManager, IPageContext pageContext)
{
private IList<SemanticTreeManager.StateSnapshot> Snapshots { get; } = [];
public SemanticTreeSnapshotScope? StartSemanticStateScope(int index)
{
if (semanticTreeManager == null)
return null;
var originalSemanticState = semanticTreeManager.GetState();
if (index >= Snapshots.Count)
{
Snapshots.Add(originalSemanticState);
}
else
{
var snapshot = Snapshots[index];
semanticTreeManager.SetState(snapshot);
}
return new SemanticTreeSnapshotScope(() =>
{
if (pageContext.IsInitialRenderingPhase)
return;
semanticTreeManager.SetState(originalSemanticState);
});
}
public class SemanticTreeSnapshotScope(Action resetState) : IDisposable
{
public void Dispose()
{
resetState();
GC.SuppressFinalize(this);
}
}
}
internal readonly ref struct SemanticScope : IDisposable
{
private IDrawingCanvas DrawingCanvas { get; }
private int OriginalSemanticNodeId { get; }
public SemanticScope(IDrawingCanvas drawingCanvas, int nodeId)
{
DrawingCanvas = drawingCanvas;
OriginalSemanticNodeId = drawingCanvas.GetSemanticNodeId();
DrawingCanvas.SetSemanticNodeId(nodeId);
}
public void Dispose()
{
DrawingCanvas.SetSemanticNodeId(OriginalSemanticNodeId);
}
}
internal static class SemanticCanvasExtensions
{
public static SemanticScope StartSemanticScopeWithNodeId(this IDrawingCanvas canvas, int nodeId)
{
return new SemanticScope(canvas, nodeId);
}
}
================================================
FILE: Source/QuestPDF/Drawing/SpacePlan.cs
================================================
using QuestPDF.Infrastructure;
namespace QuestPDF.Drawing
{
internal readonly struct SpacePlan
{
public readonly SpacePlanType Type;
public readonly float Width;
public readonly float Height;
public readonly string? WrapReason;
internal SpacePlan(SpacePlanType type, float width, float height, string? wrapReason = null)
{
Type = type;
Width = width;
Height = height;
WrapReason = wrapReason;
}
internal static SpacePlan Empty() => new(SpacePlanType.Empty, 0, 0);
internal static SpacePlan Wrap(string reason) => new(SpacePlanType.Wrap, 0, 0, reason);
internal static SpacePlan PartialRender(float width, float height) => new(SpacePlanType.PartialRender, width, height);
internal static SpacePlan PartialRender(Size size) => PartialRender(size.Width, size.Height);
internal static SpacePlan FullRender(float width, float height) => new(SpacePlanType.FullRender, width, height);
internal static SpacePlan FullRender(Size size) => FullRender(size.Width, size.Height);
public override string ToString()
{
if (Type == SpacePlanType.Wrap)
return Type.ToString();
return $"{Type} (Width: {Width:N3}, Height: {Height:N3})";
}
public static implicit operator Size(SpacePlan spacePlan)
{
return new Size(spacePlan.Width, spacePlan.Height);
}
}
}
================================================
FILE: Source/QuestPDF/Drawing/SpacePlanType.cs
================================================
namespace QuestPDF.Drawing
{
internal enum SpacePlanType
{
Empty,
Wrap,
PartialRender,
FullRender
}
}
================================================
FILE: Source/QuestPDF/Elements/Alignment.cs
================================================
using QuestPDF.Drawing;
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal sealed class Alignment : ContainerElement
{
public VerticalAlignment? Vertical { get; set; }
public HorizontalAlignment? Horizontal { get; set; }
internal override void Draw(Size availableSpace)
{
var childMeasurement = base.Measure(availableSpace);
if (childMeasurement.Type is SpacePlanType.Empty or SpacePlanType.Wrap)
return;
var childSize = new Size(
Horizontal.HasValue ? childMeasurement.Width : availableSpace.Width,
Vertical.HasValue ? childMeasurement.Height : availableSpace.Height);
var top = GetTopOffset(availableSpace, childSize);
var left = GetLeftOffset(availableSpace, childSize);
Canvas.Translate(new Position(left, top));
base.Draw(childSize);
Canvas.Translate(new Position(-left, -top));
}
private float GetTopOffset(Size availableSpace, Size childSize)
{
var difference = availableSpace.Height - childSize.Height;
return Vertical switch
{
VerticalAlignment.Top => 0,
VerticalAlignment.Middle => difference / 2,
VerticalAlignment.Bottom => difference,
_ => 0
};
}
private float GetLeftOffset(Size availableSpace, Size childSize)
{
var difference = availableSpace.Width - childSize.Width;
return Horizontal switch
{
HorizontalAlignment.Left => 0,
HorizontalAlignment.Center => difference / 2,
HorizontalAlignment.Right => difference,
_ => 0
};
}
internal override string? GetCompanionHint() => $"{Vertical} {Horizontal}";
}
}
================================================
FILE: Source/QuestPDF/Elements/ArtifactTag.cs
================================================
using QuestPDF.Drawing;
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements;
internal class ArtifactTag : ContainerElement, ISemanticAware
{
public SemanticTreeManager? SemanticTreeManager { get; set; }
public int Id { get; set; }
internal override void Draw(Size availableSpace)
{
if (SemanticTreeManager == null)
{
base.Draw(availableSpace);
return;
}
using var semanticScope = Canvas.StartSemanticScopeWithNodeId(Id);
SemanticTreeManager.BeginArtifactContent();
Child?.Draw(availableSpace);
SemanticTreeManager.EndArtifactContent();
}
}
================================================
FILE: Source/QuestPDF/Elements/AspectRatio.cs
================================================
using System;
using QuestPDF.Drawing;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal sealed class AspectRatio : ContainerElement, IContentDirectionAware
{
public ContentDirection ContentDirection { get; set; }
public float Ratio { get; set; }
public AspectRatioOption Option { get; set; } = AspectRatioOption.FitWidth;
internal override SpacePlan Measure(Size availableSpace)
{
if (Ratio == 0)
return SpacePlan.FullRender(0, 0);
if (Child.IsEmpty())
return SpacePlan.Empty();
if (availableSpace.IsCloseToZero())
return SpacePlan.Wrap("The available space is zero.");
var targetSize = GetTargetSize(availableSpace);
if (targetSize.Height > availableSpace.Height + Size.Epsilon)
return SpacePlan.Wrap("To preserve the target aspect ratio, the content requires more vertical space than available.");
if (targetSize.Width > availableSpace.Width + Size.Epsilon)
return SpacePlan.Wrap("To preserve the target aspect ratio, the content requires more horizontal space than available.");
var childSize = base.Measure(targetSize);
if (childSize.Type == SpacePlanType.Wrap)
return childSize;
if (childSize.Type == SpacePlanType.PartialRender)
return SpacePlan.PartialRender(targetSize);
if (childSize.Type == SpacePlanType.FullRender)
return SpacePlan.FullRender(targetSize);
throw new NotSupportedException();
}
internal override void Draw(Size availableSpace)
{
var size = GetTargetSize(availableSpace);
var offset = ContentDirection == ContentDirection.LeftToRight
? Position.Zero
: new Position(availableSpace.Width - size.Width, 0);
Canvas.Translate(offset);
base.Draw(size);
Canvas.Translate(offset.Reverse());
}
private Size GetTargetSize(Size availableSpace)
{
if (Ratio == 0)
return availableSpace;
var spaceRatio = availableSpace.Width / availableSpace.Height;
var fitHeight = new Size(availableSpace.Height * Ratio, availableSpace.Height) ;
var fitWidth = new Size(availableSpace.Width, availableSpace.Width / Ratio);
return Option switch
{
AspectRatioOption.FitWidth => fitWidth,
AspectRatioOption.FitHeight => fitHeight,
AspectRatioOption.FitArea => Ratio < spaceRatio ? fitHeight : fitWidth,
_ => throw new ArgumentOutOfRangeException()
};
}
internal override string? GetCompanionHint() => $"{Option.ToString()} with ratio {Ratio:F1}";
}
}
================================================
FILE: Source/QuestPDF/Elements/Column.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Drawing;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal sealed class ColumnItemRenderingCommand
{
public Element Element { get; set; }
public SpacePlan Measurement { get; set; }
public Position Offset { get; set; }
}
internal sealed class Column : Element, IStateful
{
internal List<Element> Items { get; } = new();
internal float Spacing { get; set; }
internal override IEnumerable<Element?> GetChildren()
{
return Items;
}
internal override void CreateProxy(Func<Element?, Element?> create)
{
for (var i = 0; i < Items.Count; i++)
Items[i] = create(Items[i]);
}
internal override SpacePlan Measure(Size availableSpace)
{
if (!Items.Any())
return SpacePlan.Empty();
if (CurrentRenderingIndex == Items.Count)
return SpacePlan.Empty();
if (availableSpace.IsNegative())
return SpacePlan.Wrap("The available space is negative.");
var renderingCommands = PlanLayout(availableSpace);
if (!renderingCommands.Any())
return SpacePlan.Wrap("The available space is not sufficient for even partially rendering a single item.");
var width = renderingCommands.Max(x => x.Measurement.Width);
var height = renderingCommands.Last().Offset.Y + renderingCommands.Last().Measurement.Height;
var size = new Size(width, height);
if (width > availableSpace.Width + Size.Epsilon)
return SpacePlan.Wrap("The content requires more horizontal space than available.");
if (height > availableSpace.Height + Size.Epsilon)
return SpacePlan.Wrap("The content requires more vertical space than available.");
var totalRenderedItems = CurrentRenderingIndex + renderingCommands.Count(x => x.Measurement.Type is SpacePlanType.Empty or SpacePlanType.FullRender);
var willBeFullyRendered = totalRenderedItems == Items.Count;
return willBeFullyRendered
? SpacePlan.FullRender(size)
: SpacePlan.PartialRender(size);
}
internal override void Draw(Size availableSpace)
{
var renderingCommands = PlanLayout(availableSpace);
foreach (var command in renderingCommands)
{
var targetSize = new Size(availableSpace.Width, command.Measurement.Height);
Canvas.Translate(command.Offset);
command.Element.Draw(targetSize);
Canvas.Translate(command.Offset.Reverse());
}
var fullyRenderedItems = renderingCommands.Count(x => x.Measurement.Type is SpacePlanType.Empty or SpacePlanType.FullRender);
CurrentRenderingIndex += fullyRenderedItems;
}
private List<ColumnItemRenderingCommand> PlanLayout(Size availableSpace)
{
var topOffset = 0f;
var commands = new List<ColumnItemRenderingCommand>();
foreach (var item in Items.Skip(CurrentRenderingIndex))
{
var isFirstItem = commands.Count == 0;
var availableHeight = availableSpace.Height - topOffset;
if (availableHeight < -Size.Epsilon)
break;
availableHeight = Math.Max(0, availableHeight);
if (!isFirstItem)
availableHeight -= Spacing;
var allowOnlyZeroSpaceItems = availableHeight < Size.Epsilon;
var itemSpace = allowOnlyZeroSpaceItems
? Size.Zero
: new Size(availableSpace.Width, availableHeight);
var measurement = item.Measure(itemSpace);
if (measurement.Type == SpacePlanType.Wrap)
break;
var currentItemTookSpace = !Size.Equal(measurement, Size.Zero);
if (allowOnlyZeroSpaceItems && currentItemTookSpace)
break;
if (!isFirstItem && currentItemTookSpace)
topOffset += Spacing;
commands.Add(new ColumnItemRenderingCommand
{
Element = item,
Measurement = measurement,
Offset = new Position(0, topOffset)
});
if (measurement.Type == SpacePlanType.PartialRender)
break;
topOffset += measurement.Height;
}
return commands;
}
#region IStateful
internal int CurrentRenderingIndex { get; set; }
public void ResetState(bool hardReset = false) => CurrentRenderingIndex = 0;
public object GetState() => CurrentRenderingIndex;
public void SetState(object state) => CurrentRenderingIndex = (int) state;
#endregion
}
}
================================================
FILE: Source/QuestPDF/Elements/Constrained.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Drawing;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal sealed class Constrained : ContainerElement, IContentDirectionAware
{
public ContentDirection ContentDirection { get; set; }
public float? MinWidth { get; set; }
public float? MaxWidth { get; set; }
public float? MinHeight { get; set; }
public float? MaxHeight { get; set; }
public bool EnforceSizeWhenEmpty { get; set; }
internal override SpacePlan Measure(Size availableSpace)
{
if (MinWidth > MaxWidth)
return SpacePlan.Wrap($"The minimum width {MinWidth} is greater than the maximum width {MaxWidth}.");
if (MinHeight > MaxHeight)
return SpacePlan.Wrap($"The minimum height {MinHeight} is greater than the maximum height {MaxHeight}.");
if (!EnforceSizeWhenEmpty && Child.IsEmpty())
return SpacePlan.Empty();
if (MinWidth > availableSpace.Width + Size.Epsilon)
return SpacePlan.Wrap("The available horizontal space is less than the minimum width.");
if (MinHeight > availableSpace.Height + Size.Epsilon)
return SpacePlan.Wrap("The available vertical space is less than the minimum height.");
var available = new Size(
Min(MaxWidth, availableSpace.Width),
Min(MaxHeight, availableSpace.Height));
var measurement = base.Measure(available);
if (measurement.Type == SpacePlanType.Wrap)
return measurement;
var actualSize = new Size(
Max(MinWidth, measurement.Width),
Max(MinHeight, measurement.Height));
if (measurement.Type == SpacePlanType.Empty)
return EnforceSizeWhenEmpty ? SpacePlan.FullRender(actualSize) : SpacePlan.Empty();
if (measurement.Type == SpacePlanType.FullRender)
return SpacePlan.FullRender(actualSize);
if (measurement.Type == SpacePlanType.PartialRender)
return SpacePlan.PartialRender(actualSize);
throw new NotSupportedException();
}
internal override void Draw(Size availableSpace)
{
var size = new Size(
Min(MaxWidth, availableSpace.Width),
Min(MaxHeight, availableSpace.Height));
var offset = ContentDirection == ContentDirection.LeftToRight
? Position.Zero
: new Position(availableSpace.Width - size.Width, 0);
Canvas.Translate(offset);
base.Draw(size);
Canvas.Translate(offset.Reverse());
}
private static float Min(float? x, float y)
{
return x.HasValue ? Math.Min(x.Value, y) : y;
}
private static float Max(float? x, float y)
{
return x.HasValue ? Math.Max(x.Value, y) : y;
}
internal override string? GetCompanionHint()
{
var width = FormatRange("W", MinWidth, MaxWidth);
var height = FormatRange("H", MinHeight, MaxHeight);
return string.Join(" ", width.Concat(height));
static IEnumerable<string> FormatRange(string prefix, float? min, float? max)
{
if (!min.HasValue && !max.HasValue)
yield break;
if (min == max)
{
yield return $"{prefix}={min:F1}";
yield break;
}
if (min.HasValue)
yield return $"{prefix}≥{min:F1}";
if (max.HasValue)
yield return $"{prefix}≤{max:F1}";
}
}
}
}
================================================
FILE: Source/QuestPDF/Elements/Container.cs
================================================
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal class Container : ContainerElement
{
internal Container()
{
}
}
}
================================================
FILE: Source/QuestPDF/Elements/ContentDirectionSetter.cs
================================================
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal sealed class ContentDirectionSetter : ContainerElement
{
public ContentDirection ContentDirection { get; set; }
}
}
================================================
FILE: Source/QuestPDF/Elements/DebugArea.cs
================================================
using QuestPDF.Fluent;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using QuestPDF.Skia;
namespace QuestPDF.Elements
{
internal sealed class DebugArea : IComponent
{
public IElement? Child { get; set; }
public string Text { get; set; }
public Color Color { get; set; } = Colors.Red.Medium;
public void Compose(IContainer container)
{
var backgroundColor = Color.WithAlpha(64);
container
.Border(1)
.BorderColor(Color)
.Layers(layers =>
{
layers.PrimaryLayer().Element(Child);
layers.Layer().Background(backgroundColor);
layers
.Layer()
.ShowIf(!string.IsNullOrWhiteSpace(Text))
.AlignCenter()
.Shrink()
.Background(Colors.White)
.Padding(2)
.Text(Text)
.FontColor(Color)
.FontFamily(Fonts.Consolas)
.FontSize(8);
});
}
}
}
================================================
FILE: Source/QuestPDF/Elements/DebugPointer.cs
================================================
using System.Collections.Generic;
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal enum DocumentStructureTypes
{
Document,
Page,
Background,
Foreground,
Header,
Content,
Footer
}
internal enum DebugPointerType
{
DocumentStructure,
ElementStructure,
Component,
Section,
Dynamic,
UserDefined
}
internal sealed class DebugPointer : ContainerElement
{
public DebugPointerType Type { get; set; }
public string Label { get; set; }
internal override string? GetCompanionSearchableContent() => Label;
public DebugPointer()
{
}
public DebugPointer(DebugPointerType type, string label)
{
Type = type;
Label = label;
}
internal override IEnumerable<KeyValuePair<string, string>>? GetCompanionProperties()
{
yield return new("Type", Type.ToString());
yield return new("Label", Label);
}
}
}
================================================
FILE: Source/QuestPDF/Elements/Decoration.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using QuestPDF.Drawing;
using QuestPDF.Infrastructure;
namespace QuestPDF.Elements
{
internal sealed class DecorationElementLayout
{
public ItemCommand Before { get; set; }
public ItemCommand Content { get; set; }
public ItemCommand After { get; set; }
public struct ItemCommand
{
public Element Element;
public SpacePlan Measurement;
public Position Offset;
}
}
internal sealed class Decoration : Element, IContentDirectionAware
{
public ContentDirection ContentDirection { get; set; }
internal Element Before { get; set; } = new DebugPointer(DebugPointerType.ElementStructure, "Before");
internal Element Conte
gitextract_ymraibqd/
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── companion_app_feedback.md
│ │ └── feature_request.md
│ ├── SECURITY.md
│ └── workflows/
│ └── main.yml
├── .gitignore
├── LICENSE.md
├── README.md
└── Source/
├── .config/
│ ├── dotnet-tools.json
│ └── stryker-config.json
├── .editorconfig
├── QuestPDF/
│ ├── Build/
│ │ ├── QuestPDF.targets
│ │ └── net4/
│ │ └── QuestPDF.targets
│ ├── Companion/
│ │ ├── CompanionExtensions.cs
│ │ ├── CompanionModels.cs
│ │ ├── CompanionService.cs
│ │ ├── Helpers.cs
│ │ ├── HotReloadManager.cs
│ │ └── Previewer.cs
│ ├── Drawing/
│ │ ├── DocumentCanvases/
│ │ │ ├── CompanionDocumentCanvas.cs
│ │ │ ├── DiscardDocumentCanvas.cs
│ │ │ ├── ImageDocumentCanvas.cs
│ │ │ ├── PdfDocumentCanvas.cs
│ │ │ ├── SemanticDocumentCanvas.cs
│ │ │ ├── SvgDocumentCanvas.cs
│ │ │ └── XpsDocumentCanvas.cs
│ │ ├── DocumentContainer.cs
│ │ ├── DocumentGenerator.cs
│ │ ├── DocumentPageSnapshot.cs
│ │ ├── DrawingCanvases/
│ │ │ ├── DiscardDrawingCanvas.cs
│ │ │ ├── ProxyDrawingCanvas.cs
│ │ │ ├── SemanticDrawingCanvas.cs
│ │ │ └── SkiaDrawingCanvas.cs
│ │ ├── Exceptions/
│ │ │ ├── DocumentComposeException.cs
│ │ │ ├── DocumentDrawingException.cs
│ │ │ ├── DocumentLayoutException.cs
│ │ │ └── InitializationException.cs
│ │ ├── FontManager.cs
│ │ ├── Proxy/
│ │ │ ├── ElementProxy.cs
│ │ │ ├── LayoutDebugging.cs
│ │ │ ├── LayoutOverflowVisualization.cs
│ │ │ ├── LayoutProxy.cs
│ │ │ ├── OverflowDebuggingProxy.cs
│ │ │ ├── SnapshotCacheRecorderProxy.cs
│ │ │ └── TreeTraversal.cs
│ │ ├── SemanticTreeManager.cs
│ │ ├── SpacePlan.cs
│ │ └── SpacePlanType.cs
│ ├── Elements/
│ │ ├── Alignment.cs
│ │ ├── ArtifactTag.cs
│ │ ├── AspectRatio.cs
│ │ ├── Column.cs
│ │ ├── Constrained.cs
│ │ ├── Container.cs
│ │ ├── ContentDirectionSetter.cs
│ │ ├── DebugArea.cs
│ │ ├── DebugPointer.cs
│ │ ├── Decoration.cs
│ │ ├── DefaultTextStyle.cs
│ │ ├── Dynamic.cs
│ │ ├── DynamicImage.cs
│ │ ├── DynamicSvgImage.cs
│ │ ├── ElementPositionLocator.cs
│ │ ├── Empty.cs
│ │ ├── EnsureSpace.cs
│ │ ├── Extend.cs
│ │ ├── Grid.cs
│ │ ├── Hyperlink.cs
│ │ ├── Image.cs
│ │ ├── Inlined.cs
│ │ ├── Layers.cs
│ │ ├── Lazy.cs
│ │ ├── Line.cs
│ │ ├── MultiColumn.cs
│ │ ├── Padding.cs
│ │ ├── Page.cs
│ │ ├── PageBreak.cs
│ │ ├── Placeholder.cs
│ │ ├── PreventPageBreak.cs
│ │ ├── RepeatContent.cs
│ │ ├── Rotate.cs
│ │ ├── Row.cs
│ │ ├── Scale.cs
│ │ ├── ScaleToFit.cs
│ │ ├── Section.cs
│ │ ├── SectionLink.cs
│ │ ├── SemanticTag.cs
│ │ ├── ShowEntire.cs
│ │ ├── ShowIf.cs
│ │ ├── ShowOnce.cs
│ │ ├── Shrink.cs
│ │ ├── SimpleRotate.cs
│ │ ├── SkipOnce.cs
│ │ ├── SourceCodePointer.cs
│ │ ├── StopPaging.cs
│ │ ├── StyledBox.cs
│ │ ├── SvgImage.cs
│ │ ├── SvgPath.cs
│ │ ├── Table/
│ │ │ ├── DynamicDictionary.cs
│ │ │ ├── ITableCellContainer.cs
│ │ │ ├── Table.cs
│ │ │ ├── TableCell.cs
│ │ │ ├── TableCellRenderingCommand.cs
│ │ │ ├── TableColumnDefinition.cs
│ │ │ ├── TableLayoutPlanner.cs
│ │ │ └── TableLayoutValidator.cs
│ │ ├── Text/
│ │ │ ├── Items/
│ │ │ │ ├── ITextBlockItem.cs
│ │ │ │ ├── TextBlockElement.cs
│ │ │ │ ├── TextBlockHyperlink.cs
│ │ │ │ ├── TextBlockPageNumber.cs
│ │ │ │ ├── TextBlockParagraphSpacing.cs
│ │ │ │ ├── TextBlockSectionLink.cs
│ │ │ │ └── TextBlockSpan.cs
│ │ │ ├── SkParagraphBuilderPoolManager.cs
│ │ │ └── TextBlock.cs
│ │ ├── Translate.cs
│ │ ├── Unconstrained.cs
│ │ └── ZIndex.cs
│ ├── Fluent/
│ │ ├── AlignmentExtensions.cs
│ │ ├── ColumnExtensions.cs
│ │ ├── ComponentExtentions.cs
│ │ ├── ConstrainedExtensions.cs
│ │ ├── ContentDirectionExtensions.cs
│ │ ├── DebugExtensions.cs
│ │ ├── DecorationExtensions.cs
│ │ ├── DocumentOperation.cs
│ │ ├── DynamicComponentExtensions.cs
│ │ ├── ElementExtensions.cs
│ │ ├── ExtendExtensions.cs
│ │ ├── GenerateExtensions.cs
│ │ ├── GridExtensions.cs
│ │ ├── ImageExtensions.cs
│ │ ├── InlinedExtensions.cs
│ │ ├── LayerExtensions.cs
│ │ ├── LineExtensions.cs
│ │ ├── MinimalApi.cs
│ │ ├── MultiColumnExtensions.cs
│ │ ├── PaddingExtensions.cs
│ │ ├── PageExtensions.cs
│ │ ├── RotateExtensions.cs
│ │ ├── RowExtensions.cs
│ │ ├── ScaleExtensions.cs
│ │ ├── SemanticExtensions.cs
│ │ ├── ShrinkExtensions.cs
│ │ ├── StyledBoxExtensions.cs
│ │ ├── SvgExtensions.cs
│ │ ├── TableExtensions.cs
│ │ ├── TextExtensions.cs
│ │ ├── TextSpanDescriptorExtensions.cs
│ │ ├── TextStyleExtensions.cs
│ │ └── TranslateExtensions.cs
│ ├── Helpers/
│ │ ├── CallerArgumentExpression.cs
│ │ ├── ColorParser.cs
│ │ ├── Colors.cs
│ │ ├── FontFeatures.cs
│ │ ├── Fonts.cs
│ │ ├── Helpers.cs
│ │ ├── IsExternalInit.cs
│ │ ├── LicenseChecker.cs
│ │ ├── NativeDependencyCompatibilityChecker.cs
│ │ ├── NativeDependencyProvider.cs
│ │ ├── PageSizes.cs
│ │ ├── Placeholders.cs
│ │ └── TemporaryStorage.cs
│ ├── Infrastructure/
│ │ ├── AspectRatioOption.cs
│ │ ├── BoxShadowStyle.cs
│ │ ├── Color.cs
│ │ ├── ContainerElement.cs
│ │ ├── ContentDirection.cs
│ │ ├── DocumentMetadata.cs
│ │ ├── DocumentSettings.cs
│ │ ├── Element.cs
│ │ ├── EmptyContainer.cs
│ │ ├── FontPosition.cs
│ │ ├── FontWeight.cs
│ │ ├── HorizontalAlignment.cs
│ │ ├── IComponent.cs
│ │ ├── IContainer.cs
│ │ ├── IContentDirectionAware.cs
│ │ ├── IDocument.cs
│ │ ├── IDocumentCanvas.cs
│ │ ├── IDocumentContainer.cs
│ │ ├── IDrawingCanvas.cs
│ │ ├── IDynamicComponent.cs
│ │ ├── IElement.cs
│ │ ├── IMergedDocument.cs
│ │ ├── IPageContext.cs
│ │ ├── ISemanticAware.cs
│ │ ├── IStateful.cs
│ │ ├── Image.cs
│ │ ├── ImageCompressionQuality.cs
│ │ ├── ImageFormat.cs
│ │ ├── ImageGenerationSettings.cs
│ │ ├── ImageScaling.cs
│ │ ├── ImageSize.cs
│ │ ├── LicenseType.cs
│ │ ├── PageContext.cs
│ │ ├── Position.cs
│ │ ├── Size.cs
│ │ ├── SourceCodePath.cs
│ │ ├── StaticImageCache.cs
│ │ ├── SvgImage.cs
│ │ ├── TextDirection.cs
│ │ ├── TextHorizontalAlignment.cs
│ │ ├── TextInjectedElementAlignment.cs
│ │ ├── TextStyle.cs
│ │ ├── TextStyleManager.cs
│ │ ├── Unit.cs
│ │ └── VerticalAlignment.cs
│ ├── LatoFont/
│ │ └── OFL.txt
│ ├── NugetStrongNameSigningKeyForQuestPDF.snk
│ ├── Qpdf/
│ │ ├── JobConfiguration.cs
│ │ ├── MimeHelper.cs
│ │ ├── QpdfAPI.cs
│ │ ├── QpdfNativeDependencyCompatibilityChecker.cs
│ │ └── SimpleJsonSerializer.cs
│ ├── QuestPDF.csproj
│ ├── Resources/
│ │ ├── Contributors.md
│ │ ├── Description.md
│ │ ├── Documentation.xml
│ │ ├── ExternalDependencyLicenses/
│ │ │ ├── emsdk.txt
│ │ │ ├── expat.txt
│ │ │ ├── harfbuzz.txt
│ │ │ ├── libgrapheme.txt
│ │ │ ├── libjpeg-turbo.txt
│ │ │ ├── libpng.txt
│ │ │ ├── libwebp.txt
│ │ │ ├── ninja-build.txt
│ │ │ ├── qpdf.txt
│ │ │ ├── readme.txt
│ │ │ ├── skia.txt
│ │ │ ├── wuffs.txt
│ │ │ └── zlib.txt
│ │ ├── LatinWords.txt
│ │ ├── MimeTypes.csv
│ │ ├── PackageLicense.md
│ │ └── ReleaseNotes.txt
│ ├── Settings.cs
│ └── Skia/
│ ├── SkBitmap.cs
│ ├── SkBoxShadow.cs
│ ├── SkCanvas.cs
│ ├── SkCanvasMatrix.cs
│ ├── SkData.cs
│ ├── SkDateTime.cs
│ ├── SkDocument.cs
│ ├── SkImage.cs
│ ├── SkNativeDependencyCompatibilityChecker.cs
│ ├── SkPaint.cs
│ ├── SkPdfDocument.cs
│ ├── SkPdfTag.cs
│ ├── SkPicture.cs
│ ├── SkPictureRecorder.cs
│ ├── SkPoint.cs
│ ├── SkRect.cs
│ ├── SkResourceProvider.cs
│ ├── SkRoundedRect.cs
│ ├── SkSemanticNodeSpecialId.cs
│ ├── SkSize.cs
│ ├── SkSvgCanvas.cs
│ ├── SkSvgImage.cs
│ ├── SkText.cs
│ ├── SkWriteStream.cs
│ ├── SkXpsDocument.cs
│ ├── SkiaAPI.cs
│ ├── Text/
│ │ ├── SkFontCollection.cs
│ │ ├── SkFontManager.cs
│ │ ├── SkParagraph.cs
│ │ ├── SkParagraphBuilder.cs
│ │ ├── SkTextStyle.cs
│ │ ├── SkTypeface.cs
│ │ ├── SkTypefaceProvider.cs
│ │ └── SkUnicode.cs
│ └── Utf8StringMarshaller.cs
├── QuestPDF.Companion.TestRunner/
│ ├── Program.cs
│ └── QuestPDF.Companion.TestRunner.csproj
├── QuestPDF.ConformanceTests/
│ ├── DecorationTests.cs
│ ├── DynamicTests.cs
│ ├── FooterTests.cs
│ ├── HeaderTests.cs
│ ├── HyperlinkInFooterTests.cs
│ ├── HyperlinkTests.cs
│ ├── IgnoreTests.cs
│ ├── ImageTests.cs
│ ├── LazyTests.cs
│ ├── LineTests.cs
│ ├── ListTests.cs
│ ├── MultiColumnTests.cs
│ ├── OrderOfSemanticItemsTests.cs
│ ├── QuestPDF.ConformanceTests.csproj
│ ├── Resources/
│ │ ├── zugferd-factur-x.xml
│ │ └── zugferd-xmp-metadata.xml
│ ├── StyledBoxTests.cs
│ ├── SvgTests.cs
│ ├── Table/
│ │ ├── TableWithFooterTests.cs
│ │ ├── TableWithHeaderCellsSpanningMultipleColumnsTests.cs
│ │ ├── TableWithHeaderCellsSpanningMultipleRowsTests.cs
│ │ ├── TableWithHorizontalHeadersTests.cs
│ │ ├── TableWithVerticalHeadersTests.cs
│ │ └── TableWithoutHeadersTests.cs
│ ├── TableOfContentsTests.cs
│ ├── TestEngine/
│ │ ├── ConformanceTestBase.cs
│ │ ├── MustangConformanceTestRunner.cs
│ │ ├── SemanticAwareDrawingCanvas.cs
│ │ ├── SemanticTreeTestRunner.cs
│ │ └── VeraPdfConformanceTestRunner.cs
│ ├── TestsSetup.cs
│ └── ZugferdTests.cs
├── QuestPDF.DocumentationExamples/
│ ├── AccessibilityExamples.cs
│ ├── AlignmentExamples.cs
│ ├── AspectRatioExamples.cs
│ ├── BackgroundExamples.cs
│ ├── BarcodeExamples.cs
│ ├── BorderExamples.cs
│ ├── ChartExamples.cs
│ ├── CodePatterns/
│ │ ├── CodePatternAddressComponentExample.cs
│ │ ├── CodePatternCapturePositionExample.cs
│ │ ├── CodePatternComponentProgressbarComponentExample.cs
│ │ ├── CodePatternConfigurableComponentExample.cs
│ │ ├── CodePatternContentStylingExample.cs
│ │ ├── CodePatternDocumentStructureExample.cs
│ │ ├── CodePatternDynamicComponentExample.cs
│ │ ├── CodePatternExecutionOrderExample.cs
│ │ ├── CodePatternExtesionMethodExample.cs
│ │ └── CodePatternLocalHelpersExample.cs
│ ├── ColorsExamples.cs
│ ├── ColumnExamples.cs
│ ├── ComplexGraphicsExamples.cs
│ ├── ConstrainedExamples.cs
│ ├── ContentDirectionExamples.cs
│ ├── CustomFirstPageExample.cs
│ ├── DebugAreaExamples.cs
│ ├── DecorationExamples.cs
│ ├── DefaultTextStyleExamples.cs
│ ├── DocumentOperationExamples.cs
│ ├── EnsureSpaceExamples.cs
│ ├── FlipExamples.cs
│ ├── HyperlinkExamples.cs
│ ├── ImageExamples.cs
│ ├── InlinedExamples.cs
│ ├── LayersExamples.cs
│ ├── LazyExamples.cs
│ ├── LicenseSetup.cs
│ ├── LineExamples.cs
│ ├── ListExamples.cs
│ ├── MapExample.cs
│ ├── MergingDocumentsExamples.cs
│ ├── MultiColumnExamples.cs
│ ├── PaddingExamples.cs
│ ├── PageBreakExamples.cs
│ ├── PageExamples.cs
│ ├── PlaceholderExamples.cs
│ ├── PreventPageBreakExamples.cs
│ ├── QuestPDF.DocumentationExamples.csproj
│ ├── RepeatExamples.cs
│ ├── Resources/
│ │ └── semantic-book-content.json
│ ├── RotateExamples.cs
│ ├── RoundedCornersExamples.cs
│ ├── RowExamples.cs
│ ├── ScaleExamples.cs
│ ├── ScaleToFitExamples.cs
│ ├── SectionExamples.cs
│ ├── SemanticExamples.cs
│ ├── ShadowExamples.cs
│ ├── ShowEntireExamples.cs
│ ├── ShowOnceExamples.cs
│ ├── SkiaSharpHelpers.cs
│ ├── SkiaSharpIntegrationExamples.cs
│ ├── SkipOnceExamples.cs
│ ├── StopPagingExamples.cs
│ ├── TableExamples.cs
│ ├── Text/
│ │ ├── ParagraphStyleExamples.cs
│ │ ├── TextBasicExamples.cs
│ │ ├── TextInjectContent.cs
│ │ └── TextStyleExamples.cs
│ ├── TranslateExamples.cs
│ ├── UnconstrainedExamples.cs
│ └── ZIndexExamples.cs
├── QuestPDF.LayoutTests/
│ ├── ColumnTests.cs
│ ├── LineTests.cs
│ ├── MultiColumnTests.cs
│ ├── PaddingTests.cs
│ ├── QuestPDF.LayoutTests.csproj
│ ├── RotateTests.cs
│ ├── RowTests.cs
│ ├── ScaleTests.cs
│ ├── Setup.cs
│ ├── ShowIfTests.cs
│ ├── ShrinkTests.cs
│ ├── SimpleRotateTests.cs
│ ├── StopPagingTests.cs
│ ├── TableTests.cs
│ ├── TestEngine/
│ │ ├── ContinuousBlock.cs
│ │ ├── DrawingRecorder.cs
│ │ ├── ElementObserver.cs
│ │ ├── ElementObserverSetter.cs
│ │ ├── FluentExtensions.cs
│ │ ├── LayoutTest.cs
│ │ └── SolidBlock.cs
│ ├── TranslateTests.cs
│ └── Usings.cs
├── QuestPDF.ReportSample/
│ ├── DataSource.cs
│ ├── Helpers.cs
│ ├── Layouts/
│ │ ├── DifferentHeadersTemplate.cs
│ │ ├── Helpers.cs
│ │ ├── ImagePlaceholder.cs
│ │ ├── PhotoTemplate.cs
│ │ ├── SectionTemplate.cs
│ │ ├── StandardReport.cs
│ │ └── TableOfContentsTemplate.cs
│ ├── Models.cs
│ ├── QuestPDF.ReportSample.csproj
│ ├── Tests.cs
│ └── Typography.cs
├── QuestPDF.UnitTests/
│ ├── AlignmentTests.cs
│ ├── AspectRatioTests.cs
│ ├── ColumnTests.cs
│ ├── ConstrainedTests.cs
│ ├── DecorationTests.cs
│ ├── DocumentCompressionTests.cs
│ ├── DocumentOperationTests.cs
│ ├── DynamicImageTests.cs
│ ├── EnsureSpaceTests.cs
│ ├── ExtendTests.cs
│ ├── ExternalLinkTests.cs
│ ├── FontManagerTests.cs
│ ├── ImageGenerationTests.cs
│ ├── ImageTests.cs
│ ├── InternalLinkTests.cs
│ ├── InternalLocationTests.cs
│ ├── LayersTests.cs
│ ├── LicenseSetup.cs
│ ├── LineTests.cs
│ ├── PaddingTests.cs
│ ├── PageBreakTests.cs
│ ├── QuestPDF.UnitTests.csproj
│ ├── RotateTests.cs
│ ├── RowTests.cs
│ ├── ScaleTests.cs
│ ├── ShowEntireTests.cs
│ ├── ShowOnceTest.cs
│ ├── SimpleRotateTests.cs
│ ├── StyledBoxTests.cs
│ ├── TestEngine/
│ │ ├── ElementMock.cs
│ │ ├── MockCanvas.cs
│ │ ├── OperationBase.cs
│ │ ├── OperationRecordingCanvas.cs
│ │ ├── Operations/
│ │ │ ├── CanvasDrawImageOperation.cs
│ │ │ ├── CanvasDrawRectangleOperation.cs
│ │ │ ├── CanvasDrawTextOperation.cs
│ │ │ ├── CanvasRotateOperation.cs
│ │ │ ├── CanvasScaleOperation.cs
│ │ │ ├── CanvasTranslateOperation.cs
│ │ │ ├── ChildDrawOperation.cs
│ │ │ ├── ChildMeasureOperation.cs
│ │ │ └── ElementMeasureOperation.cs
│ │ ├── SimpleContainerTests.cs
│ │ └── TestPlan.cs
│ ├── TextSpanTests.cs
│ ├── TextStyleTests.cs
│ ├── TranslateTests.cs
│ ├── UnconstrainedTests.cs
│ └── UnitConversionTests.cs
├── QuestPDF.VisualTests/
│ ├── LineTests.cs
│ ├── QuestPDF.VisualTests.csproj
│ ├── RotateTests.cs
│ ├── SimpleRotateTests.cs
│ ├── StyledBoxTests.cs
│ ├── TestsSetup.cs
│ ├── TextStyleTests.cs
│ └── VisualTestEngine.cs
├── QuestPDF.ZUGFeRD/
│ ├── GenerationTest.cs
│ ├── QuestPDF.ZUGFeRD.csproj
│ ├── resource-factur-x.xml
│ └── resource-zugferd-metadata.xml
├── QuestPDF.slnx
├── global.json
└── nuget.config
Showing preview only (281K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3132 symbols across 423 files)
FILE: Source/QuestPDF.ConformanceTests/DecorationTests.cs
class DecorationTests (line 8) | internal class DecorationTests : ConformanceTestBase
method GetDocumentUnderTest (line 10) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 78) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/DynamicTests.cs
class DynamicTests (line 9) | internal class DynamicTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 41) | protected override SemanticTreeNode? GetExpectedSemanticTree()
class DynamicComponent (line 65) | internal class DynamicComponent(int index) : IDynamicComponent
method Compose (line 67) | public DynamicComponentComposeResult Compose(DynamicContext context)
FILE: Source/QuestPDF.ConformanceTests/FooterTests.cs
class FooterTests (line 8) | internal class FooterTests : ConformanceTestBase
method GetDocumentUnderTest (line 10) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 64) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/HeaderTests.cs
class HeaderTests (line 8) | internal class HeaderTests : ConformanceTestBase
method GetDocumentUnderTest (line 10) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 62) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/HyperlinkInFooterTests.cs
class HyperlinkInFooterTests (line 8) | internal class HyperlinkInFooterTests : ConformanceTestBase
method GetDocumentUnderTest (line 10) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 48) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/HyperlinkTests.cs
class HyperlinkTests (line 9) | internal class HyperlinkTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 45) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/IgnoreTests.cs
class IgnoreTests (line 9) | internal class IgnoreTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 44) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/ImageTests.cs
class ImageTests (line 9) | internal class ImageTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 48) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/LazyTests.cs
class LazyTests (line 7) | internal class LazyTests : ConformanceTestBase
method GetDocumentUnderTest (line 9) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 53) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/LineTests.cs
class LineTests (line 9) | internal class LineTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 70) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/ListTests.cs
class ListTests (line 9) | internal class ListTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 100) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/MultiColumnTests.cs
class MultiColumnTests (line 8) | internal class MultiColumnTests : ConformanceTestBase
method GetDocumentUnderTest (line 10) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 59) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/OrderOfSemanticItemsTests.cs
class OrderOfSemanticItemsTests (line 7) | internal class OrderOfSemanticItemsTests : ConformanceTestBase
method GetDocumentUnderTest (line 9) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 59) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/StyledBoxTests.cs
class StyledBoxTests (line 9) | internal class StyledBoxTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 72) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/SvgTests.cs
class SvgTests (line 8) | internal class SvgTests : ConformanceTestBase
method GetDocumentUnderTest (line 10) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 42) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/Table/TableWithFooterTests.cs
class TableWithFooterTests (line 9) | internal class TableWithFooterTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 69) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/Table/TableWithHeaderCellsSpanningMultipleColumnsTests.cs
class TableWithHeaderCellsSpanningMultipleColumnsTests (line 9) | internal class TableWithHeaderCellsSpanningMultipleColumnsTests : Confor...
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 84) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/Table/TableWithHeaderCellsSpanningMultipleRowsTests.cs
class TableWithHeaderCellsSpanningMultipleRowsTests (line 9) | internal class TableWithHeaderCellsSpanningMultipleRowsTests : Conforman...
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 90) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/Table/TableWithHorizontalHeadersTests.cs
class TableWithHorizontalHeadersTests (line 9) | internal class TableWithHorizontalHeadersTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 73) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/Table/TableWithVerticalHeadersTests.cs
class TableWithVerticalHeadersTests (line 9) | internal class TableWithVerticalHeadersTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 73) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/Table/TableWithoutHeadersTests.cs
class TableWithoutHeadersTests (line 9) | internal class TableWithoutHeadersTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 63) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/TableOfContentsTests.cs
class TableOfContentsTests (line 9) | internal class TableOfContentsTests : ConformanceTestBase
method GetDocumentUnderTest (line 11) | protected override Document GetDocumentUnderTest()
method GetExpectedSemanticTree (line 124) | protected override SemanticTreeNode? GetExpectedSemanticTree()
FILE: Source/QuestPDF.ConformanceTests/TestEngine/ConformanceTestBase.cs
class ConformanceTestBase (line 8) | [TestFixture]
method GenerateAndShow (line 15) | [Test]
method Test_PDFA (line 29) | [Test, TestCaseSource(nameof(PDFA_ConformanceLevels))]
method Test_PDFUA (line 41) | [Test, TestCaseSource(nameof(PDFUA_ConformanceLevels))]
method TestSemanticMeaning (line 53) | [Test]
method GetMetadata (line 66) | private DocumentMetadata GetMetadata()
method GetDocumentUnderTest (line 76) | protected abstract Document GetDocumentUnderTest();
method GetExpectedSemanticTree (line 78) | protected abstract SemanticTreeNode? GetExpectedSemanticTree();
FILE: Source/QuestPDF.ConformanceTests/TestEngine/MustangConformanceTestRunner.cs
class MustangConformanceTestRunner (line 9) | public static class MustangConformanceTestRunner
class ValidationResult (line 11) | public class ValidationResult
method GetErrorMessage (line 16) | public string GetErrorMessage()
method TestConformance (line 31) | public static void TestConformance(string filePath)
method RunMustang (line 42) | private static ValidationResult RunMustang(string pdfFilePath)
FILE: Source/QuestPDF.ConformanceTests/TestEngine/SemanticAwareDrawingCanvas.cs
class SemanticAwareDocumentCanvas (line 8) | internal class SemanticAwareDocumentCanvas : IDocumentCanvas
method SetSemanticTree (line 13) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 18) | public void BeginDocument()
method EndDocument (line 23) | public void EndDocument()
method BeginPage (line 28) | public void BeginPage(Size size)
method EndPage (line 33) | public void EndPage()
method GetDrawingCanvas (line 38) | public IDrawingCanvas GetDrawingCanvas()
class SemanticAwareDrawingCanvas (line 44) | internal class SemanticAwareDrawingCanvas : IDrawingCanvas
method GetSnapshot (line 48) | public DocumentPageSnapshot GetSnapshot()
method DrawSnapshot (line 53) | public void DrawSnapshot(DocumentPageSnapshot snapshot)
method Save (line 58) | public void Save()
method Restore (line 63) | public void Restore()
method SetZIndex (line 68) | public void SetZIndex(int index)
method GetZIndex (line 73) | public int GetZIndex()
method GetCurrentMatrix (line 78) | public SkCanvasMatrix GetCurrentMatrix()
method SetMatrix (line 83) | public void SetMatrix(SkCanvasMatrix matrix)
method Translate (line 88) | public void Translate(Position vector)
method Scale (line 93) | public void Scale(float scaleX, float scaleY)
method Rotate (line 98) | public void Rotate(float angle)
method DrawLine (line 103) | public void DrawLine(Position start, Position end, SkPaint paint)
method DrawRectangle (line 109) | public void DrawRectangle(Position vector, Size size, SkPaint paint)
method DrawComplexBorder (line 115) | public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect o...
method DrawShadow (line 121) | public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
method DrawParagraph (line 127) | public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lin...
method DrawImage (line 132) | public void DrawImage(SkImage image, Size size)
method DrawPicture (line 137) | public void DrawPicture(SkPicture picture)
method DrawSvgPath (line 142) | public void DrawSvgPath(string path, Color color)
method DrawSvg (line 147) | public void DrawSvg(SkSvgImage svgImage, Size size)
method DrawOverflowArea (line 152) | public void DrawOverflowArea(SkRect area)
method ClipOverflowArea (line 157) | public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
method ClipRectangle (line 162) | public void ClipRectangle(SkRect clipArea)
method ClipRoundedRectangle (line 167) | public void ClipRoundedRectangle(SkRoundedRect clipArea)
method DrawHyperlink (line 172) | public void DrawHyperlink(Size size, string url, string? description)
method DrawSectionLink (line 177) | public void DrawSectionLink(Size size, string sectionName, string? des...
method DrawSection (line 182) | public void DrawSection(string sectionName)
method GetSemanticNodeId (line 187) | public int GetSemanticNodeId()
method SetSemanticNodeId (line 192) | public void SetSemanticNodeId(int nodeId)
FILE: Source/QuestPDF.ConformanceTests/TestEngine/SemanticTreeTestRunner.cs
class SemanticTreeTestRunner (line 6) | internal static class SemanticTreeTestRunner
method TestSemanticTree (line 8) | public static void TestSemanticTree(this IDocument document, SemanticT...
method CompareSemanticTrees (line 20) | private static void CompareSemanticTrees(SemanticTreeNode? actualRoot,...
class ExpectedSemanticTree (line 102) | internal static class ExpectedSemanticTree
method DocumentRoot (line 104) | public static SemanticTreeNode DocumentRoot(Action<SemanticTreeNode> c...
method Child (line 115) | public static void Child(this SemanticTreeNode parent, string type, Ac...
method Id (line 126) | public static SemanticTreeNode Id(this SemanticTreeNode node, int id)
method Attribute (line 132) | public static SemanticTreeNode Attribute(this SemanticTreeNode node, s...
method Alt (line 145) | public static SemanticTreeNode Alt(this SemanticTreeNode node, string ...
method Lang (line 151) | public static SemanticTreeNode Lang(this SemanticTreeNode node, string...
FILE: Source/QuestPDF.ConformanceTests/TestEngine/VeraPdfConformanceTestRunner.cs
class VeraPdfConformanceTestRunner (line 9) | public static class VeraPdfConformanceTestRunner
class ValidationResult (line 11) | public class ValidationResult
class FailedRule (line 16) | public class FailedRule
method GetErrorMessage (line 26) | public string GetErrorMessage()
method TestConformanceWithVeraPdf (line 47) | public static void TestConformanceWithVeraPdf(this IDocument document)
method TestConformance (line 63) | public static void TestConformance(string filePath)
method RunVeraPDF (line 74) | private static ValidationResult RunVeraPDF(string pdfFilePath)
FILE: Source/QuestPDF.ConformanceTests/TestsSetup.cs
class TestsSetup (line 6) | public class TestsSetup
method Setup (line 8) | [ModuleInitializer]
FILE: Source/QuestPDF.ConformanceTests/ZugferdTests.cs
class ZugferdTests (line 8) | internal class ZugferdTests
method ZugferdValidation_WithMustang (line 10) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/AccessibilityExamples.cs
class AccessibilityExamples (line 7) | public class AccessibilityExamples
method MinimalExample (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/AlignmentExamples.cs
class AlignmentExamples (line 7) | public class AlignmentExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/AspectRatioExamples.cs
class AspectRatioExamples (line 7) | public class AspectRatioExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/BackgroundExamples.cs
class BackgroundExamples (line 7) | public class BackgroundExamples
method SolidColor (line 9) | [Test]
method Gradient (line 57) | [Test]
method RoundedCorners (line 93) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/BarcodeExamples.cs
class BarcodeExamples (line 11) | public class BarcodeExamples
method BarcodeExample (line 13) | [Test]
method QRCodeExample (line 71) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/BorderExamples.cs
class BorderExamples (line 7) | public class BorderExamples
method SimpleExample (line 9) | [Test]
method Multiple (line 37) | [Test]
method ConsistentThickness (line 73) | [Test]
method VariousThickness (line 115) | [Test]
method Alignment (line 141) | [Test]
method RoundedCorners1 (line 188) | [Test]
method RoundedCorners2 (line 213) | [Test]
method SolidColor (line 247) | [Test]
method Gradient (line 287) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ChartExamples.cs
class ChartExamples (line 10) | public class ChartExamples
method PieChartExample (line 12) | [Test]
method BarExample (line 72) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternAddressComponentExample.cs
class CodePatternAddressComponentExample (line 7) | public class CodePatternAddressComponentExample
method Example (line 9) | [Test]
class Address (line 38) | public class Address
class AddressComponent (line 48) | public class AddressComponent : IComponent
method AddressComponent (line 52) | public AddressComponent(Address address)
method Compose (line 57) | public void Compose(IContainer container)
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternCapturePositionExample.cs
class CodePatternCapturePositionExample (line 8) | public class CodePatternCapturePositionExample
method Example (line 10) | [Test]
class DynamicTextSpanPositionCapture (line 61) | public class DynamicTextSpanPositionCapture : IDynamicComponent
method Compose (line 63) | public DynamicComponentComposeResult Compose(DynamicContext context)
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternComponentProgressbarComponentExample.cs
class CodePatternComponentProgressbarComponentExample (line 9) | public class CodePatternComponentProgressbarComponentExample
method Example (line 11) | [Test]
method GenerateReport (line 18) | public byte[] GenerateReport()
class PageProgressbarComponent (line 65) | public class PageProgressbarComponent : IDynamicComponent
method Compose (line 67) | public DynamicComponentComposeResult Compose(DynamicContext context)
class PageNumberSideComponent (line 88) | public class PageNumberSideComponent : IDynamicComponent
method Compose (line 90) | public DynamicComponentComposeResult Compose(DynamicContext context)
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternConfigurableComponentExample.cs
class CodePatternConfigurableComponentExample (line 7) | public class CodePatternConfigurableComponentExample
method Example (line 9) | [Test]
class SectionComponent (line 43) | public class SectionComponent : IComponent
method SectionComponent (line 47) | public SectionComponent()
method Compose (line 52) | public void Compose(IContainer container)
method Text (line 79) | public void Text(string label, string text)
method Image (line 84) | public void Image(string label, string imagePath)
method Custom (line 89) | public IContainer Custom(string label)
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternContentStylingExample.cs
class CodePatternContentStylingExample (line 7) | public class CodePatternContentStylingExample
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternDocumentStructureExample.cs
class CodePatternDocumentStructureExample (line 7) | public class CodePatternDocumentStructureExample
method Example (line 9) | [Test]
method GenerateReport (line 16) | public byte[] GenerateReport()
method ReportTitle (line 46) | private void ReportTitle(IContainer container)
method RedSection (line 56) | private void RedSection(IContainer container)
method GreenSection (line 73) | private void GreenSection(IContainer container)
method BlueSection (line 90) | private void BlueSection(IContainer container)
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternDynamicComponentExample.cs
class CodePatternDynamicComponentExample (line 9) | public class CodePatternDynamicComponentExample
method Dynamic (line 11) | [Test]
class OrderItem (line 49) | public class OrderItem
type OrdersTableWithPageSubtotalsComponentState (line 56) | public struct OrdersTableWithPageSubtotalsComponentState
class OrdersTableWithPageSubtotalsComponent (line 61) | public class OrdersTableWithPageSubtotalsComponent : IDynamicComponent...
method OrdersTableWithPageSubtotalsComponent (line 66) | public OrdersTableWithPageSubtotalsComponent(ICollection<OrderItem> ...
method Compose (line 76) | public DynamicComponentComposeResult Compose(DynamicContext context)
method ComposeHeader (line 113) | private static IDynamicElement ComposeHeader(DynamicContext context)
method ComposeFooter (line 134) | private static IDynamicElement ComposeFooter(DynamicContext context,...
method GetItemsForPage (line 149) | private IEnumerable<(OrderItem Item, IDynamicElement Element)> GetIt...
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternExecutionOrderExample.cs
class CodePatternExecutionOrderExample (line 7) | public class CodePatternExecutionOrderExample
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternExtesionMethodExample.cs
class CodePatternExtensionMethodExample (line 7) | public class CodePatternExtensionMethodExample
method Example (line 9) | [Test]
class TableExtensions (line 55) | public static class TableExtensions
method TableCellStyle (line 57) | private static IContainer TableCellStyle(this IContainer container, st...
method TableLabelCell (line 66) | public static void TableLabelCell(this IContainer container, string text)
method TableValueCell (line 74) | public static IContainer TableValueCell(this IContainer container)
FILE: Source/QuestPDF.DocumentationExamples/CodePatterns/CodePatternLocalHelpersExample.cs
class CodePatternLocalHelpersExample (line 7) | public class CodePatternLocalHelpersExample
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ColorsExamples.cs
class ColorsExamples (line 7) | public class ColorsExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ColumnExamples.cs
class ColumnExamples (line 7) | public class ColumnExamples
method SimpleExample (line 9) | [Test]
method SpacingExample (line 33) | [Test]
method CustomSpacingExample (line 59) | [Test]
method DisableUniformItemsWidthExample (line 88) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ComplexGraphicsExamples.cs
class ComplexGraphicsExamples (line 7) | public class ComplexGraphicsExamples
method RoundedRectangleWithGradient (line 9) | [Test]
method DottedLine (line 54) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ConstrainedExamples.cs
class ConstrainedExamples (line 7) | public class ConstrainedExamples
method WidthExample (line 9) | [Test]
method HeightExample (line 43) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ContentDirectionExamples.cs
class ContentDirectionExamples (line 7) | public class ContentDirectionExamples
method LeftToRightExample (line 9) | [Test]
method RightToLeftExample (line 37) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/CustomFirstPageExample.cs
class CustomFirstPageExample (line 7) | public class CustomFirstPageExample
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/DebugAreaExamples.cs
class DebugAreaExamples (line 7) | public class DebugAreaExamples
method LeftToRightExample (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/DecorationExamples.cs
class DecorationExamples (line 7) | public class DecorationExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/DefaultTextStyleExamples.cs
class DefaultTextStyleExamples (line 7) | public class DefaultTextStyleExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/DocumentOperationExamples.cs
class DocumentOperationExamples (line 8) | [TestFixture]
method MergeFiles (line 11) | [Test]
method SelectEvenPages (line 27) | [Test]
method Encrypt (line 40) | [Test]
method AddAttachment (line 59) | [Test]
method Overlay (line 77) | [Test]
method GenerateSampleDocument (line 119) | private void GenerateSampleDocument(string fileName, Color pageColor, ...
FILE: Source/QuestPDF.DocumentationExamples/EnsureSpaceExamples.cs
class EnsureSpaceExamples (line 7) | public class EnsureSpaceExamples
method EnabledExample (line 9) | [Test]
method DisabledExample (line 49) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/FlipExamples.cs
class FlipExamples (line 7) | public class FlipExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/HyperlinkExamples.cs
class HyperlinkExamples (line 7) | public class HyperlinkExamples
method ElementExample (line 9) | [Test]
method InsideTextExample (line 39) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ImageExamples.cs
class ImageExamples (line 9) | public class ImageExamples
method Example (line 11) | [Test]
method ImageScaling (line 42) | [Test]
method DpiSetting (line 115) | [Test]
method CompressionSetting (line 149) | [Test]
method GlobalSettings (line 183) | [Test]
method SharedImages (line 205) | [Test]
method DynamicImage (line 239) | [Test]
method SvgSupport (line 297) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/InlinedExamples.cs
class InlinedExamples (line 7) | public class InlinedExamples
method SimpleExample (line 9) | [Test]
method SpacingExample (line 38) | [Test]
method RandomBlock (line 66) | private void RandomBlock(IContainer container)
FILE: Source/QuestPDF.DocumentationExamples/LayersExamples.cs
class LayersExamples (line 7) | public class LayersExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/LazyExamples.cs
class LazyExamples (line 7) | public class LazyExamples
class SimpleComponent (line 9) | class SimpleComponent : IComponent
method Compose (line 14) | public void Compose(IContainer container)
method Disabled (line 31) | [Test]
method Enabled (line 60) | [Test]
method EnabledWithCache (line 94) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/LicenseSetup.cs
class LicenseSetup (line 5) | [SetUpFixture]
method Setup (line 8) | [OneTimeSetUp]
FILE: Source/QuestPDF.DocumentationExamples/LineExamples.cs
class LineExamples (line 7) | public class LineExamples
method VerticalLineExample (line 9) | [Test]
method HorizontalLineExample (line 40) | [Test]
method Thickness (line 71) | [Test]
method SolidColor (line 102) | [Test]
method Gradient (line 141) | [Test]
method DashPattern (line 180) | [Test]
method Complex (line 219) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ListExamples.cs
class ListExamples (line 7) | public class ListExamples
method BulletpointExample (line 9) | [Test]
method OrderedExample (line 42) | [Test]
method Nested (line 74) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/MapExample.cs
class MapboxStaticMapRenderer (line 7) | static class MapboxStaticMapRenderer
method FetchStaticMapAsync (line 12) | public static async Task<byte[]?> FetchStaticMapAsync(double longitude...
class MapExample (line 33) | public class MapExample
method SimpleExample (line 35) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/MergingDocumentsExamples.cs
class MergingDocumentsExamples (line 7) | public class MergingDocumentsExamples
method UseOriginalPageNumbersExample (line 9) | [Test]
method UseContinuousPageNumbersExample (line 21) | [Test]
method GenerateReport (line 36) | private static Document GenerateReport(string title, int itemsCount)
FILE: Source/QuestPDF.DocumentationExamples/MultiColumnExamples.cs
class MultiColumnExamples (line 7) | public class MultiColumnExamples
method Example (line 9) | [Test]
method SpacerExample (line 48) | [Test]
method BalanceHeightWithExample (line 88) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/PaddingExamples.cs
class PaddingExamples (line 7) | public class PaddingExamples
method SimpleExample (line 9) | [Test]
method NegativeExample (line 33) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/PageBreakExamples.cs
class PageBreakExamples (line 7) | public class PageBreakExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/PageExamples.cs
class PageExamples (line 8) | public class PageExamples
method Simple (line 10) | [Test]
method MainSlots (line 44) | [Test]
method Foreground (line 80) | [Test]
method Background (line 109) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/PlaceholderExamples.cs
class PlaceholderExamples (line 7) | public class PlaceholderExamples
method TextExample (line 9) | [Test]
method BackgroundColorExample (line 47) | [Test]
method ColorExample (line 79) | [Test]
method ImageExample (line 109) | [Test]
method ElementExample (line 149) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/PreventPageBreakExamples.cs
class PreventPageBreakExamples (line 6) | public class PreventPageBreakExamples
method EnabledExample (line 8) | [Test]
method DisabledExample (line 42) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/RepeatExamples.cs
class RepeatExamples (line 7) | public class RepeatExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/RotateExamples.cs
class RotateExamples (line 7) | public class RotateExamples
method Example (line 9) | [Test]
method FreeExample (line 49) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/RoundedCornersExamples.cs
class RoundedCornersExamples (line 7) | public class RoundedCornersExamples
method Consistent (line 9) | [Test]
method Various (line 34) | [Test]
method Complex (line 62) | [Test]
method Image (line 125) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/RowExamples.cs
class RowExamples (line 7) | public class RowExamples
method SimpleExample (line 9) | [Test]
method SpacingExample (line 46) | [Test]
method CustomSpacingExample (line 75) | [Test]
method DisableUniformItemsHeightExample (line 104) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ScaleExamples.cs
class ScaleExamples (line 7) | public class ScaleExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ScaleToFitExamples.cs
class ScaleToFitExamples (line 7) | public class ScaleToFitExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/SectionExamples.cs
class SectionExamples (line 7) | public class SectionExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/SemanticExamples.cs
class SemanticExamples (line 9) | public class SemanticExamples
method HeaderAndFooter (line 11) | [Test]
class BookTermModel (line 109) | public class BookTermModel
method GenerateBook (line 118) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ShadowExamples.cs
class ShadowExamples (line 7) | public class ShadowExamples
method Simple (line 9) | [Test]
method OffsetX (line 41) | [Test]
method OffsetY (line 78) | [Test]
method Color (line 115) | [Test]
method Blur (line 158) | [Test]
method Spread (line 194) | [Test]
method NoBlur (line 231) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ShowEntireExamples.cs
class ShowEntireExamples (line 7) | public class ShowEntireExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ShowOnceExamples.cs
class ShowOnceExamples (line 7) | public class ShowOnceExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/SkiaSharpHelpers.cs
class SkiaSharpHelpers (line 8) | public static class SkiaSharpHelpers
method SkiaSharpSvgCanvas (line 10) | public static void SkiaSharpSvgCanvas(this IContainer container, Actio...
method SkiaSharpRasterizedCanvas (line 24) | public static void SkiaSharpRasterizedCanvas(this IContainer container...
FILE: Source/QuestPDF.DocumentationExamples/SkiaSharpIntegrationExamples.cs
class SkiaSharpIntegrationExamples (line 9) | public class SkiaSharpIntegrationExamples
method Svg (line 11) | [Test]
method Resterized (line 90) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/SkipOnceExamples.cs
class SkipOnceExamples (line 7) | public class SkipOnceExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/StopPagingExamples.cs
class StopPagingExamples (line 7) | public class StopPagingExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/TableExamples.cs
class TableExamples (line 7) | public class TableExamples
method Basic (line 9) | [Test]
method CellStyleExample (line 53) | [Test]
method OverlappingCells (line 125) | [Test]
method ManualCellPlacement (line 208) | [Test]
method ColumnsDefinition (line 286) | [Test]
method HeaderAndFooter (line 330) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/Text/ParagraphStyleExamples.cs
class ParagraphStyleExamples (line 7) | public class ParagraphStyleExamples
method DefaultTextStyle (line 9) | [Test]
method TextAlignment (line 36) | [Test]
method FirstLineIndentation (line 83) | [Test]
method Spacing (line 104) | [Test]
method ClampLines (line 125) | [Test]
method ClampLinesWithCustomEllipsis (line 161) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/Text/TextBasicExamples.cs
class TextBasicExamples (line 8) | public class TextBasicExamples
method Basic (line 10) | [Test]
method BasicWithStyle (line 30) | [Test]
method Rich (line 73) | [Test]
method StyleInheritance (line 106) | [Test]
method PageNumber (line 175) | [Test]
method PageNumberFormat (line 206) | [Test]
method Hyperlink (line 235) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/Text/TextInjectContent.cs
class TextInjectContent (line 7) | public class TextInjectContent
method InjectImage (line 9) | [Test]
method InjectSvg (line 38) | [Test]
method InjectPosition (line 63) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/Text/TextStyleExamples.cs
class TextStyleExamples (line 7) | public class TextStyleExamples
method FontSize (line 9) | [Test]
method FontFamily (line 44) | [Test]
method FontColor (line 75) | [Test]
method BackgroundColor (line 104) | [Test]
method Italic (line 129) | [Test]
method FontWeight (line 154) | [Test]
method Subscript (line 185) | [Test]
method Superscript (line 210) | [Test]
method LineHeight (line 235) | [Test]
method LetterSpacing (line 272) | [Test]
method WordSpacing (line 309) | [Test]
method FontFallback (line 345) | [Test]
method FontFallbackEmoji (line 368) | [Test]
method TextFontFeatures (line 391) | [Test]
method DecorationTypes (line 439) | [Test]
method DecorationStyles (line 468) | [Test]
method DecorationsAdvanced (line 503) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/TranslateExamples.cs
class TranslateExamples (line 7) | public class TranslateExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/UnconstrainedExamples.cs
class UnconstrainedExamples (line 7) | public class UnconstrainedExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.DocumentationExamples/ZIndexExamples.cs
class ZIndexExamples (line 7) | public class ZIndexExamples
method Example (line 9) | [Test]
FILE: Source/QuestPDF.LayoutTests/ColumnTests.cs
class ColumnTests (line 3) | public class ColumnTests
method Typical (line 5) | [Test]
method SingleItem (line 45) | [Test]
method ZeroHeightItemDoesNotConsumeSpacing (line 70) | [Test]
method NoSpacing (line 100) | [Test]
method PartialRenderItem (line 128) | [Test]
FILE: Source/QuestPDF.LayoutTests/LineTests.cs
class LineTests (line 3) | public class LineTests
method VerticalLineRequiresSpaceEqualToItsThickness (line 5) | [Test]
method HorizontalLineRequiresSpaceEqualToItsThickness (line 17) | [Test]
method CheckRenderingState (line 31) | [Test]
FILE: Source/QuestPDF.LayoutTests/MultiColumnTests.cs
class MultiColumnTests (line 6) | public class MultiColumnTests
method DynamicComponent (line 8) | [Test]
class CounterComponent (line 96) | public class CounterComponent : IDynamicComponent<int>
method Compose (line 100) | public DynamicComponentComposeResult Compose(DynamicContext context)
FILE: Source/QuestPDF.LayoutTests/PaddingTests.cs
class PaddingTests (line 3) | [TestFixture]
method PaddingModifiesPositioningAndMinimumSize (line 6) | [Test]
method NegativePaddingIsAllowed (line 34) | [Test]
method PaddingSupportsPaging (line 59) | [Test]
method MultipleItemsWithAppliedPadding (line 92) | [Test]
method PaddingProducesAvailableSpaceOfNegativeSize (line 120) | [Test]
method PaddingWithEmptyChild (line 132) | [Test]
method PaddingOnEmptyElementProducesAvailableSpaceOfNegativeSize (line 149) | [Test]
method PaddingOnEmptyElementProducesAvailableSpaceOfNegativeSize2 (line 161) | [Test]
method NegativePaddingProducesMeasurementOfNegativeSize (line 178) | [Test]
FILE: Source/QuestPDF.LayoutTests/RotateTests.cs
class RotateTests (line 3) | public class RotateTests
method SimpleRotation (line 5) | [Test]
FILE: Source/QuestPDF.LayoutTests/RowTests.cs
class RowTests (line 3) | [TestFixture]
method SingleConstantItem (line 8) | [Test]
method MultipleConstantItems (line 32) | [Test]
method SingleRelativeItem (line 60) | [Test]
method TwoRelativeItems (line 84) | [Test]
method SingleAutoItem (line 110) | [Test]
method RelativeItemFillsRemainingSpace (line 134) | [Test]
method RelativeItemsSplitRemainingSpaceAccordingToProportions (line 162) | [Test]
method ComplexItems (line 190) | [Test]
method OneItemSpansTwoPages (line 232) | [Test]
method NoSpacing (line 274) | [Test]
method NormalSpacing (line 302) | [Test]
method BiggerSpacing (line 332) | [Test]
method SpacingDoesNotFitInAvailableSpace (line 362) | [Test]
method SpacingIsLargerThanAvailableSpace (line 381) | [Test]
method NotEnoughSpaceForRelativeItemsAfterApplyingSpacing (line 398) | [Test]
method OneItemRequiresTwoPages (line 421) | [Test]
method ItemsRequireMultiplePages (line 456) | [Test]
method ItemHeightExceedsAvailableHeight (line 500) | [Test]
method RightToLeftDirection (line 520) | [Test]
method ConstantItemOfTooLargeSize (line 552) | [Test]
method ConstantItemHasChildOfTooLargeSize (line 567) | [Test]
method SumOfConstantItemsExceedsAvailableWidth (line 583) | [Test]
method RelativeItemHasChildOfTooLargeSize (line 600) | [Test]
method AutoItemHasChildOfTooLargeSize (line 616) | [Test]
method SumOfAutoItemsExceedsAvailableWidth (line 632) | [Test]
method SumOfVariousItemsExceedsAvailableWidth (line 649) | [Test]
method NoItems (line 669) | [Test]
method RerenderingOfFullyDrawnRow (line 690) | [Test]
method CheckRenderingState (line 736) | [Test]
FILE: Source/QuestPDF.LayoutTests/ScaleTests.cs
class ScaleTests (line 5) | public class ScaleTests
method DrawTestSubject (line 7) | private void DrawTestSubject(IContainer container)
method DefaultScale (line 21) | [Test]
method PositiveScale05 (line 47) | [Test]
method PositiveScale15 (line 73) | [Test]
method PositiveScale25 (line 99) | [Test]
method PositiveScaleTwoPages (line 125) | [Test]
method ScaleVertical (line 158) | [Test]
method ScaleVerticalNegative (line 184) | [Test]
method ScaleHorizontal (line 210) | [Test]
method ScaleHorizontalNegative (line 236) | [Test]
method WrapHorizontal (line 262) | [Test]
method WrapVertical (line 274) | [Test]
FILE: Source/QuestPDF.LayoutTests/Setup.cs
class Setup (line 3) | [SetUpFixture]
method Configure (line 6) | [OneTimeSetUp]
FILE: Source/QuestPDF.LayoutTests/ShowIfTests.cs
class ShowIfTests (line 3) | public class ShowIfTests
method Scenario (line 5) | [Test]
FILE: Source/QuestPDF.LayoutTests/ShrinkTests.cs
class ShrinkTests (line 3) | public class ShrinkTests
method Both (line 5) | [Test]
method Vertical (line 36) | [Test]
method Horizontal (line 67) | [Test]
method ContentFromRightToLeft (line 98) | [Test]
FILE: Source/QuestPDF.LayoutTests/SimpleRotateTests.cs
class SimpleRotateTests (line 5) | public class SimpleRotateTests
method DrawTestSubject (line 7) | private void DrawTestSubject(IContainer container)
method NoRotation (line 30) | [Test]
method OneRotation (line 56) | [Test]
method TwoRotations (line 85) | [Test]
method ThreeRotation (line 115) | [Test]
method NoRotationWithPaging (line 150) | [Test]
method OneRotationWithPaging (line 183) | [Test]
method TwoRotationsWithPaging (line 219) | [Test]
method ThreeRotationWithPaging (line 256) | [Test]
FILE: Source/QuestPDF.LayoutTests/StopPagingTests.cs
class StopPagingTests (line 3) | public class StopPagingTests
method ChildReturnsWrap (line 5) | [Test]
method ChildReturnsPartialRender (line 30) | [Test]
method ChildReturnsFullRender (line 58) | [Test]
method ChildReturnsEmpty (line 84) | [Test]
FILE: Source/QuestPDF.LayoutTests/TableTests.cs
class TableTests (line 3) | public class TableTests
method RowSpan_CornerCase1 (line 5) | [Test]
method RowSpan_CornerCase2 (line 50) | [Test]
method RowSpan_CornerCase3 (line 102) | [Test]
FILE: Source/QuestPDF.LayoutTests/TestEngine/ContinuousBlock.cs
class ContinuousBlock (line 7) | internal class ContinuousBlock : Element, IStateful
method Measure (line 12) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 31) | internal override void Draw(Size availableSpace)
method ResetState (line 50) | public void ResetState(bool hardReset = false) => HeightOffset = 0;
method GetState (line 51) | public object GetState() => HeightOffset;
method SetState (line 52) | public void SetState(object state) => HeightOffset = (float) state;
FILE: Source/QuestPDF.LayoutTests/TestEngine/DrawingRecorder.cs
class ElementDrawingEvent (line 5) | internal class ElementDrawingEvent
class DrawingRecorder (line 14) | internal class DrawingRecorder
method Record (line 18) | public void Record(ElementDrawingEvent elementDrawingEvent)
method GetDrawingEvents (line 23) | public IReadOnlyCollection<ElementDrawingEvent> GetDrawingEvents()
FILE: Source/QuestPDF.LayoutTests/TestEngine/ElementObserver.cs
class ElementObserver (line 11) | internal class ElementObserver : ContainerElement
method Draw (line 16) | internal override void Draw(Size availableSpace)
method GetRealChild (line 44) | private Element GetRealChild()
FILE: Source/QuestPDF.LayoutTests/TestEngine/ElementObserverSetter.cs
class ElementObserverSetter (line 6) | internal class ElementObserverSetter : ContainerElement
method Measure (line 10) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 16) | internal override void Draw(Size availableSpace)
method SetRecorderOnChildren (line 22) | private void SetRecorderOnChildren()
FILE: Source/QuestPDF.LayoutTests/TestEngine/FluentExtensions.cs
class ExpectedDocumentLayoutDescriptor (line 5) | internal class ExpectedDocumentLayoutDescriptor(DrawingRecorder DrawingR...
method Page (line 9) | public ExpectedPageLayoutDescriptor Page()
class ExpectedPageLayoutDescriptor (line 15) | internal class ExpectedPageLayoutDescriptor(DrawingRecorder DrawingRecor...
method RequiredAreaSize (line 17) | public ExpectedPageLayoutDescriptor RequiredAreaSize(float width, floa...
method Content (line 29) | public void Content(Action<ExpectedPageContentDescriptor> content)
class ExpectedPageContentDescriptor (line 36) | internal class ExpectedPageContentDescriptor(DrawingRecorder drawingReco...
method Mock (line 38) | public ExpectedMockPositionDescriptor Mock(string mockId)
class ExpectedMockPositionDescriptor (line 51) | internal class ExpectedMockPositionDescriptor(ElementDrawingEvent drawin...
method Position (line 53) | public ExpectedMockPositionDescriptor Position(float x, float y)
method Size (line 59) | public ExpectedMockPositionDescriptor Size(float width, float height)
method State (line 65) | public ExpectedMockPositionDescriptor State(object state)
class FluentExtensions (line 72) | internal static class FluentExtensions
method Mock (line 76) | public static IContainer Mock(this IContainer element, string id)
method ElementObserverSetter (line 84) | public static IContainer ElementObserverSetter(this IContainer element...
method Size (line 92) | public static IContainer Size(this IContainer element, float width, fl...
method ContinuousBlock (line 97) | public static void ContinuousBlock(this IContainer element, float widt...
method SolidBlock (line 106) | public static void SolidBlock(this IContainer element, float width = 1...
FILE: Source/QuestPDF.LayoutTests/TestEngine/LayoutTest.cs
class LayoutTest (line 11) | internal class LayoutTest
method HavingSpaceOfSize (line 21) | public static LayoutTest HavingSpaceOfSize(float width, float height, ...
method ForContent (line 32) | public LayoutTest ForContent(Action<IContainer> handler)
method ExpectDrawResult (line 49) | public void ExpectDrawResult(Action<ExpectedDocumentLayoutDescriptor> ...
method ExpectLayoutException (line 156) | public void ExpectLayoutException(string reason)
method PerformTest (line 174) | private void PerformTest()
method VisualizeOutput (line 189) | public LayoutTest VisualizeOutput()
FILE: Source/QuestPDF.LayoutTests/TestEngine/SolidBlock.cs
class SolidBlock (line 7) | internal class SolidBlock : Element, IStateful
method Measure (line 12) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 26) | internal override void Draw(Size availableSpace)
method ResetState (line 39) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 40) | public object GetState() => IsRendered;
method SetState (line 41) | public void SetState(object state) => IsRendered = (bool) state;
FILE: Source/QuestPDF.LayoutTests/TranslateTests.cs
class TranslateTests (line 3) | public class TranslateTests
method HorizontalTranslation (line 5) | [Test]
method VerticalTranslation (line 26) | [Test]
method MultipleItemsWithTranslation (line 47) | [Test]
FILE: Source/QuestPDF.ReportSample/DataSource.cs
class DataSource (line 8) | public static class DataSource
method GetReport (line 10) | public static ReportModel GetReport()
FILE: Source/QuestPDF.ReportSample/Helpers.cs
class Helpers (line 11) | public static class Helpers
method GetTestItem (line 15) | public static string GetTestItem(string path) => Path.Combine(AppDomai...
method GetImage (line 17) | public static byte[] GetImage(string name)
method RandomLocation (line 23) | public static Location RandomLocation()
method FormatAsRomanNumeral (line 34) | public static string FormatAsRomanNumeral(this int number)
method SkiaSharpCanvas (line 59) | public static void SkiaSharpCanvas(this IContainer container, Action<S...
method SkiaSharpRasterized (line 73) | public static void SkiaSharpRasterized(this IContainer container, Acti...
FILE: Source/QuestPDF.ReportSample/Layouts/DifferentHeadersTemplate.cs
class DifferentHeadersTemplate (line 8) | public class DifferentHeadersTemplate : IDocument
method GetMetadata (line 10) | public DocumentMetadata GetMetadata() => DocumentMetadata.Default;
method GetSettings (line 11) | public DocumentSettings GetSettings() => DocumentSettings.Default;
method Compose (line 13) | public void Compose(IDocumentContainer container)
method ComposeHeader (line 28) | private void ComposeHeader(IContainer container)
method ComposeContent (line 45) | private void ComposeContent(IContainer container)
method ComposeFooter (line 58) | private void ComposeFooter(IContainer container)
FILE: Source/QuestPDF.ReportSample/Layouts/Helpers.cs
class Helpers (line 8) | public static class Helpers
method Cell (line 10) | static IContainer Cell(this IContainer container, bool background)
method ValueCell (line 19) | public static IContainer ValueCell(this IContainer container)
method LabelCell (line 24) | public static IContainer LabelCell(this IContainer container)
method Format (line 29) | public static string Format(this Location location)
FILE: Source/QuestPDF.ReportSample/Layouts/ImagePlaceholder.cs
class ImagePlaceholder (line 7) | public class ImagePlaceholder : IComponent
method Compose (line 11) | public void Compose(IContainer container)
FILE: Source/QuestPDF.ReportSample/Layouts/PhotoTemplate.cs
class PhotoTemplate (line 8) | public class PhotoTemplate : IComponent
method PhotoTemplate (line 12) | public PhotoTemplate(ReportPhoto model)
method Compose (line 17) | public void Compose(IContainer container)
method PhotoWithMaps (line 29) | void PhotoWithMaps(IContainer container)
method PhotoDetails (line 46) | void PhotoDetails(IContainer container)
FILE: Source/QuestPDF.ReportSample/Layouts/SectionTemplate.cs
class SectionTemplate (line 8) | public class SectionTemplate : IComponent
method SectionTemplate (line 12) | public SectionTemplate(ReportSection model)
method Compose (line 17) | public void Compose(IContainer container)
method MapElement (line 52) | static void MapElement(IContainer container, ReportSectionMap model)
method PhotosElement (line 69) | static void PhotosElement(IContainer container, ReportSectionPhotos mo...
FILE: Source/QuestPDF.ReportSample/Layouts/StandardReport.cs
class StandardReport (line 8) | public class StandardReport : IDocument
method StandardReport (line 12) | public StandardReport(ReportModel model)
method GetMetadata (line 17) | public DocumentMetadata GetMetadata()
method GetSettings (line 25) | public DocumentSettings GetSettings() => DocumentSettings.Default;
method Compose (line 27) | public void Compose(IDocumentContainer container)
method ComposeHeader (line 51) | private void ComposeHeader(IContainer container)
method ComposeContent (line 82) | void ComposeContent(IContainer container)
FILE: Source/QuestPDF.ReportSample/Layouts/TableOfContentsTemplate.cs
class TableOfContentsTemplate (line 12) | public class TableOfContentsTemplate : IComponent
method TableOfContentsTemplate (line 16) | public TableOfContentsTemplate(List<ReportSection> sections)
method Compose (line 21) | public void Compose(IContainer container)
method DrawLink (line 44) | private static void DrawLink(IContainer container, int number, string ...
FILE: Source/QuestPDF.ReportSample/Models.cs
class ReportModel (line 7) | public class ReportModel
class ReportHeaderField (line 17) | public class ReportHeaderField
class Location (line 23) | public class Location
class ReportSection (line 29) | public class ReportSection
class ReportSectionElement (line 35) | public abstract class ReportSectionElement
class ReportSectionText (line 40) | public class ReportSectionText : ReportSectionElement
class ReportSectionMap (line 45) | public class ReportSectionMap : ReportSectionElement
class ReportSectionPhotos (line 50) | public class ReportSectionPhotos : ReportSectionElement
class ReportPhoto (line 55) | public class ReportPhoto
FILE: Source/QuestPDF.ReportSample/Tests.cs
class ReportGeneration (line 15) | public class ReportGeneration
method SetUp (line 19) | [SetUp]
method GeneratePdfAndShow (line 30) | [Test]
method GenerateXpsAndShow (line 37) | [Test]
method GeneratePdfForManualVerificationTesting (line 44) | [Test]
method CheckFinalizersStability (line 50) | [Test]
FILE: Source/QuestPDF.ReportSample/Typography.cs
class Typography (line 7) | public static class Typography
FILE: Source/QuestPDF.UnitTests/AlignmentTests.cs
class AlignmentTests (line 9) | [TestFixture]
method Measure (line 12) | [Test]
method Draw_HorizontalCenter_VerticalCenter (line 15) | [Test]
method Draw_HorizontalLeft_VerticalCenter (line 34) | [Test]
method Draw_HorizontalCenter_VerticalBottom (line 53) | [Test]
method Draw_HorizontalRight_VerticalTop (line 72) | [Test]
method Draw_HorizontalCenter_VerticalNone (line 91) | [Test]
method Draw_HorizontalNone_VerticalMiddle (line 110) | [Test]
FILE: Source/QuestPDF.UnitTests/AspectRatioTests.cs
class AspectRatioTests (line 9) | [TestFixture]
method Measure_FitWidth_EnoughSpace_FullRender (line 12) | [Test]
method Measure_FitWidth_EnoughSpace_PartialRender (line 28) | [Test]
method Measure_FitWidth_EnoughSpace_Wrap (line 44) | [Test]
method Measure_FitWidth_EnoughSpace (line 60) | [Test]
method Measure_FitWidth_NotEnoughSpace (line 76) | [Test]
method Measure_FitHeight_EnoughSpace (line 91) | [Test]
method Measure_FitHeight_NotEnoughSpace (line 107) | [Test]
method Measure_FitArea_ToWidth (line 122) | [Test]
method Measure_FitArea_ToHeight (line 138) | [Test]
method DrawChild_PerWidth (line 154) | [Test]
method DrawChild_PerHeight (line 171) | [Test]
method DrawChild_PerWidth_RightToLeft (line 188) | [Test]
method DrawChild_PerHeight_RightToLeft (line 206) | [Test]
FILE: Source/QuestPDF.UnitTests/ColumnTests.cs
class ColumnTests (line 11) | [TestFixture]
method CreateColumnWithTwoItems (line 14) | private Column CreateColumnWithTwoItems(TestPlan testPlan)
method CreateColumnWithTwoItemsWhereFirstIsFullyRendered (line 26) | private Column CreateColumnWithTwoItemsWhereFirstIsFullyRendered(TestP...
method Measure_ReturnsWrap_WhenFirstChildWraps (line 35) | [Test]
method Measure_ReturnsPartialRender_WhenFirstChildReturnsPartialRender (line 45) | [Test]
method Measure_ReturnsPartialRender_WhenSecondChildWraps (line 55) | [Test]
method Measure_ReturnsPartialRender_WhenSecondChildReturnsPartialRender (line 66) | [Test]
method Measure_ReturnsFullRender_WhenSecondChildReturnsFullRender (line 77) | [Test]
method Draw_WhenFirstChildWraps (line 92) | [Test]
method Draw_WhenFirstChildPartiallyRenders (line 102) | [Test]
method Draw_WhenFirstChildFullyRenders_AndSecondChildWraps (line 115) | [Test]
method Draw_WhenFirstChildFullyRenders_AndSecondChildPartiallyRenders (line 129) | [Test]
method Draw_WhenFirstChildFullyRenders_AndSecondChildFullyRenders (line 146) | [Test]
method Draw_UsesEmpty_WhenFirstChildIsRendered (line 163) | [Test]
method Draw_DoesNotToggleFirstRenderedFlag_WhenSecondFullyRenders (line 177) | [Test]
FILE: Source/QuestPDF.UnitTests/ConstrainedTests.cs
class ConstrainedTests (line 9) | [TestFixture]
method Measure_MinHeight_ExpectWrap (line 14) | [Test]
method Measure_MinHeight_ExtendHeight (line 26) | [Test]
method Measure_MinHeight_PassHeight (line 41) | [Test]
method Measure_MaxHeight_Empty (line 56) | [Test]
method Measure_MaxHeight_PartialRender (line 68) | [Test]
method Measure_MaxHeight_ExpectWrap (line 83) | [Test]
method Measure_MinWidth_ExpectWrap (line 102) | [Test]
method Measure_MinWidth_ExtendHeight (line 114) | [Test]
method Measure_MinWidth_PassHeight (line 129) | [Test]
method Measure_MaxWidth_Empty (line 144) | [Test]
method Measure_MaxWidth_PartialRender (line 156) | [Test]
method Measure_MaxWidth_ExpectWrap (line 171) | [Test]
FILE: Source/QuestPDF.UnitTests/DecorationTests.cs
class DecorationTests (line 9) | [TestFixture]
method CreateDecoration (line 12) | private Decoration CreateDecoration(TestPlan testPlan)
method Measure_ReturnsWrap_WhenBeforeReturnsWrap (line 24) | [Test]
method Measure_ReturnsWrap_WhenContentReturnsWrap (line 36) | [Test]
method Measure_ReturnsWrap_WhenAfterReturnsWrap (line 48) | [Test]
method Measure_ReturnsWrap_WhenBeforeReturnsPartialRender (line 60) | [Test]
method Measure_ReturnsWrap_WhenAfterReturnsPartialRender (line 72) | [Test]
method Measure_ReturnsWrap_WhenContentReturnsPartialRender (line 84) | [Test]
method Measure_ReturnsWrap_WhenContentReturnsFullRender (line 96) | [Test]
method Draw_Append (line 112) | [Test]
FILE: Source/QuestPDF.UnitTests/DocumentCompressionTests.cs
class DocumentCompressionTests (line 12) | public class DocumentCompressionTests
method Test (line 14) | [Test]
FILE: Source/QuestPDF.UnitTests/DocumentOperationTests.cs
class DocumentOperationTests (line 16) | public class DocumentOperationTests
method TakePages (line 18) | [Test]
method MergeTest (line 29) | [Test]
method OverlayTest (line 43) | [Test]
method UnderlayTest (line 58) | [Test]
method AttachmentTest (line 73) | [Test]
method Encrypt40Test (line 88) | [Test]
method Encrypt128Test (line 103) | [Test]
method Encrypt256Test (line 118) | [Test]
method LinearizeTest (line 133) | [Test]
method DecryptTest (line 144) | [Test]
method RemoveRestrictionsTest (line 164) | [Test]
method LoadEncryptedWithIncorrectPasswordTest (line 186) | [Test]
method ExtendMetadataTest (line 208) | [Test]
method GenerateSampleDocument (line 220) | private void GenerateSampleDocument(string filePath, Color color, int ...
FILE: Source/QuestPDF.UnitTests/DynamicImageTests.cs
class DynamicImageTests (line 10) | [TestFixture]
method Measure_TakesAvailableSpaceRegardlessOfSize (line 13) | [Test]
method Draw_HandlesNull (line 27) | [Test]
method Draw_PreservesSize (line 41) | [Test]
method Draw_PassesCorrectSizeToSource (line 56) | [Test]
method GenerateImage (line 80) | byte[] GenerateImage(ImageSize size)
method GenerateImage (line 86) | static SKImage GenerateImage(int width, int height)
FILE: Source/QuestPDF.UnitTests/EnsureSpaceTests.cs
class EnsureSpaceTests (line 9) | [TestFixture]
method Measure_ReturnsPartialRenderWithZeroSize_WhenChildReturnsWrap (line 12) | [Test]
method Measure_ReturnsPartialRenderWithZeroSize_WhenChildReturnsPartialRender_AndNotEnoughSpace (line 26) | [Test]
method Measure_ReturnsPartialRender_WhenChildReturnsPartialRender_AndEnoughSpace (line 40) | [Test]
method Measure_ReturnsFullRender_WhenChildReturnsFullRender_AndNotEnoughSpace (line 54) | [Test]
method Measure_ReturnsFullRender_WhenChildReturnsFullRender_AndEnoughSpace (line 68) | [Test]
FILE: Source/QuestPDF.UnitTests/ExtendTests.cs
class ExtendTests (line 9) | [TestFixture]
method Measure_ReturnsWrap_WhenChildReturnsWrap (line 12) | [Test]
method Measure_ReturnsPartialRender_WhenChildReturnsPartialRender (line 25) | [Test]
method Measure_ReturnsFullRender_WhenChildReturnsFullRender (line 40) | [Test]
method Measure_ExtendHorizontal (line 55) | [Test]
method Measure_ExtendVertical (line 70) | [Test]
method Draw (line 85) | [Test]
FILE: Source/QuestPDF.UnitTests/ExternalLinkTests.cs
class ExternalLinkTests (line 7) | [TestFixture]
method Measure (line 10) | [Test]
FILE: Source/QuestPDF.UnitTests/FontManagerTests.cs
class FontManagerTests (line 8) | public class FontManagerTests
method LoadFontFromFile (line 10) | [Test]
method LoadFontFromEmbeddedResource (line 17) | [Test]
method LoadFontFromEmbeddedResource_ShouldThrowException_WhenResourceIsNotAvailable (line 23) | [Test]
FILE: Source/QuestPDF.UnitTests/ImageGenerationTests.cs
class GenerateImageTests (line 13) | public class GenerateImageTests
method GeneratedImageResolutionCorrespondsToTargetDpi (line 15) | [Test]
type GeneratedImageResolutionCorrespondsToTargetDpi_TestCaseItem (line 42) | public record GeneratedImageResolutionCorrespondsToTargetDpi_TestCaseI...
method GeneratedImageSizeCorrespondsToImageQuality (line 53) | [Test]
method ImageFormatIsRespected (line 87) | [TestCase(ImageFormat.Png)]
FILE: Source/QuestPDF.UnitTests/ImageTests.cs
class ImageTests (line 20) | [TestFixture]
method Measure_TakesMinimalSpaceRegardlessOfSize (line 23) | [Test]
method Draw_TakesAvailableSpaceRegardlessOfSize (line 35) | [Test]
method Fluent_RecognizesImageProportions (line 50) | [Test]
method ImageObject_ThrowsEncodingException_WhenImageDataIsIncorrect (line 66) | [Test]
method ImageObject_ThrowsEncodingException_WhenStreamIsIncorrect (line 73) | [Test]
method ImageObject_ThrowsFileNotFoundException_FileIsNotFound (line 85) | [Test]
method UsingSharedImageShouldNotDrasticallyIncreaseDocumentSize (line 92) | [Test]
method ImageCompressionHasImpactOnDocumentSize (line 129) | [Test]
method TargetDpiHasImpactOnDocumentSize (line 141) | [Test]
method GetDocumentSize (line 153) | private static int GetDocumentSize(Action<IContainer> container)
method GenerateDocumentImage (line 167) | static DocumentImage GenerateDocumentImage(int width, int height)
FILE: Source/QuestPDF.UnitTests/InternalLinkTests.cs
class InternalLinkTests (line 7) | [TestFixture]
method Measure (line 10) | [Test]
FILE: Source/QuestPDF.UnitTests/InternalLocationTests.cs
class InternalLocationTests (line 7) | [TestFixture]
method Measure (line 10) | [Test]
FILE: Source/QuestPDF.UnitTests/LayersTests.cs
class LayersTests (line 10) | [TestFixture]
method GetLayers (line 17) | private static Layers GetLayers(TestPlan x)
method Measure_Wrap (line 42) | [Test]
method Measure_PartialRender (line 52) | [Test]
method Measure_FullRender (line 62) | [Test]
method Draw_Simple (line 76) | [Test]
method Draw_WhenSecondaryLayerReturnsWrap_SkipThatLayer_1 (line 95) | [Test]
method Draw_WhenSecondaryLayerReturnsWrap_SkipThatLayer_2 (line 112) | [Test]
FILE: Source/QuestPDF.UnitTests/LicenseSetup.cs
class LicenseSetup (line 6) | [SetUpFixture]
method Setup (line 9) | [OneTimeSetUp]
FILE: Source/QuestPDF.UnitTests/LineTests.cs
class LineTests (line 10) | public class LineTests
method VerticalLineTypeIsSetCorrectly (line 14) | [Test]
method HorizontalLineTypeIsSetCorrectly (line 25) | [Test]
method VerticalLineThicknessSupportsUnitConversion (line 40) | [Test]
method LineThicknessCannotBeNegative (line 50) | [TestCase(-5f)]
method LineThicknessCanBeEqualToZero (line 64) | [Test]
method HorizontalLineThicknessSupportsUnitConversion (line 76) | [Test]
method LineColorIsSetCorrectly (line 88) | [Test]
method LineDashPatternCannotBeNull (line 100) | [Test]
method LineDashPatternCannotBeEmpty (line 114) | [Test]
method LineDashPatternMustHaveEvenNumberOfElements (line 128) | [Test]
method LineDashPatternIsSetCorrectly (line 142) | [Test]
method LineDashPatternSupportsUnitConversion (line 155) | [Test]
method LineGradientColorsCannotBeBull (line 172) | [Test]
method LineGradientColorsCannotBeEmpty (line 186) | [Test]
method LineGradientColorsAreSetCorrectly (line 200) | [Test]
method VerticalLineCompanionHint (line 217) | [Test]
method HorizontalLineCompanionHint (line 227) | [Test]
method LineSupportsStatefulOperations (line 239) | [Test]
FILE: Source/QuestPDF.UnitTests/PaddingTests.cs
class PaddingTests (line 10) | [TestFixture]
method CompanionHint (line 13) | [TestCase(0, 0, 0, 0, "")]
method PaddingLeftIsCumulative (line 42) | [Test]
method PaddingTopIsCumulative (line 53) | [Test]
method PaddingRightIsCumulative (line 64) | [Test]
method PaddingBottomIsCumulative (line 75) | [Test]
method PaddingVerticalShorthandWorksCorrectly (line 90) | [Test]
method PaddingHorizontalShorthandWorksCorrectly (line 104) | [Test]
method PaddingAllShorthandWorksCorrectly (line 118) | [Test]
method PaddingLeftAppliesUnitConversion (line 136) | [Test]
method PaddingTopAppliesUnitConversion (line 147) | [Test]
method PaddingRightAppliesUnitConversion (line 158) | [Test]
method PaddingBottomAppliesUnitConversion (line 169) | [Test]
method PaddingVerticalAppliesUnitConversion (line 180) | [Test]
method PaddingHorizontalAppliesUnitConversion (line 192) | [Test]
method PaddingAllAppliesUnitConversion (line 204) | [Test]
method PaddingAppliesCorrectValues (line 220) | [Test]
FILE: Source/QuestPDF.UnitTests/PageBreakTests.cs
class PageBreakTests (line 9) | [TestFixture]
method Measure (line 12) | [Test]
FILE: Source/QuestPDF.UnitTests/RotateTests.cs
class RotateTests (line 8) | public class RotateTests
method RotateIsCumulative (line 10) | [Test]
method RotateCompanionHint (line 24) | [TestCase(0, ExpectedResult = "No rotation")]
FILE: Source/QuestPDF.UnitTests/RowTests.cs
class RowTests (line 12) | [TestFixture]
method NegativeSpacingThrowsException (line 17) | [TestCase(float.MinValue)]
method ValidSpacingIsCorrectlyApplied (line 35) | [TestCase(0)]
method SpacingSupportsUnitConversion (line 51) | [Test]
method RelativeItemCannotHaveSizeSmallerOrEqualToZero (line 69) | [TestCase(-10)]
method RelativeItemMustHaveSizeLargerThanZero (line 87) | [TestCase(float.Epsilon)]
method ConstantItemCannotHaveSizeSmallerThanZero (line 111) | [TestCase(-10)]
method ConstantItemMustHaveSizeLargerOrEqualToZero (line 128) | [TestCase(0)]
method ConstantItemSupportsUnitConversion (line 147) | [Test]
method CompanionHints (line 167) | [Test]
method RowSupportsStatefulOperations (line 189) | [Test]
FILE: Source/QuestPDF.UnitTests/ScaleTests.cs
class ScaleTests (line 11) | [TestFixture]
method CompanionHint (line 14) | [TestCase(2, 2, ExpectedResult = "A=2")]
method HorizontalScaleIsCumulative (line 32) | [Test]
method VerticalScaleIsCumulative (line 44) | [Test]
method ScaleIsCumulative (line 56) | [Test]
method FlipHorizontalAppliesCorrectScale (line 72) | [Test]
method FlipVerticalAppliesCorrectScale (line 84) | [Test]
method FlipOverAppliesCorrectScale (line 96) | [Test]
method ScaleCannotBeZero (line 112) | [Test]
method VerticalScaleCannotBeZero (line 123) | [Test]
method HorizontalScaleCannotBeZero (line 134) | [Test]
FILE: Source/QuestPDF.UnitTests/ShowEntireTests.cs
class ShowEntireTests (line 9) | [TestFixture]
method Measure_ReturnsWrap_WhenElementReturnsWrap (line 12) | [Test]
method Measure_ReturnsWrap_WhenElementReturnsPartialRender (line 25) | [Test]
method Measure_ReturnsFullRender_WhenElementReturnsFullRender (line 38) | [Test]
method Draw (line 51) | [Test]
FILE: Source/QuestPDF.UnitTests/ShowOnceTest.cs
class ShowOnceTest (line 9) | [TestFixture]
method Draw (line 12) | [Test]
FILE: Source/QuestPDF.UnitTests/SimpleRotateTests.cs
class SimpleRotateTests (line 8) | [TestFixture]
method RotateRightIsCumulative (line 13) | [Test]
method RotateLeftIsCumulative (line 28) | [Test]
method RotateRightAndLeftCanBeCombined (line 44) | [Test]
method NoRotationCompanionHint (line 65) | [Test]
method RotateRightCompanionHint (line 75) | [Test]
method DoubleRotateLeftCompanionHint (line 85) | [Test]
FILE: Source/QuestPDF.UnitTests/StyledBoxTests.cs
class StyledBoxTests (line 10) | public class StyledBoxTests
method BorderShorthandSetsCorrectValues (line 12) | [Test]
method BackgroundColorSetsCorrectValue (line 36) | [Test]
method BackgroundLinearGradientCannotBeEmpty (line 47) | [Test]
method BackgroundLinearGradientSetsCorrectValue (line 58) | [Test]
method BorderAllSetsCorrectValue (line 74) | [Test]
method BorderAllSupportsUnitConversion (line 88) | [Test]
method BorderVerticalSetsCorrectValue (line 102) | [Test]
method BorderVerticalSupportsUnitConversion (line 116) | [Test]
method BorderHorizontalSetsCorrectValue (line 130) | [Test]
method BorderHorizontalSupportsUnitConversion (line 144) | [Test]
method BorderLeftSetsCorrectValue (line 158) | [Test]
method BorderLeftSupportsUnitConversion (line 172) | [Test]
method BorderLeftCannotBeNegative (line 186) | [TestCase(-5)]
method BorderRightSetsCorrectValue (line 198) | [Test]
method BorderRightSupportsUnitConversion (line 212) | [Test]
method BorderRightCannotBeNegative (line 226) | [TestCase(-5)]
method BorderTopSetsCorrectValue (line 238) | [Test]
method BorderTopSupportsUnitConversion (line 252) | [Test]
method BorderTopCannotBeNegative (line 266) | [TestCase(-5)]
method BorderBottomSetsCorrectValue (line 278) | [Test]
method BorderBottomSupportsUnitConversion (line 292) | [Test]
method BorderBottomCannotBeNegative (line 306) | [TestCase(-5)]
method ZeroBorderIsSupported (line 318) | [Test]
method BorderValuesAreOverridingEachOther (line 336) | [Test]
method BorderSetsColorToBlack (line 354) | [Test]
method CornerRadiusAllSetsCorrectValue (line 369) | [Test]
method CornerRadiusAllSupportsUnitConversion (line 383) | [Test]
method CornerRadiusAllCannotBeNegative (line 397) | [TestCase(-5)]
method CornerRadiusTopLeftSetsCorrectValue (line 409) | [Test]
method CornerRadiusTopLeftSupportsUnitConversion (line 423) | [Test]
method CornerRadiusTopLeftCannotBeNegative (line 437) | [TestCase(-5)]
method CornerRadiusTopRightSetsCorrectValue (line 449) | [Test]
method CornerRadiusTopRightSupportsUnitConversion (line 463) | [Test]
method CornerRadiusTopRightCannotBeNegative (line 477) | [TestCase(-5)]
method CornerRadiusBottomLeftSetsCorrectValue (line 489) | [Test]
method CornerRadiusBottomLeftSupportsUnitConversion (line 503) | [Test]
method CornerRadiusBottomLeftCannotBeNegative (line 517) | [TestCase(-5)]
method CornerRadiusBottomRightSetsCorrectValue (line 529) | [Test]
method CornerRadiusBottomRightSupportsUnitConversion (line 543) | [Test]
method CornerRadiusBottomRightCannotBeNegative (line 557) | [TestCase(-5)]
method CornerRadiusValuesAreOverridingEachOther (line 569) | [Test]
method BorderColorSetsCorrectValue (line 593) | [Test]
method BorderLinearGradientCannotBeEmpty (line 604) | [Test]
method BorderLinearGradientSetsCorrectValue (line 615) | [Test]
method BorderAlignmentIsMiddleWhenNoRoundedCorners (line 631) | [Test]
method BorderAlignmentIsInsideWhenHasRoundedCorners (line 642) | [Test]
method BorderAlignmentInsideSetsCorrectValue (line 653) | [Test]
method BorderAlignmentMiddleSetsCorrectValue (line 663) | [Test]
method BorderAlignmentOutsideSetsCorrectValue (line 673) | [Test]
method ShadowStyleSetsCorrectValue (line 687) | [Test]
method ShadowStyleCannotBeNull (line 711) | [Test]
method ShadowBlurCannotBeNegative (line 722) | [TestCase(-10)]
FILE: Source/QuestPDF.UnitTests/TestEngine/ElementMock.cs
class ElementMock (line 7) | internal sealed class ElementMock : Element
method Measure (line 13) | internal override SpacePlan Measure(Size availableSpace) => MeasureFun...
method Draw (line 14) | internal override void Draw(Size availableSpace) => DrawFunc(available...
FILE: Source/QuestPDF.UnitTests/TestEngine/MockCanvas.cs
class MockCanvas (line 10) | internal sealed class MockCanvas : IDrawingCanvas
method GetSnapshot (line 18) | public DocumentPageSnapshot GetSnapshot() => throw new NotImplementedE...
method DrawSnapshot (line 19) | public void DrawSnapshot(DocumentPageSnapshot snapshot) => throw new N...
method Save (line 21) | public void Save() => throw new NotImplementedException();
method Restore (line 22) | public void Restore() => throw new NotImplementedException();
method SetZIndex (line 24) | public void SetZIndex(int index) => throw new NotImplementedException();
method GetZIndex (line 25) | public int GetZIndex() => throw new NotImplementedException();
method GetCurrentMatrix (line 27) | public SkCanvasMatrix GetCurrentMatrix() => throw new NotImplementedEx...
method SetMatrix (line 28) | public void SetMatrix(SkCanvasMatrix matrix) => throw new NotImplement...
method Translate (line 30) | public void Translate(Position vector) => TranslateFunc(vector);
method Scale (line 31) | public void Scale(float scaleX, float scaleY) => ScaleFunc(scaleX, sca...
method Rotate (line 32) | public void Rotate(float angle) => RotateFunc(angle);
method DrawLine (line 34) | public void DrawLine(Position start, Position end, SkPaint paint) => t...
method DrawRectangle (line 35) | public void DrawRectangle(Position vector, Size size, SkPaint paint) =...
method DrawComplexBorder (line 36) | public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect o...
method DrawShadow (line 37) | public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow) =...
method DrawParagraph (line 38) | public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lin...
method DrawImage (line 39) | public void DrawImage(SkImage image, Size size) => DrawImageFunc(image...
method DrawPicture (line 40) | public void DrawPicture(SkPicture picture) => throw new NotImplemented...
method DrawSvgPath (line 41) | public void DrawSvgPath(string path, Color color) => throw new NotImpl...
method DrawSvg (line 42) | public void DrawSvg(SkSvgImage svgImage, Size size) => throw new NotIm...
method DrawOverflowArea (line 44) | public void DrawOverflowArea(SkRect area) => throw new NotImplementedE...
method ClipOverflowArea (line 45) | public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpa...
method ClipRectangle (line 46) | public void ClipRectangle(SkRect clipArea) => throw new NotImplemented...
method ClipRoundedRectangle (line 47) | public void ClipRoundedRectangle(SkRoundedRect clipArea) => throw new ...
method DrawHyperlink (line 49) | public void DrawHyperlink(Size size, string url, string? description) ...
method DrawSectionLink (line 50) | public void DrawSectionLink(Size size, string sectionName, string? des...
method DrawSection (line 51) | public void DrawSection(string sectionName) => throw new NotImplemente...
method GetSemanticNodeId (line 53) | public int GetSemanticNodeId() => throw new NotImplementedException();
method SetSemanticNodeId (line 54) | public void SetSemanticNodeId(int nodeId) => throw new NotImplementedE...
FILE: Source/QuestPDF.UnitTests/TestEngine/OperationBase.cs
class OperationBase (line 3) | public abstract class OperationBase
FILE: Source/QuestPDF.UnitTests/TestEngine/OperationRecordingCanvas.cs
class OperationRecordingCanvas (line 11) | internal sealed class OperationRecordingCanvas : IDrawingCanvas
method GetSnapshot (line 15) | public DocumentPageSnapshot GetSnapshot() => throw new NotImplementedE...
method DrawSnapshot (line 16) | public void DrawSnapshot(DocumentPageSnapshot snapshot) => throw new N...
method Save (line 18) | public void Save() => throw new NotImplementedException();
method Restore (line 19) | public void Restore() => throw new NotImplementedException();
method SetZIndex (line 21) | public void SetZIndex(int index) => throw new NotImplementedException();
method GetZIndex (line 22) | public int GetZIndex() => throw new NotImplementedException();
method GetCurrentMatrix (line 24) | public SkCanvasMatrix GetCurrentMatrix() => throw new NotImplementedEx...
method SetMatrix (line 25) | public void SetMatrix(SkCanvasMatrix matrix) => throw new NotImplement...
method Translate (line 27) | public void Translate(Position vector) => Operations.Add(new CanvasTra...
method Scale (line 28) | public void Scale(float scaleX, float scaleY) => Operations.Add(new Ca...
method Rotate (line 29) | public void Rotate(float angle) => Operations.Add(new CanvasRotateOper...
method DrawLine (line 31) | public void DrawLine(Position start, Position end, SkPaint paint) => t...
method DrawRectangle (line 32) | public void DrawRectangle(Position vector, Size size, SkPaint paint) =...
method DrawComplexBorder (line 33) | public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect o...
method DrawShadow (line 34) | public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow) =...
method DrawParagraph (line 35) | public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lin...
method DrawImage (line 36) | public void DrawImage(SkImage image, Size size) => Operations.Add(new ...
method DrawPicture (line 37) | public void DrawPicture(SkPicture picture) => throw new NotImplemented...
method DrawSvgPath (line 38) | public void DrawSvgPath(string path, Color color) => throw new NotImpl...
method DrawSvg (line 39) | public void DrawSvg(SkSvgImage svgImage, Size size) => throw new NotIm...
method DrawOverflowArea (line 41) | public void DrawOverflowArea(SkRect area) => throw new NotImplementedE...
method ClipOverflowArea (line 42) | public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpa...
method ClipRectangle (line 43) | public void ClipRectangle(SkRect clipArea) => throw new NotImplemented...
method ClipRoundedRectangle (line 44) | public void ClipRoundedRectangle(SkRoundedRect clipArea) => throw new ...
method DrawHyperlink (line 46) | public void DrawHyperlink(Size size, string url, string? description) ...
method DrawSectionLink (line 47) | public void DrawSectionLink(Size size, string sectionName, string? des...
method DrawSection (line 48) | public void DrawSection(string sectionName) => throw new NotImplemente...
method GetSemanticNodeId (line 50) | public int GetSemanticNodeId() => throw new NotImplementedException();
method SetSemanticNodeId (line 51) | public void SetSemanticNodeId(int nodeId) => throw new NotImplementedE...
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/CanvasDrawImageOperation.cs
class CanvasDrawImageOperation (line 5) | internal sealed class CanvasDrawImageOperation : OperationBase
method CanvasDrawImageOperation (line 10) | public CanvasDrawImageOperation(Position position, Size size)
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/CanvasDrawRectangleOperation.cs
class CanvasDrawRectangleOperation (line 5) | internal sealed class CanvasDrawRectangleOperation : OperationBase
method CanvasDrawRectangleOperation (line 11) | public CanvasDrawRectangleOperation(Position position, Size size, Colo...
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/CanvasDrawTextOperation.cs
class CanvasDrawTextOperation (line 5) | internal sealed class CanvasDrawTextOperation : OperationBase
method CanvasDrawTextOperation (line 11) | public CanvasDrawTextOperation(string text, Position position, TextSty...
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/CanvasRotateOperation.cs
class CanvasRotateOperation (line 3) | public class CanvasRotateOperation : OperationBase
method CanvasRotateOperation (line 7) | public CanvasRotateOperation(float angle)
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/CanvasScaleOperation.cs
class CanvasScaleOperation (line 3) | public class CanvasScaleOperation : OperationBase
method CanvasScaleOperation (line 8) | public CanvasScaleOperation(float scaleX, float scaleY)
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/CanvasTranslateOperation.cs
class CanvasTranslateOperation (line 5) | internal sealed class CanvasTranslateOperation : OperationBase
method CanvasTranslateOperation (line 9) | public CanvasTranslateOperation(Position position)
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/ChildDrawOperation.cs
class ChildDrawOperation (line 5) | public class ChildDrawOperation : OperationBase
method ChildDrawOperation (line 10) | public ChildDrawOperation(string childId, Size input)
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/ChildMeasureOperation.cs
class ChildMeasureOperation (line 6) | internal sealed class ChildMeasureOperation : OperationBase
method ChildMeasureOperation (line 12) | public ChildMeasureOperation(string childId, Size input, SpacePlan out...
FILE: Source/QuestPDF.UnitTests/TestEngine/Operations/ElementMeasureOperation.cs
class ElementMeasureOperation (line 5) | public class ElementMeasureOperation : OperationBase
method ElementMeasureOperation (line 7) | public ElementMeasureOperation(Size input)
FILE: Source/QuestPDF.UnitTests/TestEngine/SimpleContainerTests.cs
class SimpleContainerTests (line 6) | internal static class SimpleContainerTests
method Measure (line 10) | public static void Measure<TElement>() where TElement : Element, ICont...
method Measure_Wrap (line 17) | private static void Measure_Wrap<TElement>() where TElement : Element,...
method Measure_PartialRender (line 29) | private static void Measure_PartialRender<TElement>() where TElement :...
method Measure_FullRender (line 41) | private static void Measure_FullRender<TElement>() where TElement : El...
method Draw (line 55) | public static void Draw<TElement>() where TElement : Element, IContain...
FILE: Source/QuestPDF.UnitTests/TestEngine/TestPlan.cs
class TestPlan (line 15) | internal sealed class TestPlan
method TestPlan (line 27) | public TestPlan()
method For (line 32) | public static TestPlan For(Func<TestPlan, Element> create)
method GetExpected (line 40) | private T GetExpected<T>() where T : OperationBase
method CreateCanvas (line 50) | private IDrawingCanvas CreateCanvas()
method CreateChild (line 99) | public Element CreateChild() => CreateChild(DefaultChildName);
method CreateChild (line 101) | public Element CreateChild(string id)
method MeasureElement (line 129) | public TestPlan MeasureElement(Size input)
method DrawElement (line 135) | public TestPlan DrawElement(Size input)
method AddOperation (line 141) | private TestPlan AddOperation(OperationBase operationBase)
method ExpectChildMeasure (line 147) | public TestPlan ExpectChildMeasure(Size expectedInput, SpacePlan returns)
method ExpectChildMeasure (line 152) | public TestPlan ExpectChildMeasure(string child, Size expectedInput, S...
method ExpectChildDraw (line 157) | public TestPlan ExpectChildDraw(Size expectedInput)
method ExpectChildDraw (line 162) | public TestPlan ExpectChildDraw(string child, Size expectedInput)
method ExpectCanvasTranslate (line 167) | public TestPlan ExpectCanvasTranslate(Position position)
method ExpectCanvasTranslate (line 172) | public TestPlan ExpectCanvasTranslate(float left, float top)
method ExpectCanvasScale (line 177) | public TestPlan ExpectCanvasScale(float scaleX, float scaleY)
method ExpectCanvasRotate (line 182) | public TestPlan ExpectCanvasRotate(float angle)
method ExpectCanvasDrawRectangle (line 187) | public TestPlan ExpectCanvasDrawRectangle(Position position, Size size...
method ExpectCanvasDrawImage (line 192) | public TestPlan ExpectCanvasDrawImage(Position position, Size size)
method CheckMeasureResult (line 197) | public TestPlan CheckMeasureResult(SpacePlan expected)
method CheckDrawResult (line 214) | public TestPlan CheckDrawResult()
method CheckState (line 222) | public TestPlan CheckState(Func<Element, bool> condition)
method CheckState (line 228) | public TestPlan CheckState<T>(Func<T, bool> condition) where T : Element
method CreateUniqueElement (line 235) | public static Element CreateUniqueElement()
FILE: Source/QuestPDF.UnitTests/TextSpanTests.cs
class TextSpanTests (line 13) | public class TextSpanTests
method CreateTextBlockSpan (line 15) | internal (TextSpanDescriptor, TextBlockSpan) CreateTextBlockSpan()
method OverridesStyle (line 28) | [Test]
method OverridesStyle_AcceptsNull (line 57) | [Test]
method SetsCorrectFontColor (line 79) | [Test]
method FontColor_AlsoSetsDecorationColor (line 87) | [Test]
method SetsCorrectBackgroundColor (line 99) | [Test]
method SetsCorrectFontFamily_Single (line 111) | [Test]
method SetsCorrectFontFamily_Multiple (line 119) | [Test]
method FontFamily_EmptyArray_ReturnsUnchanged (line 127) | [Test]
method FontFamily_Null_ReturnsUnchanged (line 135) | [Test]
method SetsCorrectFontSize (line 148) | [Test]
method FontSize_MustBePositive (line 156) | [TestCase(-10)]
method SetsCorrectLineHeight (line 175) | [Test]
method LineHeight_Null_SetsToNormalLineHeight (line 183) | [Test]
method LineHeightMustBePositive (line 191) | [TestCase(-5)]
method LineHeight_AllowsZero (line 204) | [Test]
method SetsCorrectLetterSpacing_Positive (line 216) | [Test]
method SetsCorrectLetterSpacing_Negative (line 224) | [Test]
method LetterSpacing_DefaultParameterIsZero (line 232) | [Test]
method SetsCorrectWordSpacing_Positive (line 244) | [Test]
method SetsCorrectWordSpacing_Negative (line 252) | [Test]
method WordSpacing_DefaultParameterIsZero (line 260) | [Test]
method SetsCorrectItalic_Enabled (line 272) | [Test]
method SetsCorrectItalic_Disabled (line 280) | [Test]
method SetsCorrectTextDecoration_Strikethrough (line 292) | [Test]
method SetsCorrectTextDecoration_StrikethroughDisabled (line 300) | [Test]
method SetsCorrectTextDecoration_Underline (line 308) | [Test]
method SetsCorrectTextDecoration_UnderlineDisabled (line 316) | [Test]
method SetsCorrectTextDecoration_Overline (line 324) | [Test]
method SetsCorrectTextDecoration_OverlineDisabled (line 332) | [Test]
method SetsCorrectTextDecoration_DecorationColor (line 340) | [Test]
method SetsCorrectTextDecoration_DecorationThickness (line 348) | [Test]
method SetsCorrectTextDecoration_DecorationSolid (line 356) | [Test]
method SetsCorrectTextDecoration_DecorationDouble (line 364) | [Test]
method SetsCorrectTextDecoration_DecorationWavy (line 372) | [Test]
method SetsCorrectTextDecoration_DecorationDotted (line 380) | [Test]
method SetsCorrectTextDecoration_DecorationDashed (line 388) | [Test]
method SetsCorrectSetsCorrectFontWeight_Thin (line 400) | [Test]
method SetsCorrectFontWeight_ExtraLight (line 408) | [Test]
method SetsCorrectFontWeight_Light (line 416) | [Test]
method SetsCorrectFontWeight_Normal (line 424) | [Test]
method SetsCorrectFontWeight_Medium (line 432) | [Test]
method SetsCorrectFontWeight_SemiBold (line 440) | [Test]
method SetsCorrectFontWeight_Bold (line 448) | [Test]
method SetsCorrectFontWeight_ExtraBold (line 456) | [Test]
method SetsCorrectFontWeight_Black (line 464) | [Test]
method SetsCorrectFontWeight_ExtraBlack (line 472) | [Test]
method SetsCorrectTextPosition_Subscript (line 484) | [Test]
method SetsCorrectTextPosition_Normal (line 492) | [Test]
method SetsCorrectTextPosition_Superscript (line 500) | [Test]
method SetsCorrectTextDirection_LeftToRight (line 512) | [Test]
method SetsCorrectTextDirection_RightToLeft (line 520) | [Test]
method SetsCorrectTextDirection_Auto (line 528) | [Test]
method EnableFontFeature_SingleFeature (line 540) | [Test]
method DisableFontFeature_SingleFeature (line 550) | [Test]
method FontFeatures_MixedEnableDisable (line 560) | [Test]
FILE: Source/QuestPDF.UnitTests/TextStyleTests.cs
class TextStyleTests (line 11) | [TestFixture]
method FontColor_Default (line 16) | [Test]
method SetsCorrectFontColor (line 23) | [Test]
method FontColor_AlsoSetsDecorationColor (line 30) | [Test]
method BackgroundColor_Default (line 41) | [Test]
method SetsCorrectBackgroundColor (line 48) | [Test]
method FontFamily_Default (line 59) | [Test]
method SetsCorrectFontFamily_Single (line 66) | [Test]
method SetsCorrectFontFamily_Multiple (line 73) | [Test]
method FontFamily_EmptyArray_ReturnsUnchanged (line 80) | [Test]
method FontFamily_Null_ReturnsUnchanged (line 87) | [Test]
method FontSize_Default (line 98) | [Test]
method SetsCorrectFontSize (line 105) | [Test]
method FontSize_MustBePositive (line 112) | [TestCase(-10)]
method LineHeight_Default (line 130) | [Test]
method SetsCorrectLineHeight (line 139) | [Test]
method LineHeight_Null_SetsToNormalLineHeight (line 146) | [Test]
method LineHeightMustBePositive (line 153) | [TestCase(-5)]
method LineHeight_AllowsZero (line 165) | [Test]
method LetterSpacing_Default (line 176) | [Test]
method SetsCorrectLetterSpacing_Positive (line 183) | [Test]
method SetsCorrectLetterSpacing_Negative (line 190) | [Test]
method LetterSpacing_DefaultParameterIsZero (line 197) | [Test]
method WordSpacing_Default (line 208) | [Test]
method SetsCorrectWordSpacing_Positive (line 215) | [Test]
method SetsCorrectWordSpacing_Negative (line 222) | [Test]
method WordSpacing_DefaultParameterIsZero (line 229) | [Test]
method Italic_Default (line 240) | [Test]
method SetsCorrectItalic_Enabled (line 247) | [Test]
method SetsCorrectItalic_Disabled (line 254) | [Test]
method TextDecoration_Default (line 265) | [Test]
method SetsCorrectTextDecoration_Strikethrough (line 277) | [Test]
method SetsCorrectTextDecoration_StrikethroughDisabled (line 284) | [Test]
method SetsCorrectTextDecoration_Underline (line 291) | [Test]
method SetsCorrectTextDecoration_UnderlineDisabled (line 298) | [Test]
method SetsCorrectTextDecoration_Overline (line 305) | [Test]
method SetsCorrectTextDecoration_OverlineDisabled (line 312) | [Test]
method SetsCorrectTextDecoration_DecorationColor (line 319) | [Test]
method SetsCorrectTextDecoration_DecorationThickness (line 326) | [Test]
method SetsCorrectTextDecoration_DecorationSolid (line 333) | [Test]
method SetsCorrectTextDecoration_DecorationDouble (line 340) | [Test]
method SetsCorrectTextDecoration_DecorationWavy (line 347) | [Test]
method SetsCorrectTextDecoration_DecorationDotted (line 354) | [Test]
method SetsCorrectTextDecoration_DecorationDashed (line 361) | [Test]
method FontWeight_Default (line 372) | [Test]
method SetsCorrectSetsCorrectFontWeight_Thin (line 379) | [Test]
method SetsCorrectFontWeight_ExtraLight (line 386) | [Test]
method SetsCorrectFontWeight_Light (line 393) | [Test]
method SetsCorrectFontWeight_Normal (line 400) | [Test]
method SetsCorrectFontWeight_Medium (line 407) | [Test]
method SetsCorrectFontWeight_SemiBold (line 414) | [Test]
method SetsCorrectFontWeight_Bold (line 421) | [Test]
method SetsCorrectFontWeight_ExtraBold (line 428) | [Test]
method SetsCorrectFontWeight_Black (line 435) | [Test]
method SetsCorrectFontWeight_ExtraBlack (line 442) | [Test]
method TextPosition_Default (line 453) | [Test]
method SetsCorrectTextPosition_Subscript (line 460) | [Test]
method SetsCorrectTextPosition_Normal (line 467) | [Test]
method SetsCorrectTextPosition_Superscript (line 474) | [Test]
method TextDirection_Default (line 485) | [Test]
method SetsCorrectTextDirection_LeftToRight (line 492) | [Test]
method SetsCorrectTextDirection_RightToLeft (line 499) | [Test]
method SetsCorrectTextDirection_Auto (line 506) | [Test]
method FontFeatures_Default (line 517) | [Test]
method EnableFontFeature_SingleFeature (line 524) | [Test]
method DisableFontFeature_SingleFeature (line 534) | [Test]
method FontFeatures_MixedEnableDisable (line 546) | [Test]
method FontFeatures_OverrideSameFeature (line 560) | [Test]
method ApplyInheritedAndGlobalStyle (line 578) | [Test]
FILE: Source/QuestPDF.UnitTests/TranslateTests.cs
class TranslateTests (line 9) | [TestFixture]
method CompanionHint (line 12) | [TestCase(0, 0, "")]
method HorizontalTranslationIsCumulative (line 31) | [Test]
method VerticalTranslationIsCumulative (line 42) | [Test]
method HorizontalTranslationSupportsUnitConversion (line 53) | [Test]
method VerticalTranslationSupportsUnitConversion (line 64) | [Test]
FILE: Source/QuestPDF.UnitTests/UnconstrainedTests.cs
class UnconstrainedTests (line 9) | [TestFixture]
method Measure_Wrap (line 14) | [Test]
method Measure_PartialRender (line 27) | [Test]
method Measure_FullRender (line 40) | [Test]
method Draw_SkipWhenChildWraps (line 57) | [Test]
method Draw_WhenChildPartiallyRenders (line 70) | [Test]
method Draw_WhenChildFullyRenders (line 86) | [Test]
method Draw_WhenChildPartiallyRenders_RightToLeft (line 102) | [Test]
method Draw_WhenChildFullyRenders_RightToLeft (line 119) | [Test]
FILE: Source/QuestPDF.UnitTests/UnitConversionTests.cs
class UnitConversionTests (line 7) | [TestFixture]
method ToPoints_ConvertsCorrectly (line 10) | [TestCase(Unit.Point, 1f, 1f)]
FILE: Source/QuestPDF.VisualTests/LineTests.cs
class LineTests (line 7) | public class LineTests
method ThicknessHorizontal (line 9) | [Test]
method ThicknessVertical (line 26) | [Test]
method Color (line 45) | [Test]
method Gradient (line 65) | [Test]
method DashPattern (line 90) | [Test, TestCaseSource(nameof(DashPatternCases))]
method Complex (line 102) | [Test]
method LineShouldRenderOnlyOnce (line 117) | [Test]
method LineShouldRerenderWhenCombinedWithRepeat (line 137) | [Test]
FILE: Source/QuestPDF.VisualTests/RotateTests.cs
class RotateTests (line 6) | public class RotateTests
method Rotate (line 8) | [Test]
FILE: Source/QuestPDF.VisualTests/SimpleRotateTests.cs
class SimpleRotateTests (line 6) | public class SimpleRotateTests
method Rotate (line 8) | [Test]
FILE: Source/QuestPDF.VisualTests/StyledBoxTests.cs
class StyledBoxTests (line 7) | public class StyledBoxTests
method BackgroundColor (line 13) | [Test, TestCaseSource(nameof(BackgroundColorValues))]
method BackgroundGradientColors (line 32) | [Test, TestCaseSource(nameof(BackgroundGradientColorsValues))]
method BackgroundGradientAngle (line 44) | [Test]
method BackgroundUniformRoundedCorners (line 63) | [Test]
method BackgroundRoundedCorners (line 77) | [TestCase(0, 10, 20, 40)]
method BorderThicknessUniform (line 100) | [Test]
method BorderThickness (line 115) | [Test]
method BorderRoundedCornersUniform (line 136) | [Test]
method BorderRoundedCornersWithVariousCornerRadius (line 152) | [Test]
method BorderColor (line 176) | [Test, TestCaseSource(nameof(BorderColorCases))]
method BorderGradientColors (line 197) | [Test, TestCaseSource(nameof(BorderGradientColorsValues))]
method BorderGradientAngle (line 212) | [Test]
method BorderAlignmentTest (line 233) | private void BorderAlignmentTest(Func<IContainer, IContainer> configur...
method BorderAlignmentInside (line 248) | [Test]
method BorderAlignmentMiddle (line 254) | [Test]
method BorderAlignmentOutside (line 260) | [Test]
method ShadowColor (line 272) | [Test, TestCaseSource(nameof(ShadowColorValues))]
method ShadowBlur (line 289) | [Test]
method ShadowWithoutBlur (line 307) | [Test]
method ShadowSpread (line 330) | [Test]
method ShadowOffsetX (line 349) | [Test]
method ShadowOffsetY (line 368) | [Test]
method ClipImage (line 391) | [Test]
method ClipText (line 408) | [Test]
method ClipContent (line 421) | [Test]
FILE: Source/QuestPDF.VisualTests/TestsSetup.cs
class TestsSetup (line 6) | [SetUpFixture]
method Setup (line 9) | [OneTimeSetUp]
FILE: Source/QuestPDF.VisualTests/TextStyleTests.cs
class TextStyleTests (line 7) | public class TextStyleTests
method FontsColor (line 11) | [Test, TestCaseSource(nameof(FontColor_Values))]
method BackgroundColor (line 28) | [Test, TestCaseSource(nameof(BackgroundColor_Values))]
method FontSize (line 43) | [Test]
method LineHeight (line 58) | [Test]
method WordSpacing (line 73) | [Test]
method LetterSpacing (line 88) | [Test]
method Italic (line 103) | [Test]
method FontDecoration_Underline (line 120) | [Test]
method FontDecoration_Strikethrough (line 135) | [Test]
method FontDecoration_Overline (line 150) | [Test]
method FontDecoration_Combined (line 165) | [Test]
method FontDecoration_Color (line 189) | [Test, TestCaseSource(nameof(FontDecoration_Color_Values))]
method FontDecoration_Thickness (line 204) | [Test]
method FontDecoration_Solid (line 219) | [Test]
method FontDecoration_Double (line 234) | [Test]
method FontDecoration_Wavy (line 249) | [Test]
method FontDecoration_Dotted (line 264) | [Test]
method FontDecoration_Dashed (line 279) | [Test]
method FontWeight_200_ExtraLight (line 298) | [Test]
method FontWeight_300_Light (line 313) | [Test]
method FontWeight_400_Regular (line 328) | [Test]
method FontWeight_500_Medium (line 343) | [Test]
method FontWeight_600_SemiBold (line 358) | [Test]
method FontWeight_700_Bold (line 373) | [Test]
method FontWeight_800_ExtraBold (line 388) | [Test]
method FontPosition_Subscript (line 407) | [Test]
method FontPosition_Superscript (line 424) | [Test]
method FontFeatures_StandardLigatures_Enabled (line 442) | [Test]
method FontFeatures_StandardLigatures_Disabled (line 453) | [Test]
FILE: Source/QuestPDF.VisualTests/VisualTestEngine.cs
class Helpers (line 10) | public static class Helpers
method Apply (line 12) | public static TOutput Apply<TInput, TOutput>(this TInput input, Func<T...
class ImageComparer (line 18) | public static class ImageComparer
method AreImagesIdentical (line 20) | public static bool AreImagesIdentical(SKBitmap bitmap1, SKBitmap bitmap2)
method AreImagesIdentical (line 72) | public static bool AreImagesIdentical(byte[] imageData1, byte[] imageD...
class VisualTestEngine (line 81) | public static class VisualTestEngine
method ClearActualOutputDirectories (line 88) | public static void ClearActualOutputDirectories()
method ShouldMatchExpectedImage (line 94) | public static void ShouldMatchExpectedImage(this IDocument document)
class VisualTest (line 158) | public static class VisualTest
method Perform (line 160) | public static void Perform(Action<IDocumentContainer> documentBuilder)
method PerformWithDefaultPageSettings (line 169) | public static void PerformWithDefaultPageSettings(Action<IContainer> c...
method SetUpCultureInfoToInvariant (line 191) | private static void SetUpCultureInfoToInvariant()
FILE: Source/QuestPDF.ZUGFeRD/GenerationTest.cs
class Tests (line 6) | public class Tests
method ZUGFeRD_Test (line 8) | [Test]
FILE: Source/QuestPDF/Companion/CompanionExtensions.cs
class CompanionExtensions (line 10) | public static class CompanionExtensions
method CompanionExtensions (line 12) | static CompanionExtensions()
method ShowInCompanion (line 20) | public static void ShowInCompanion(this IDocument document, int port =...
method ShowInCompanionAsync (line 26) | public static async Task ShowInCompanionAsync(this IDocument document,...
method ShowInCompanion (line 79) | public static void ShowInCompanion(this IDocument document, int port =...
method ShowInCompanionAsync (line 85) | public static async Task ShowInCompanionAsync(this IDocument document,...
FILE: Source/QuestPDF/Companion/CompanionModels.cs
class PageSnapshotIndex (line 8) | sealed class PageSnapshotIndex
method ToString (line 13) | public override string ToString() => $"{ZoomLevel}/{PageIndex}";
class CompanionCommands (line 16) | static internal class CompanionCommands
class Notify (line 18) | internal sealed class Notify
class UpdateDocumentStructure (line 26) | internal sealed class UpdateDocumentStructure
class PageSize (line 32) | public sealed class PageSize
type DocumentHierarchyElement (line 38) | internal sealed record DocumentHierarchyElement
class PageLocation (line 53) | internal sealed class PageLocation
class LayoutErrorMeasurement (line 62) | internal sealed class LayoutErrorMeasurement
class SourceCodePath (line 72) | internal sealed class SourceCodePath
class ProvideRenderedDocumentPage (line 79) | internal sealed class ProvideRenderedDocumentPage
class RenderedPage (line 83) | internal sealed class RenderedPage
class ShowGenericException (line 91) | internal sealed class ShowGenericException
class GenericExceptionDetails (line 95) | internal sealed class GenericExceptionDetails
class StackFrame (line 103) | internal sealed class StackFrame
class ElementSize (line 111) | internal sealed class ElementSize
class ElementProperty (line 117) | internal sealed class ElementProperty
class GetVersionCommandResponse (line 123) | internal sealed class GetVersionCommandResponse
FILE: Source/QuestPDF/Companion/CompanionService.cs
class CompanionService (line 18) | internal sealed class CompanionService
method CompanionService (line 39) | public CompanionService(int port)
method Connect (line 51) | public async Task Connect()
method CheckIfCompanionIsRunning (line 58) | private async Task CheckIfCompanionIsRunning()
method StartNotifyPresenceTask (line 71) | internal async Task StartNotifyPresenceTask()
method CheckCompanionVersionCompatibility (line 88) | private async Task CheckCompanionVersionCompatibility()
method RefreshPreview (line 99) | public async Task RefreshPreview(CompanionDocumentSnapshot companionDo...
method StartRenderRequestedPageSnapshotsTask (line 129) | public void StartRenderRequestedPageSnapshotsTask(CancellationToken ca...
method RenderRequestedPageSnapshots (line 147) | private async Task RenderRequestedPageSnapshots()
method InformAboutGenericException (line 187) | internal async Task InformAboutGenericException(Exception exception)
FILE: Source/QuestPDF/Companion/Helpers.cs
class CompanionModelHelpers (line 12) | internal static class CompanionModelHelpers
method ExtractHierarchy (line 14) | internal static CompanionCommands.UpdateDocumentStructure.DocumentHier...
method GetSourceCodePath (line 75) | private static CompanionCommands.UpdateDocumentStructure.SourceCodePat...
method ParseStackTrace (line 89) | internal static CompanionCommands.ShowGenericException.StackFrame[] Pa...
method ImproveHierarchyStructure (line 123) | internal static CompanionCommands.UpdateDocumentStructure.DocumentHier...
FILE: Source/QuestPDF/Companion/HotReloadManager.cs
class HotReloadManager (line 13) | internal static class HotReloadManager
method UpdateApplication (line 17) | public static void UpdateApplication(Type[]? _)
FILE: Source/QuestPDF/Companion/Previewer.cs
class PreviewerExtensions (line 11) | public static class PreviewerExtensions
method ShowInPreviewer (line 17) | [Obsolete(ObsoleteMessage)]
method ShowInPreviewerAsync (line 24) | [Obsolete(ObsoleteMessage)]
method ShowInPreviewer (line 33) | [Obsolete(ObsoleteMessage)]
method ShowInPreviewerAsync (line 40) | [Obsolete(ObsoleteMessage)]
FILE: Source/QuestPDF/Drawing/DocumentCanvases/CompanionDocumentCanvas.cs
class CompanionPageSnapshot (line 12) | internal sealed class CompanionPageSnapshot
method CompanionPageSnapshot (line 17) | public CompanionPageSnapshot(SkPicture picture, Size size)
method RenderImage (line 23) | public byte[] RenderImage(int zoomLevel)
class CompanionDocumentSnapshot (line 48) | internal sealed class CompanionDocumentSnapshot
class CompanionDocumentCanvas (line 54) | internal sealed class CompanionDocumentCanvas : IDocumentCanvas, IDispos...
method GetContent (line 63) | public CompanionDocumentSnapshot GetContent()
method Dispose (line 80) | public void Dispose()
method SetSemanticTree (line 90) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 95) | public void BeginDocument()
method EndDocument (line 100) | public void EndDocument()
method BeginPage (line 105) | public void BeginPage(Size size)
method EndPage (line 113) | public void EndPage()
method GetDrawingCanvas (line 129) | public IDrawingCanvas GetDrawingCanvas()
FILE: Source/QuestPDF/Drawing/DocumentCanvases/DiscardDocumentCanvas.cs
class DiscardDocumentCanvas (line 6) | internal sealed class DiscardDocumentCanvas : IDocumentCanvas
method SetSemanticTree (line 10) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 15) | public void BeginDocument()
method EndDocument (line 20) | public void EndDocument()
method BeginPage (line 25) | public void BeginPage(Size size)
method EndPage (line 30) | public void EndPage()
method GetDrawingCanvas (line 35) | public IDrawingCanvas GetDrawingCanvas()
FILE: Source/QuestPDF/Drawing/DocumentCanvases/ImageDocumentCanvas.cs
class ImageDocumentCanvas (line 11) | internal sealed class ImageDocumentCanvas : IDocumentCanvas, IDisposable
method ImageDocumentCanvas (line 21) | public ImageDocumentCanvas(ImageGenerationSettings settings)
method Dispose (line 34) | public void Dispose()
method SetSemanticTree (line 47) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 52) | public void BeginDocument()
method EndDocument (line 57) | public void EndDocument()
method BeginPage (line 63) | public void BeginPage(Size size)
method EndPage (line 84) | public void EndPage()
method GetDrawingCanvas (line 113) | public IDrawingCanvas GetDrawingCanvas()
FILE: Source/QuestPDF/Drawing/DocumentCanvases/PdfDocumentCanvas.cs
class PdfDocumentCanvas (line 11) | internal sealed class PdfDocumentCanvas : IDocumentCanvas, IDisposable
method PdfDocumentCanvas (line 22) | public PdfDocumentCanvas(SkWriteStream stream, DocumentMetadata docume...
method CreatePdf (line 29) | private SkDocument CreatePdf()
method GetPDFAConformanceLevel (line 73) | static Skia.PDFA_Conformance GetPDFAConformanceLevel(Infrastructure.PD...
method GetPDFUAConformanceLevel (line 90) | static Skia.PDFUA_Conformance GetPDFUAConformanceLevel(Infrastructure....
method Dispose (line 108) | public void Dispose()
method SetSemanticTree (line 124) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 148) | public void BeginDocument()
method EndDocument (line 153) | public void EndDocument()
method BeginPage (line 159) | public void BeginPage(Size size)
method EndPage (line 167) | public void EndPage()
method GetDrawingCanvas (line 181) | public IDrawingCanvas GetDrawingCanvas()
FILE: Source/QuestPDF/Drawing/DocumentCanvases/SemanticDocumentCanvas.cs
class SemanticDocumentCanvas (line 6) | internal sealed class SemanticDocumentCanvas : IDocumentCanvas
method SetSemanticTree (line 10) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 15) | public void BeginDocument()
method EndDocument (line 20) | public void EndDocument()
method BeginPage (line 25) | public void BeginPage(Size size)
method EndPage (line 30) | public void EndPage()
method GetDrawingCanvas (line 35) | public IDrawingCanvas GetDrawingCanvas()
FILE: Source/QuestPDF/Drawing/DocumentCanvases/SvgDocumentCanvas.cs
class SvgDocumentCanvas (line 12) | internal sealed class SvgDocumentCanvas : IDocumentCanvas, IDisposable
method Dispose (line 29) | public void Dispose()
method SetSemanticTree (line 43) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 48) | public void BeginDocument()
method EndDocument (line 53) | public void EndDocument()
method BeginPage (line 60) | public void BeginPage(Size size)
method EndPage (line 73) | public void EndPage()
method GetDrawingCanvas (line 94) | public IDrawingCanvas GetDrawingCanvas()
FILE: Source/QuestPDF/Drawing/DocumentCanvases/XpsDocumentCanvas.cs
class XpsDocumentCanvas (line 10) | internal sealed class XpsDocumentCanvas : IDocumentCanvas, IDisposable
method XpsDocumentCanvas (line 16) | public XpsDocumentCanvas(SkWriteStream stream, DocumentSettings docume...
method CreateXps (line 21) | private static SkDocument CreateXps(SkWriteStream stream, DocumentSett...
method Dispose (line 41) | public void Dispose()
method SetSemanticTree (line 54) | public void SetSemanticTree(SemanticTreeNode? semanticTree)
method BeginDocument (line 59) | public void BeginDocument()
method EndDocument (line 64) | public void EndDocument()
method BeginPage (line 70) | public void BeginPage(Size size)
method EndPage (line 78) | public void EndPage()
method GetDrawingCanvas (line 92) | public IDrawingCanvas GetDrawingCanvas()
FILE: Source/QuestPDF/Drawing/DocumentContainer.cs
class DocumentContainer (line 10) | internal sealed class DocumentContainer : IDocumentContainer
method Compose (line 14) | internal Container Compose()
FILE: Source/QuestPDF/Drawing/DocumentGenerator.cs
class DocumentGenerator (line 19) | static class DocumentGenerator
method DocumentGenerator (line 21) | static DocumentGenerator()
method GeneratePdf (line 26) | internal static void GeneratePdf(SkWriteStream stream, IDocument docum...
method GenerateXps (line 40) | internal static void GenerateXps(SkWriteStream stream, IDocument docum...
method GenerateImages (line 49) | internal static ICollection<byte[]> GenerateImages(IDocument document,...
method GenerateSvg (line 62) | internal static ICollection<string> GenerateSvg(IDocument document)
method GenerateCompanionContent (line 72) | internal static CompanionDocumentSnapshot GenerateCompanionContent(IDo...
method RenderDocument (line 79) | internal static void RenderDocument(IDocumentCanvas canvas, IDocument ...
method RenderMergedDocument (line 115) | private static void RenderMergedDocument(IDocumentCanvas canvas, Merge...
method CreateSemanticTreeManager (line 165) | private static SemanticTreeManager? CreateSemanticTreeManager(Document...
method ConfigureWithSemanticTree (line 182) | private static void ConfigureWithSemanticTree(this IDocumentCanvas can...
method ConfigureContent (line 192) | private static Container ConfigureContent(IDocument document, Document...
method RenderPass (line 215) | private static void RenderPass(PageContext pageContext, IDocumentCanva...
method InjectSemanticTreeManager (line 339) | internal static void InjectSemanticTreeManager(this Element content, S...
method InjectDependencies (line 357) | internal static void InjectDependencies(this Element content, IPageCon...
method ApplyCaching (line 369) | internal static void ApplyCaching(this Element? content)
method ApplyContentDirection (line 434) | internal static void ApplyContentDirection(this Element? content, Cont...
method ApplyDefaultImageConfiguration (line 452) | internal static void ApplyDefaultImageConfiguration(this Element? cont...
method ApplyInheritedAndGlobalTexStyle (line 494) | internal static void ApplyInheritedAndGlobalTexStyle(this Element? con...
method ApplySemanticParagraphs (line 535) | internal static void ApplySemanticParagraphs(this Element root)
FILE: Source/QuestPDF/Drawing/DocumentPageSnapshot.cs
class DocumentPageSnapshot (line 8) | internal class DocumentPageSnapshot : IDisposable
method Dispose (line 18) | public void Dispose()
class LayerSnapshot (line 27) | public class LayerSnapshot
method DrawOnSkCanvas (line 33) | public void DrawOnSkCanvas(SkCanvas canvas)
FILE: Source/QuestPDF/Drawing/DrawingCanvases/DiscardDrawingCanvas.cs
class DiscardDrawingCanvas (line 10) | internal sealed class DiscardDrawingCanvas : IDrawingCanvas
method GetSnapshot (line 16) | public DocumentPageSnapshot GetSnapshot()
method DrawSnapshot (line 21) | public void DrawSnapshot(DocumentPageSnapshot snapshot)
method Save (line 26) | public void Save()
method Restore (line 31) | public void Restore()
method SetZIndex (line 36) | public void SetZIndex(int index)
method GetZIndex (line 41) | public int GetZIndex()
method GetCurrentMatrix (line 46) | public SkCanvasMatrix GetCurrentMatrix()
method SetMatrix (line 51) | public void SetMatrix(SkCanvasMatrix matrix)
method Translate (line 56) | public void Translate(Position vector)
method Scale (line 61) | public void Scale(float scaleX, float scaleY)
method Rotate (line 66) | public void Rotate(float angle)
method DrawLine (line 71) | public void DrawLine(Position start, Position end, SkPaint paint)
method DrawRectangle (line 76) | public void DrawRectangle(Position vector, Size size, SkPaint paint)
method DrawComplexBorder (line 81) | public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect o...
method DrawShadow (line 86) | public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
method DrawParagraph (line 91) | public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lin...
method DrawImage (line 96) | public void DrawImage(SkImage image, Size size)
method DrawPicture (line 101) | public void DrawPicture(SkPicture picture)
method DrawSvgPath (line 106) | public void DrawSvgPath(string path, Color color)
method DrawSvg (line 111) | public void DrawSvg(SkSvgImage svgImage, Size size)
method DrawOverflowArea (line 116) | public void DrawOverflowArea(SkRect area)
method ClipOverflowArea (line 121) | public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
method ClipRectangle (line 126) | public void ClipRectangle(SkRect clipArea)
method ClipRoundedRectangle (line 131) | public void ClipRoundedRectangle(SkRoundedRect clipArea)
method DrawHyperlink (line 136) | public void DrawHyperlink(Size size, string url, string? description)
method DrawSectionLink (line 141) | public void DrawSectionLink(Size size, string sectionName, string? des...
method DrawSection (line 146) | public void DrawSection(string sectionName)
method GetSemanticNodeId (line 151) | public int GetSemanticNodeId()
method SetSemanticNodeId (line 156) | public void SetSemanticNodeId(int nodeId)
FILE: Source/QuestPDF/Drawing/DrawingCanvases/ProxyDrawingCanvas.cs
class ProxyDrawingCanvas (line 8) | internal sealed class ProxyDrawingCanvas : IDrawingCanvas, IDisposable
method Dispose (line 20) | public void Dispose()
method GetSnapshot (line 30) | public DocumentPageSnapshot GetSnapshot()
method DrawSnapshot (line 35) | public void DrawSnapshot(DocumentPageSnapshot snapshot)
method Save (line 40) | public void Save()
method Restore (line 45) | public void Restore()
method SetZIndex (line 50) | public void SetZIndex(int index)
method GetZIndex (line 55) | public int GetZIndex()
method GetCurrentMatrix (line 60) | public SkCanvasMatrix GetCurrentMatrix()
method SetMatrix (line 65) | public void SetMatrix(SkCanvasMatrix matrix)
method Translate (line 70) | public void Translate(Position vector)
method Scale (line 75) | public void Scale(float scaleX, float scaleY)
method Rotate (line 80) | public void Rotate(float angle)
method DrawLine (line 85) | public void DrawLine(Position start, Position end, SkPaint paint)
method DrawRectangle (line 90) | public void DrawRectangle(Position vector, Size size, SkPaint paint)
method DrawComplexBorder (line 95) | public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect o...
method DrawShadow (line 100) | public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
method DrawParagraph (line 105) | public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lin...
method DrawImage (line 110) | public void DrawImage(SkImage image, Size size)
method DrawPicture (line 115) | public void DrawPicture(SkPicture picture)
method DrawSvgPath (line 120) | public void DrawSvgPath(string path, Color color)
method DrawSvg (line 125) | public void DrawSvg(SkSvgImage svgImage, Size size)
method DrawOverflowArea (line 130) | public void DrawOverflowArea(SkRect area)
method ClipOverflowArea (line 135) | public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
method ClipRectangle (line 140) | public void ClipRectangle(SkRect clipArea)
method ClipRoundedRectangle (line 145) | public void ClipRoundedRectangle(SkRoundedRect clipArea)
method DrawHyperlink (line 150) | public void DrawHyperlink(Size size, string url, string? description)
method DrawSectionLink (line 155) | public void DrawSectionLink(Size size, string sectionName, string? des...
method DrawSection (line 160) | public void DrawSection(string sectionName)
method GetSemanticNodeId (line 165) | public int GetSemanticNodeId()
method SetSemanticNodeId (line 170) | public void SetSemanticNodeId(int nodeId)
FILE: Source/QuestPDF/Drawing/DrawingCanvases/SemanticDrawingCanvas.cs
class SemanticDrawingCanvas (line 10) | internal sealed class SemanticDrawingCanvas : IDrawingCanvas
method GetSnapshot (line 16) | public DocumentPageSnapshot GetSnapshot()
method DrawSnapshot (line 21) | public void DrawSnapshot(DocumentPageSnapshot snapshot)
method Save (line 26) | public void Save()
method Restore (line 31) | public void Restore()
method SetZIndex (line 36) | public void SetZIndex(int index)
method GetZIndex (line 41) | public int GetZIndex()
method GetCurrentMatrix (line 46) | public SkCanvasMatrix GetCurrentMatrix()
method SetMatrix (line 51) | public void SetMatrix(SkCanvasMatrix matrix)
method Translate (line 56) | public void Translate(Position vector)
method Scale (line 61) | public void Scale(float scaleX, float scaleY)
method Rotate (line 66) | public void Rotate(float angle)
method DrawLine (line 71) | public void DrawLine(Position start, Position end, SkPaint paint)
method DrawRectangle (line 76) | public void DrawRectangle(Position vector, Size size, SkPaint paint)
method DrawComplexBorder (line 81) | public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect o...
method DrawShadow (line 86) | public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
method DrawParagraph (line 91) | public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lin...
method DrawImage (line 96) | public void DrawImage(SkImage image, Size size)
method DrawPicture (line 101) | public void DrawPicture(SkPicture picture)
method DrawSvgPath (line 106) | public void DrawSvgPath(string path, Color color)
method DrawSvg (line 111) | public void DrawSvg(SkSvgImage svgImage, Size size)
method DrawOverflowArea (line 116) | public void DrawOverflowArea(SkRect area)
method ClipOverflowArea (line 121) | public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
method ClipRectangle (line 126) | public void ClipRectangle(SkRect clipArea)
method ClipRoundedRectangle (line 131) | public void ClipRoundedRectangle(SkRoundedRect clipArea)
method DrawHyperlink (line 136) | public void DrawHyperlink(Size size, string url, string? description)
method DrawSectionLink (line 141) | public void DrawSectionLink(Size size, string sectionName, string? des...
method DrawSection (line 146) | public void DrawSection(string sectionName)
method GetSemanticNodeId (line 151) | public int GetSemanticNodeId()
method SetSemanticNodeId (line 156) | public void SetSemanticNodeId(int nodeId)
FILE: Source/QuestPDF/Drawing/DrawingCanvases/SkiaDrawingCanvas.cs
class SkiaDrawingCanvas (line 10) | internal sealed class SkiaDrawingCanvas : IDrawingCanvas, IDisposable
method SkiaDrawingCanvas (line 15) | public SkiaDrawingCanvas(float width, float height)
method Dispose (line 26) | public void Dispose()
method GetCanvasForZIndex (line 49) | private SkCanvas GetCanvasForZIndex(int zIndex)
method GetSnapshot (line 65) | public DocumentPageSnapshot GetSnapshot()
method DrawSnapshot (line 87) | public void DrawSnapshot(DocumentPageSnapshot snapshot)
method Save (line 100) | public void Save()
method Restore (line 105) | public void Restore()
method SetZIndex (line 110) | public void SetZIndex(int index)
method GetZIndex (line 120) | public int GetZIndex()
method GetCurrentMatrix (line 125) | public SkCanvasMatrix GetCurrentMatrix()
method SetMatrix (line 130) | public void SetMatrix(SkCanvasMatrix matrix)
method Translate (line 135) | public void Translate(Position vector)
method Scale (line 140) | public void Scale(float scaleX, float scaleY)
method Rotate (line 145) | public void Rotate(float angle)
method DrawLine (line 150) | public void DrawLine(Position start, Position end, SkPaint paint)
method DrawRectangle (line 158) | public void DrawRectangle(Position vector, Size size, SkPaint paint)
method DrawComplexBorder (line 164) | public void DrawComplexBorder(SkRoundedRect innerRect, SkRoundedRect o...
method DrawShadow (line 169) | public void DrawShadow(SkRoundedRect shadowRect, SkBoxShadow shadow)
method DrawParagraph (line 174) | public void DrawParagraph(SkParagraph paragraph, int lineFrom, int lin...
method DrawImage (line 179) | public void DrawImage(SkImage image, Size size)
method DrawPicture (line 184) | public void DrawPicture(SkPicture picture)
method DrawSvgPath (line 189) | public void DrawSvgPath(string path, Color color)
method DrawSvg (line 194) | public void DrawSvg(SkSvgImage svgImage, Size size)
method DrawOverflowArea (line 199) | public void DrawOverflowArea(SkRect area)
method ClipOverflowArea (line 204) | public void ClipOverflowArea(SkRect availableSpace, SkRect requiredSpace)
method ClipRectangle (line 209) | public void ClipRectangle(SkRect clipArea)
method ClipRoundedRectangle (line 214) | public void ClipRoundedRectangle(SkRoundedRect clipArea)
method DrawHyperlink (line 219) | public void DrawHyperlink(Size size, string url, string? description)
method DrawSectionLink (line 224) | public void DrawSectionLink(Size size, string sectionName, string? des...
method DrawSection (line 229) | public void DrawSection(string sectionName)
method GetSemanticNodeId (line 236) | public int GetSemanticNodeId()
method SetSemanticNodeId (line 241) | public void SetSemanticNodeId(int nodeId)
FILE: Source/QuestPDF/Drawing/Exceptions/DocumentComposeException.cs
class DocumentComposeException (line 5) | public sealed class DocumentComposeException : Exception
method DocumentComposeException (line 7) | internal DocumentComposeException(string message) : base(message)
FILE: Source/QuestPDF/Drawing/Exceptions/DocumentDrawingException.cs
class DocumentDrawingException (line 5) | public sealed class DocumentDrawingException : Exception
method DocumentDrawingException (line 7) | internal DocumentDrawingException(string message) : base(message)
method DocumentDrawingException (line 12) | internal DocumentDrawingException(string message, Exception inner) : b...
FILE: Source/QuestPDF/Drawing/Exceptions/DocumentLayoutException.cs
class DocumentLayoutException (line 5) | public sealed class DocumentLayoutException : Exception
method DocumentLayoutException (line 7) | internal DocumentLayoutException(string message) : base(message)
FILE: Source/QuestPDF/Drawing/Exceptions/InitializationException.cs
class InitializationException (line 5) | public sealed class InitializationException : Exception
method InitializationException (line 7) | internal InitializationException(string message) : base(message)
method InitializationException (line 12) | internal InitializationException(string message, Exception inner) : ba...
FILE: Source/QuestPDF/Drawing/FontManager.cs
class FontManager (line 18) | public static class FontManager
method FontManager (line 23) | static FontManager()
method RegisterFontType (line 29) | [Obsolete("Since version 2022.8 this method has been renamed. Please u...
method RegisterFontWithCustomName (line 41) | public static void RegisterFontWithCustomName(string fontName, Stream ...
method RegisterFont (line 52) | public static void RegisterFont(Stream stream)
method RegisterFontFromEmbeddedResource (line 63) | public static void RegisterFontFromEmbeddedResource(string pathName)
method RegisterLibraryDefaultFonts (line 73) | private static void RegisterLibraryDefaultFonts()
FILE: Source/QuestPDF/Drawing/Proxy/ElementProxy.cs
class ElementProxy (line 5) | internal class ElementProxy : ContainerElement
FILE: Source/QuestPDF/Drawing/Proxy/LayoutDebugging.cs
class LayoutDebugging (line 12) | internal static class LayoutDebugging
method TryMeasureWithOverflow (line 14) | internal static SpacePlan TryMeasureWithOverflow(this Element element,...
method ApplyLayoutOverflowDetection (line 46) | public static void ApplyLayoutOverflowDetection(this Element container)
method TryToFixTheLayoutOverflowIssue (line 54) | public static void TryToFixTheLayoutOverflowIssue(this TreeNode<Overfl...
method RemoveExistingProxies (line 150) | public static void RemoveExistingProxies(this Element content)
method RemoveExistingProxiesOfType (line 155) | public static void RemoveExistingProxiesOfType<TProxy>(this Element co...
method StopMeasuring (line 170) | public static void StopMeasuring(this TreeNode<OverflowDebuggingProxy>...
method FindLayoutOverflowVisualizationNodes (line 178) | public static IEnumerable<TreeNode<OverflowDebuggingProxy>> FindLayout...
method FormatAncestors (line 194) | public static string FormatAncestors(this IEnumerable<Element> ancestors)
method FormatLayoutSubtree (line 225) | public static string FormatLayoutSubtree(this TreeNode<OverflowDebuggi...
method GetElementConfiguration (line 313) | public static IEnumerable<(string Property, string Value)> GetElementC...
FILE: Source/QuestPDF/Drawing/Proxy/LayoutOverflowVisualization.cs
class LayoutOverflowVisualization (line 8) | internal sealed class LayoutOverflowVisualization : ElementProxy, IConte...
method Measure (line 17) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 38) | internal override void Draw(Size availableSpace)
method DrawOverflowArea (line 80) | private void DrawOverflowArea(Size availableSpace, Size contentSize)
FILE: Source/QuestPDF/Drawing/Proxy/LayoutProxy.cs
class LayoutProxy (line 13) | internal sealed class LayoutProxy : ElementProxy
method LayoutProxy (line 18) | public LayoutProxy(Element child)
method Draw (line 23) | internal override void Draw(Size availableSpace)
method CaptureLayoutErrorMeasurement (line 52) | internal void CaptureLayoutErrorMeasurement()
FILE: Source/QuestPDF/Drawing/Proxy/OverflowDebuggingProxy.cs
class OverflowDebuggingProxy (line 5) | internal sealed class OverflowDebuggingProxy : ElementProxy
method OverflowDebuggingProxy (line 12) | public OverflowDebuggingProxy(Element child)
method Measure (line 17) | internal override SpacePlan Measure(Size availableSpace)
method StopMeasuring (line 30) | public void StopMeasuring()
FILE: Source/QuestPDF/Drawing/Proxy/SnapshotCacheRecorderProxy.cs
class SnapshotCacheRecorderProxy (line 10) | internal sealed class SnapshotCacheRecorderProxy : ElementProxy, IDispos...
method Dispose (line 22) | public void Dispose()
method SnapshotCacheRecorderProxy (line 32) | public SnapshotCacheRecorderProxy(Element child)
method Initialize (line 37) | private void Initialize()
method Measure (line 45) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 62) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Drawing/Proxy/TreeTraversal.cs
class TreeNode (line 7) | internal sealed class TreeNode<T>
method TreeNode (line 13) | public TreeNode(T Value)
class TreeTraversal (line 19) | internal static class TreeTraversal
method ExtractElementsOfType (line 21) | public static IEnumerable<TreeNode<T>> ExtractElementsOfType<T>(this E...
method Flatten (line 42) | public static IEnumerable<TreeNode<T>> Flatten<T>(this TreeNode<T> ele...
method ExtractAncestors (line 51) | public static IEnumerable<TreeNode<T>> ExtractAncestors<T>(this TreeNo...
FILE: Source/QuestPDF/Drawing/SemanticTreeManager.cs
class SemanticTreeNode (line 7) | internal class SemanticTreeNode
class Attribute (line 16) | public class Attribute
class SemanticTreeManager (line 24) | class SemanticTreeManager
method SemanticTreeManager (line 30) | public SemanticTreeManager()
method PopulateWithTopLevelNode (line 35) | private void PopulateWithTopLevelNode()
method GetNextNodeId (line 44) | public int GetNextNodeId()
method AddNode (line 50) | public void AddNode(SemanticTreeNode node)
method PushOnStack (line 62) | public void PushOnStack(SemanticTreeNode node)
method PopStack (line 67) | public void PopStack()
method PeekStack (line 72) | public SemanticTreeNode PeekStack()
method Reset (line 77) | public void Reset()
method GetSemanticTree (line 84) | public SemanticTreeNode? GetSemanticTree()
method BeginArtifactContent (line 93) | public void BeginArtifactContent()
method EndArtifactContent (line 98) | public void EndArtifactContent()
method IsCurrentContentArtifact (line 103) | public bool IsCurrentContentArtifact()
class StateSnapshot (line 112) | public class StateSnapshot
method GetState (line 117) | public StateSnapshot GetState()
method SetState (line 125) | public void SetState(StateSnapshot state)
class SemanticTreeSnapshots (line 133) | class SemanticTreeSnapshots(SemanticTreeManager? semanticTreeManager, IP...
method StartSemanticStateScope (line 137) | public SemanticTreeSnapshotScope? StartSemanticStateScope(int index)
class SemanticTreeSnapshotScope (line 163) | public class SemanticTreeSnapshotScope(Action resetState) : IDisposable
method Dispose (line 165) | public void Dispose()
type SemanticScope (line 173) | internal readonly ref struct SemanticScope : IDisposable
method SemanticScope (line 178) | public SemanticScope(IDrawingCanvas drawingCanvas, int nodeId)
method Dispose (line 185) | public void Dispose()
class SemanticCanvasExtensions (line 191) | internal static class SemanticCanvasExtensions
method StartSemanticScopeWithNodeId (line 193) | public static SemanticScope StartSemanticScopeWithNodeId(this IDrawing...
FILE: Source/QuestPDF/Drawing/SpacePlan.cs
type SpacePlan (line 5) | internal readonly struct SpacePlan
method SpacePlan (line 12) | internal SpacePlan(SpacePlanType type, float width, float height, stri...
method Empty (line 20) | internal static SpacePlan Empty() => new(SpacePlanType.Empty, 0, 0);
method Wrap (line 22) | internal static SpacePlan Wrap(string reason) => new(SpacePlanType.Wra...
method PartialRender (line 24) | internal static SpacePlan PartialRender(float width, float height) => ...
method PartialRender (line 26) | internal static SpacePlan PartialRender(Size size) => PartialRender(si...
method FullRender (line 28) | internal static SpacePlan FullRender(float width, float height) => new...
method FullRender (line 30) | internal static SpacePlan FullRender(Size size) => FullRender(size.Wid...
method ToString (line 32) | public override string ToString()
FILE: Source/QuestPDF/Drawing/SpacePlanType.cs
type SpacePlanType (line 3) | internal enum SpacePlanType
FILE: Source/QuestPDF/Elements/Alignment.cs
class Alignment (line 6) | internal sealed class Alignment : ContainerElement
method Draw (line 11) | internal override void Draw(Size availableSpace)
method GetTopOffset (line 30) | private float GetTopOffset(Size availableSpace, Size childSize)
method GetLeftOffset (line 43) | private float GetLeftOffset(Size availableSpace, Size childSize)
method GetCompanionHint (line 56) | internal override string? GetCompanionHint() => $"{Vertical} {Horizont...
FILE: Source/QuestPDF/Elements/ArtifactTag.cs
class ArtifactTag (line 6) | internal class ArtifactTag : ContainerElement, ISemanticAware
method Draw (line 12) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Elements/AspectRatio.cs
class AspectRatio (line 8) | internal sealed class AspectRatio : ContainerElement, IContentDirectionA...
method Measure (line 15) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 48) | internal override void Draw(Size availableSpace)
method GetTargetSize (line 61) | private Size GetTargetSize(Size availableSpace)
method GetCompanionHint (line 80) | internal override string? GetCompanionHint() => $"{Option.ToString()} ...
FILE: Source/QuestPDF/Elements/Column.cs
class ColumnItemRenderingCommand (line 10) | internal sealed class ColumnItemRenderingCommand
class Column (line 17) | internal sealed class Column : Element, IStateful
method GetChildren (line 22) | internal override IEnumerable<Element?> GetChildren()
method CreateProxy (line 27) | internal override void CreateProxy(Func<Element?, Element?> create)
method Measure (line 33) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 67) | internal override void Draw(Size availableSpace)
method PlanLayout (line 84) | private List<ColumnItemRenderingCommand> PlanLayout(Size availableSpace)
method ResetState (line 142) | public void ResetState(bool hardReset = false) => CurrentRenderingInde...
method GetState (line 143) | public object GetState() => CurrentRenderingIndex;
method SetState (line 144) | public void SetState(object state) => CurrentRenderingIndex = (int) st...
FILE: Source/QuestPDF/Elements/Constrained.cs
class Constrained (line 10) | internal sealed class Constrained : ContainerElement, IContentDirectionA...
method Measure (line 22) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 64) | internal override void Draw(Size availableSpace)
method Min (line 79) | private static float Min(float? x, float y)
method Max (line 84) | private static float Max(float? x, float y)
method GetCompanionHint (line 89) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/Container.cs
class Container (line 5) | internal class Container : ContainerElement
method Container (line 7) | internal Container()
FILE: Source/QuestPDF/Elements/ContentDirectionSetter.cs
class ContentDirectionSetter (line 5) | internal sealed class ContentDirectionSetter : ContainerElement
FILE: Source/QuestPDF/Elements/DebugArea.cs
class DebugArea (line 8) | internal sealed class DebugArea : IComponent
method Compose (line 14) | public void Compose(IContainer container)
FILE: Source/QuestPDF/Elements/DebugPointer.cs
type DocumentStructureTypes (line 6) | internal enum DocumentStructureTypes
type DebugPointerType (line 17) | internal enum DebugPointerType
class DebugPointer (line 27) | internal sealed class DebugPointer : ContainerElement
method GetCompanionSearchableContent (line 32) | internal override string? GetCompanionSearchableContent() => Label;
method DebugPointer (line 34) | public DebugPointer()
method DebugPointer (line 39) | public DebugPointer(DebugPointerType type, string label)
method GetCompanionProperties (line 45) | internal override IEnumerable<KeyValuePair<string, string>>? GetCompan...
FILE: Source/QuestPDF/Elements/Decoration.cs
class DecorationElementLayout (line 9) | internal sealed class DecorationElementLayout
type ItemCommand (line 15) | public struct ItemCommand
class Decoration (line 23) | internal sealed class Decoration : Element, IContentDirectionAware
method GetChildren (line 31) | internal override IEnumerable<Element?> GetChildren()
method CreateProxy (line 38) | internal override void CreateProxy(Func<Element?, Element?> create)
method Measure (line 45) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 85) | internal override void Draw(Size availableSpace)
method PlanLayout (line 112) | private DecorationElementLayout PlanLayout(Size availableSpace)
FILE: Source/QuestPDF/Elements/DefaultTextStyle.cs
class DefaultTextStyle (line 5) | internal sealed class DefaultTextStyle : ContainerElement
FILE: Source/QuestPDF/Elements/Dynamic.cs
class DynamicHost (line 10) | internal sealed class DynamicHost : Element, IStateful, IContentDirectio...
method DynamicHost (line 25) | public DynamicHost(DynamicComponentProxy child)
method Measure (line 31) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 55) | internal override void Draw(Size availableSpace)
method CreateContext (line 74) | private DynamicContext CreateContext(Size availableSize)
method ComposeContent (line 95) | private DynamicComponentComposeResult ComposeContent(DynamicContext co...
type DynamicState (line 109) | public struct DynamicState
method ResetState (line 119) | public void ResetState(bool hardReset = false)
method GetState (line 126) | public object GetState()
method SetState (line 136) | public void SetState(object state)
class DynamicContext (line 151) | public sealed class DynamicContext
method GetContentCapturedPositions (line 191) | public ICollection<PageElementLocation> GetContentCapturedPositions(st...
method CreateElement (line 201) | public IDynamicElement CreateElement(Action<IContainer> content)
method DisposeCreatedElements (line 224) | internal void DisposeCreatedElements()
type IDynamicElement (line 236) | public interface IDynamicElement : IElement
class DynamicElement (line 244) | internal sealed class DynamicElement : ContainerElement, IDynamicElement
FILE: Source/QuestPDF/Elements/DynamicImage.cs
class GenerateDynamicImageDelegatePayload (line 12) | public sealed class GenerateDynamicImageDelegatePayload
class DynamicImage (line 27) | internal sealed class DynamicImage : Element, IStateful, IDisposable
method Dispose (line 45) | public void Dispose()
method Measure (line 54) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 65) | internal override void Draw(Size availableSpace)
method GetImage (line 86) | private SkImage? GetImage(Size availableSpace)
method GetTargetResolution (line 122) | private static ImageSize GetTargetResolution(Size availableSize, int t...
method ResetState (line 136) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 137) | public object GetState() => IsRendered;
method SetState (line 138) | public void SetState(object state) => IsRendered = (bool) state;
method GetCompanionHint (line 142) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/DynamicSvgImage.cs
class DynamicSvgImage (line 12) | internal sealed class DynamicSvgImage : Element, IStateful, IDisposable
method Dispose (line 24) | public void Dispose()
method Measure (line 33) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 44) | internal override void Draw(Size availableSpace)
method GetImage (line 67) | private SkSvgImage? GetImage(Size availableSpace)
method ResetState (line 81) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 82) | public object GetState() => IsRendered;
method SetState (line 83) | public void SetState(object state) => IsRendered = (bool) state;
FILE: Source/QuestPDF/Elements/ElementPositionLocator.cs
class ElementPositionLocator (line 6) | internal class ElementPositionLocator : ContainerElement
method Draw (line 10) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Elements/Empty.cs
class Empty (line 7) | internal sealed class Empty : Element
method Measure (line 11) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 18) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Elements/EnsureSpace.cs
class EnsureSpace (line 6) | internal sealed class EnsureSpace : ContainerElement, IStateful
method Measure (line 11) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 27) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 46) | internal override string? GetCompanionHint() => $"at least {MinHeight}";
method ResetState (line 52) | public void ResetState(bool hardReset = false)
method GetState (line 58) | public object GetState() => IsFirstPageRendered;
method SetState (line 59) | public void SetState(object state) => IsFirstPageRendered = (bool) state;
FILE: Source/QuestPDF/Elements/Extend.cs
class Extend (line 7) | internal sealed class Extend : ContainerElement
method Measure (line 12) | internal override SpacePlan Measure(Size availableSpace)
method GetTargetSize (line 30) | private Size GetTargetSize(Size availableSpace, Size childSize)
method GetCompanionHint (line 37) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/Grid.cs
class GridElement (line 8) | internal sealed class GridElement
class Grid (line 14) | internal sealed class Grid : IComponent
method Compose (line 26) | public void Compose(IContainer container)
method GetRowElements (line 39) | IEnumerable<GridElement> GetRowElements()
method BuildRow (line 55) | void BuildRow(RowDescriptor row)
FILE: Source/QuestPDF/Elements/Hyperlink.cs
class Hyperlink (line 7) | internal sealed class Hyperlink : ContainerElement, IContentDirectionAwa...
method Draw (line 15) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 39) | internal override string? GetCompanionHint() => Url;
method GetCompanionProperties (line 41) | internal override IEnumerable<KeyValuePair<string, string>>? GetCompan...
FILE: Source/QuestPDF/Elements/Image.cs
class Image (line 9) | internal sealed class Image : Element, IStateful, IDisposable
method Dispose (line 25) | public void Dispose()
method Measure (line 33) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 44) | internal override void Draw(Size availableSpace)
method GetImageToDraw (line 60) | private SkImage GetImageToDraw(Size availableSpace)
method GetTargetResolution (line 77) | private static ImageSize GetTargetResolution(ImageSize imageResolution...
method ResetState (line 97) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 98) | public object GetState() => IsRendered;
method SetState (line 99) | public void SetState(object state) => IsRendered = (bool) state;
method GetCompanionHint (line 103) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/Inlined.cs
type InlinedAlignment (line 8) | internal enum InlinedAlignment
type InlinedMeasurement (line 17) | internal struct InlinedMeasurement
class Inlined (line 23) | internal sealed class Inlined : Element, IContentDirectionAware, IStateful
method GetChildren (line 35) | internal override IEnumerable<Element?> GetChildren()
method Measure (line 40) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 74) | internal override void Draw(Size availableSpace)
method SetDefaultAlignment (line 168) | void SetDefaultAlignment()
method GetLineSize (line 178) | static Size GetLineSize(ICollection<InlinedMeasurement> measurements)
method Compose (line 187) | private ICollection<ICollection<InlinedMeasurement>> Compose(Size avai...
method ResetState (line 260) | public void ResetState(bool hardReset = false) => CurrentRenderingInde...
method GetState (line 261) | public object GetState() => CurrentRenderingIndex;
method SetState (line 262) | public void SetState(object state) => CurrentRenderingIndex = (int) st...
FILE: Source/QuestPDF/Elements/Layers.cs
class Layer (line 8) | internal sealed class Layer : ContainerElement
class Layers (line 13) | internal sealed class Layers : Element
method GetChildren (line 17) | internal override IEnumerable<Element?> GetChildren()
method Measure (line 22) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 34) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Elements/Lazy.cs
class Lazy (line 8) | internal sealed class Lazy : ContainerElement, ISemanticAware, IContentD...
method Measure (line 25) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 34) | internal override void Draw(Size availableSpace)
method PopulateContent (line 56) | private void PopulateContent()
type LazyState (line 80) | public struct LazyState
method ResetState (line 89) | public void ResetState(bool hardReset = false)
method GetState (line 98) | public object GetState()
method SetState (line 107) | public void SetState(object state)
FILE: Source/QuestPDF/Elements/Line.cs
type LineType (line 9) | internal enum LineType
class Line (line 15) | internal sealed class Line : Element, IStateful
method Measure (line 23) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 52) | internal override void Draw(Size availableSpace)
method ResetState (line 90) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 91) | public object GetState() => IsRendered;
method SetState (line 92) | public void SetState(object state) => IsRendered = (bool) state;
method GetCompanionHint (line 96) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/MultiColumn.cs
class MultiColumnChildDrawingObserver (line 15) | internal sealed class MultiColumnChildDrawingObserver : ElementProxy
method Draw (line 20) | internal override void Draw(Size availableSpace)
method ResetDrawingState (line 26) | internal void ResetDrawingState()
method RestoreState (line 31) | internal void RestoreState()
method GetFirstElementChild (line 36) | private Element GetFirstElementChild()
class MultiColumn (line 47) | internal sealed class MultiColumn : Element, IContentDirectionAware, IDi...
method Dispose (line 70) | public void Dispose()
method CreateProxy (line 76) | internal override void CreateProxy(Func<Element?, Element?> create)
method GetChildren (line 82) | internal override IEnumerable<Element?> GetChildren()
method BuildState (line 88) | private void BuildState()
method Measure (line 101) | internal override SpacePlan Measure(Size availableSpace)
method GetAvailableSpaceForColumn (line 160) | Size GetAvailableSpaceForColumn(Size totalSpace)
method Draw (line 166) | internal override void Draw(Size availableSpace)
method ResetObserverState (line 214) | void ResetObserverState(bool restoreChildState)
method OptimizeTextCacheBehavior (line 247) | private void OptimizeTextCacheBehavior()
FILE: Source/QuestPDF/Elements/Padding.cs
class Padding (line 10) | internal sealed class Padding : ContainerElement
method Measure (line 17) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 42) | internal override void Draw(Size availableSpace)
method InternalSpace (line 51) | private Size InternalSpace(Size availableSpace)
method GetCompanionHint (line 58) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/Page.cs
class Page (line 9) | internal sealed class Page : IComponent
method Compose (line 31) | public void Compose(IContainer container)
method SetDefaultPageSizeIfNotSpecified (line 95) | private void SetDefaultPageSizeIfNotSpecified()
FILE: Source/QuestPDF/Elements/PageBreak.cs
class PageBreak (line 7) | internal sealed class PageBreak : Element, IStateful
method Measure (line 9) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 20) | internal override void Draw(Size availableSpace)
method ResetState (line 29) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 30) | public object GetState() => IsRendered;
method SetState (line 31) | public void SetState(object state) => IsRendered = (bool) state;
FILE: Source/QuestPDF/Elements/Placeholder.cs
class Placeholder (line 7) | internal sealed class Placeholder : IComponent
method Compose (line 11) | public void Compose(IContainer container)
FILE: Source/QuestPDF/Elements/PreventPageBreak.cs
class PreventPageBreak (line 6) | internal sealed class PreventPageBreak : ContainerElement, IStateful
method Measure (line 8) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 21) | internal override void Draw(Size availableSpace)
method ResetState (line 41) | public void ResetState(bool hardReset = false)
method GetState (line 47) | public object GetState() => IsFirstPageRendered;
method SetState (line 48) | public void SetState(object state) => IsFirstPageRendered = (bool) state;
FILE: Source/QuestPDF/Elements/RepeatContent.cs
class RepeatContent (line 9) | internal sealed class RepeatContent : ContainerElement, IStateful, ISema...
type RepeatContextType (line 13) | public enum RepeatContextType
method Draw (line 22) | internal override void Draw(Size availableSpace)
method OptimizeContentCacheBehavior (line 85) | private void OptimizeContentCacheBehavior()
method ResetState (line 108) | public void ResetState(bool hardReset = false)
method GetState (line 114) | public object GetState() => IsFullyRendered;
method SetState (line 115) | public void SetState(object state) => IsFullyRendered = (bool) state;
FILE: Source/QuestPDF/Elements/Rotate.cs
class Rotate (line 7) | internal sealed class Rotate : ContainerElement
method Draw (line 11) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 18) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/Row.cs
type RowItemType (line 10) | internal enum RowItemType
class RowItem (line 17) | internal sealed class RowItem : ContainerElement
method GetCompanionHint (line 25) | internal override string? GetCompanionHint()
class RowItemRenderingCommand (line 34) | internal sealed class RowItemRenderingCommand
class Row (line 42) | internal sealed class Row : Element, IStateful, IContentDirectionAware
method GetChildren (line 49) | internal override IEnumerable<Element?> GetChildren()
method Measure (line 54) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 88) | internal override void Draw(Size availableSpace)
method UpdateItemsWidth (line 123) | private void UpdateItemsWidth(float availableWidth)
method PlanLayout (line 144) | private ICollection<RowItemRenderingCommand> PlanLayout(Size available...
method ResetState (line 188) | public void ResetState(bool hardReset = false)
method GetState (line 200) | public object GetState()
method SetState (line 210) | public void SetState(object state)
FILE: Source/QuestPDF/Elements/Scale.cs
class Scale (line 10) | internal sealed class Scale : ContainerElement
method Measure (line 15) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 40) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 59) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/ScaleToFit.cs
class ScaleToFit (line 7) | internal sealed class ScaleToFit : ContainerElement
method Measure (line 9) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 22) | internal override void Draw(Size availableSpace)
method ScaleSize (line 37) | private static Size ScaleSize(Size size, float factor)
method FindPerfectScale (line 42) | private float? FindPerfectScale(Size availableSpace)
FILE: Source/QuestPDF/Elements/Section.cs
class Section (line 6) | internal sealed class Section : ContainerElement, IStateful
method Draw (line 10) | internal override void Draw(Size availableSpace)
method ResetState (line 27) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 28) | public object GetState() => IsRendered;
method SetState (line 29) | public void SetState(object state) => IsRendered = (bool) state;
method GetCompanionHint (line 33) | internal override string? GetCompanionHint() => SectionName;
method GetCompanionSearchableContent (line 34) | internal override string? GetCompanionSearchableContent() => SectionName;
method GetCompanionProperties (line 36) | internal override IEnumerable<KeyValuePair<string, string>>? GetCompan...
FILE: Source/QuestPDF/Elements/SectionLink.cs
class SectionLink (line 7) | internal sealed class SectionLink : ContainerElement
method Draw (line 12) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 24) | internal override string? GetCompanionHint() => SectionName;
method GetCompanionSearchableContent (line 25) | internal override string? GetCompanionSearchableContent() => SectionName;
method GetCompanionProperties (line 27) | internal override IEnumerable<KeyValuePair<string, string>>? GetCompan...
FILE: Source/QuestPDF/Elements/SemanticTag.cs
class SemanticTag (line 11) | internal class SemanticTag : ContainerElement, ISemanticAware
method Draw (line 20) | internal override void Draw(Size availableSpace)
method RegisterCurrentSemanticNode (line 42) | internal void RegisterCurrentSemanticNode()
method UpdateHeaderText (line 66) | private void UpdateHeaderText()
method UpdateDescriptionOfInnerLink (line 96) | private void UpdateDescriptionOfInnerLink()
method GetCompanionHint (line 121) | internal override string? GetCompanionHint()
method GetCompanionSearchableContent (line 131) | internal override string? GetCompanionSearchableContent() => TagType;
FILE: Source/QuestPDF/Elements/ShowEntire.cs
class ShowEntire (line 6) | internal sealed class ShowEntire : ContainerElement
method Measure (line 8) | internal override SpacePlan Measure(Size availableSpace)
FILE: Source/QuestPDF/Elements/ShowIf.cs
class ShowIfContext (line 7) | public sealed class ShowIfContext
class ShowIf (line 24) | internal sealed class ShowIf : ContainerElement
method Measure (line 28) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 36) | internal override void Draw(Size availableSpace)
method CheckVisibility (line 42) | private bool CheckVisibility()
FILE: Source/QuestPDF/Elements/ShowOnce.cs
class ShowOnce (line 6) | internal sealed class ShowOnce : ContainerElement, IStateful
method Measure (line 8) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 16) | internal override void Draw(Size availableSpace)
method ResetState (line 31) | public void ResetState(bool hardReset = false)
method GetState (line 37) | public object GetState() => IsRendered;
method SetState (line 38) | public void SetState(object state) => IsRendered = (bool) state;
FILE: Source/QuestPDF/Elements/Shrink.cs
class Shrink (line 7) | internal sealed class Shrink : ContainerElement, IContentDirectionAware
method Draw (line 14) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 34) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/SimpleRotate.cs
class SimpleRotate (line 8) | internal sealed class SimpleRotate : ContainerElement
method Measure (line 13) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 36) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 56) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/SkipOnce.cs
class SkipOnce (line 6) | internal sealed class SkipOnce : ContainerElement, IStateful
method Measure (line 8) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 16) | internal override void Draw(Size availableSpace)
method ResetState (line 28) | public void ResetState(bool hardReset = false)
method GetState (line 34) | public object GetState() => FirstPageWasSkipped;
method SetState (line 35) | public void SetState(object state) => FirstPageWasSkipped = (bool) state;
FILE: Source/QuestPDF/Elements/SourceCodePointer.cs
class SourceCodePointer (line 6) | internal sealed class SourceCodePointer : ContainerElement
method GetCompanionSearchableContent (line 13) | internal override string? GetCompanionSearchableContent() => $"{Method...
method GetCompanionProperties (line 15) | internal override IEnumerable<KeyValuePair<string, string>>? GetCompan...
FILE: Source/QuestPDF/Elements/StopPaging.cs
class StopPaging (line 7) | internal sealed class StopPaging : ContainerElement
method Measure (line 9) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 23) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Elements/StyledBox.cs
class StyledBox (line 12) | internal sealed class StyledBox : ContainerElement
method AdjustBorderAlignment (line 66) | internal void AdjustBorderAlignment()
method Draw (line 75) | internal override void Draw(Size availableSpace)
method GetLinearGradientPositions (line 155) | private (Position start, Position end) GetLinearGradientPositions(Size...
method GetBorderPaint (line 207) | private SkPaint? GetBorderPaint(Size availableSpace)
method GetBackgroundPaint (line 227) | private SkPaint? GetBackgroundPaint(Size availableSpace)
method GetPrimaryBorderRect (line 247) | private SkRoundedRect GetPrimaryBorderRect(Size availableSpace)
method GetBorderRectExpandedWithBorderThickness (line 265) | private SkRoundedRect GetBorderRectExpandedWithBorderThickness(Size av...
method GetOuterRect (line 277) | private SkRoundedRect GetOuterRect(Size availableSpace)
method GetInnerRect (line 282) | private SkRoundedRect GetInnerRect(Size availableSpace)
method ExpandRoundedRect (line 287) | private SkRoundedRect ExpandRoundedRect(SkRoundedRect rect, float all)
method ExpandRoundedRect (line 292) | private SkRoundedRect ExpandRoundedRect(SkRoundedRect input, float lef...
method GetCompanionCustomContent (line 337) | internal IEnumerable<(string Type, string? Hint)> GetCompanionCustomCo...
FILE: Source/QuestPDF/Elements/SvgImage.cs
class SvgImage (line 9) | internal sealed class SvgImage : Element, IStateful, IDisposable
method Dispose (line 19) | public void Dispose()
method Measure (line 27) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 38) | internal override void Draw(Size availableSpace)
method ResetState (line 57) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 58) | public object GetState() => IsRendered;
method SetState (line 59) | public void SetState(object state) => IsRendered = (bool) state;
FILE: Source/QuestPDF/Elements/SvgPath.cs
class SvgPath (line 8) | internal sealed class SvgPath : Element, IStateful
method Measure (line 13) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 24) | internal override void Draw(Size availableSpace)
method ResetState (line 37) | public void ResetState(bool hardReset = false) => IsRendered = false;
method GetState (line 38) | public object GetState() => IsRendered;
method SetState (line 39) | public void SetState(object state) => IsRendered = (bool) state;
FILE: Source/QuestPDF/Elements/Table/DynamicDictionary.cs
class DynamicDictionary (line 10) | internal sealed class DynamicDictionary<TKey, TValue>
method DynamicDictionary (line 15) | public DynamicDictionary()
method DynamicDictionary (line 20) | public DynamicDictionary(TValue defaultValue)
FILE: Source/QuestPDF/Elements/Table/ITableCellContainer.cs
type ITableCellContainer (line 5) | public interface ITableCellContainer : IContainer
FILE: Source/QuestPDF/Elements/Table/Table.cs
class Table (line 10) | internal sealed class Table : Element, IStateful, IContentDirectionAware...
method GetChildren (line 34) | internal override IEnumerable<Element?> GetChildren()
method Initialize (line 39) | private void Initialize()
method BuildCache (line 53) | private void BuildCache()
method Measure (line 80) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 111) | internal override void Draw(Size availableSpace)
method CalculateCurrentRow (line 142) | private int CalculateCurrentRow(ICollection<TableCellRenderingCommand>...
method UpdateColumnsWidth (line 158) | private void UpdateColumnsWidth(float availableWidth)
method PlanLayout (line 171) | private ICollection<TableCellRenderingCommand> PlanLayout(Size availab...
type TableState (line 325) | public struct TableState
method ResetState (line 331) | public void ResetState(bool hardReset = false)
method GetState (line 339) | public object GetState()
method SetState (line 353) | public void SetState(object state)
type TablePartType (line 367) | internal enum TablePartType
method RegisterSemanticTree (line 382) | private void RegisterSemanticTree()
method DoesTableBodyRequireExtendedHeaderTagging (line 555) | public static bool DoesTableBodyRequireExtendedHeaderTagging(ICollecti...
FILE: Source/QuestPDF/Elements/Table/TableCell.cs
class TableCell (line 5) | internal sealed class TableCell : ContainerElement, ITableCellContainer
FILE: Source/QuestPDF/Elements/Table/TableCellRenderingCommand.cs
class TableCellRenderingCommand (line 6) | internal sealed class TableCellRenderingCommand
FILE: Source/QuestPDF/Elements/Table/TableColumnDefinition.cs
class TableColumnDefinition (line 3) | internal sealed class TableColumnDefinition
method TableColumnDefinition (line 10) | public TableColumnDefinition(float constantSize, float relativeSize)
FILE: Source/QuestPDF/Elements/Table/TableLayoutPlanner.cs
class TableLayoutPlanner (line 7) | static class TableLayoutPlanner
method PlanCellPositions (line 9) | public static void PlanCellPositions(this Table table)
method PlanCellPositions (line 14) | private static void PlanCellPositions(int columnsCount, ICollection<Ta...
method GenerateCoordinates (line 59) | private static IEnumerable<(int x, int y)> GenerateCoordinates(int col...
method CollidesWith (line 72) | private static bool CollidesWith(this TableCell cell, TableCell neighb...
method CollidesWithAnyOf (line 80) | private static bool CollidesWithAnyOf(this TableCell cell, ICollection...
method SetPartialLocation (line 85) | private static void SetPartialLocation(this TableCell cell)
method HasLocation (line 97) | private static bool HasLocation(this TableCell cell)
FILE: Source/QuestPDF/Elements/Table/TableLayoutValidator.cs
class TableLayoutValidator (line 6) | static class TableLayoutValidator
method ValidateCellPositions (line 8) | public static void ValidateCellPositions(this Table table)
method ValidateCellPositions (line 13) | private static void ValidateCellPositions(int columnsCount, ICollectio...
FILE: Source/QuestPDF/Elements/Text/Items/ITextBlockItem.cs
type ITextBlockItem (line 3) | internal interface ITextBlockItem
FILE: Source/QuestPDF/Elements/Text/Items/TextBlockElement.cs
class TextBlockElement (line 7) | internal sealed class TextBlockElement : ITextBlockItem
method ConfigureElement (line 14) | public void ConfigureElement(IPageContext pageContext, IDrawingCanvas ...
method UpdateElementSize (line 20) | public void UpdateElementSize()
FILE: Source/QuestPDF/Elements/Text/Items/TextBlockHyperlink.cs
class TextBlockHyperlink (line 3) | internal sealed class TextBlockHyperlink : TextBlockSpan
FILE: Source/QuestPDF/Elements/Text/Items/TextBlockPageNumber.cs
class TextBlockPageNumber (line 6) | internal sealed class TextBlockPageNumber : TextBlockSpan
method UpdatePageNumberText (line 11) | public void UpdatePageNumberText(IPageContext context)
FILE: Source/QuestPDF/Elements/Text/Items/TextBlockParagraphSpacing.cs
class TextBlockParagraphSpacing (line 3) | internal sealed class TextBlockParagraphSpacing : ITextBlockItem
method TextBlockParagraphSpacing (line 8) | public TextBlockParagraphSpacing(float width, float height)
FILE: Source/QuestPDF/Elements/Text/Items/TextBlockSectionLink.cs
class TextBlockSectionLink (line 5) | internal sealed class TextBlockSectionLink : TextBlockSpan
FILE: Source/QuestPDF/Elements/Text/Items/TextBlockSpan.cs
class TextBlockSpan (line 5) | internal class TextBlockSpan : ITextBlockItem
FILE: Source/QuestPDF/Elements/Text/SkParagraphBuilderPoolManager.cs
class SkParagraphBuilderPoolManager (line 8) | internal static class SkParagraphBuilderPoolManager
method Get (line 12) | public static SkParagraphBuilder Get(ParagraphStyle style)
method Return (line 23) | public static void Return(SkParagraphBuilder builder)
method GetPool (line 31) | private static ConcurrentBag<SkParagraphBuilder> GetPool(ParagraphStyl...
FILE: Source/QuestPDF/Elements/Text/TextBlock.cs
class TextBlock (line 15) | internal sealed class TextBlock : Element, IStateful, IContentDirectionA...
method Dispose (line 58) | public void Dispose()
method Measure (line 68) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 133) | internal override void Draw(Size availableSpace)
method Initialize (line 276) | private void Initialize()
method BuildParagraph (line 292) | private void BuildParagraph()
method ApplyParagraphSpacingToTextBlockItems (line 422) | private IEnumerable<ITextBlockItem> ApplyParagraphSpacingToTextBlockIt...
method CalculateParagraphMetrics (line 521) | private void CalculateParagraphMetrics(Size availableSpace)
method CheckUnresolvedGlyphs (line 543) | private void CheckUnresolvedGlyphs()
method CheckIfContainsOnlyWhiteSpace (line 577) | private bool CheckIfContainsOnlyWhiteSpace()
method MeasureHeightOfParagraphContainingOnlyWhiteSpace (line 596) | private float MeasureHeightOfParagraphContainingOnlyWhiteSpace()
type TextBlockState (line 640) | public struct TextBlockState
method ResetState (line 647) | public void ResetState(bool hardReset = false)
method GetState (line 654) | public object GetState()
method SetState (line 664) | public void SetState(object state)
method GetCompanionHint (line 675) | internal override string? GetCompanionHint() => Text.Substring(0, Math...
method GetCompanionSearchableContent (line 676) | internal override string? GetCompanionSearchableContent() => Text;
FILE: Source/QuestPDF/Elements/Translate.cs
class Translate (line 8) | internal sealed class Translate : ContainerElement
method Draw (line 13) | internal override void Draw(Size availableSpace)
method GetCompanionHint (line 22) | internal override string? GetCompanionHint()
FILE: Source/QuestPDF/Elements/Unconstrained.cs
class Unconstrained (line 6) | internal sealed class Unconstrained : ContainerElement, IContentDirectio...
method Measure (line 10) | internal override SpacePlan Measure(Size availableSpace)
method Draw (line 23) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Elements/ZIndex.cs
class ZIndex (line 5) | internal sealed class ZIndex : ContainerElement
method Draw (line 9) | internal override void Draw(Size availableSpace)
FILE: Source/QuestPDF/Fluent/AlignmentExtensions.cs
class AlignmentExtensions (line 6) | public static class AlignmentExtensions
method AlignHorizontal (line 10) | private static IContainer AlignHorizontal(this IContainer element, Hor...
method AlignLeft (line 21) | public static IContainer AlignLeft(this IContainer element)
method AlignCenter (line 30) | public static IContainer AlignCenter(this IContainer element)
method AlignRight (line 39) | public static IContainer AlignRight(this IContainer element)
method AlignVertical (line 48) | private static IContainer AlignVertical(this IContainer element, Verti...
method AlignTop (line 59) | public static IContainer AlignTop(this IContainer element)
method AlignMiddle (line 68) | public static IContainer AlignMiddle(this IContainer element)
method AlignBottom (line 77) | public static IContainer AlignBottom(this IContainer element)
FILE: Source/QuestPDF/Fluent/ColumnExtensions.cs
class ColumnDescriptor (line 8) | public sealed class ColumnDescriptor
method ColumnDescriptor (line 12) | internal ColumnDescriptor()
method Spacing (line 20) | public void Spacing(float value, Unit unit = Unit.Point)
method Item (line 32) | public IContainer Item()
class ColumnExtensions (line 40) | public static class ColumnExtensions
method Stack (line 42) | [Obsolete("This element has been renamed since version 2022.2. Please ...
method Column (line 57) | public static void Column(this IContainer element, Action<ColumnDescri...
FILE: Source/QuestPDF/Fluent/ComponentExtentions.cs
class ComponentExtensions (line 10) | public static class ComponentExtensions
method Component (line 14) | public static void Component<T>(this IContainer element, T component) ...
method Component (line 24) | public static void Component<T>(this IContainer element) where T : ICo...
FILE: Source/QuestPDF/Fluent/ConstrainedExtensions.cs
class ConstrainedExtensions (line 7) | public static class ConstrainedExtensions
method ConstrainedWidth (line 11) | private static IContainer ConstrainedWidth(this IContainer element, fl...
method Width (line 38) | public static IContainer Width(this IContainer element, float value, U...
method MinWidth (line 49) | public static IContainer MinWidth(this IContainer element, float value...
method MaxWidth (line 60) | public static IContainer MaxWidth(this IContainer element, float value...
method ConstrainedHeight (line 70) | private static IContainer ConstrainedHeight(this IContainer element, f...
method Height (line 97) | public static IContainer Height(this IContainer element, float value, ...
method MinHeight (line 108) | public static IContainer MinHeight(this IContainer element, float valu...
method MaxHeight (line 119) | public static IContainer MaxHeight(this IContainer element, float valu...
method EnforceSizeWhenEmpty (line 127) | internal static IContainer EnforceSizeWhenEmpty(this IContainer element)
FILE: Source/QuestPDF/Fluent/ContentDirectionExtensions.cs
class ContentDirectionExtensions (line 6) | public static class ContentDirectionExtensions
method ContentDirection (line 8) | internal static IContainer ContentDirection(this IContainer element, C...
method ContentFromLeftToRight (line 21) | public static IContainer ContentFromLeftToRight(this IContainer element)
method ContentFromRightToLeft (line 31) | public static IContainer ContentFromRightToLeft(this IContainer element)
FILE: Source/QuestPDF/Fluent/DebugExtensions.cs
class DebugExtensions (line 9) | public static class DebugExtensions
method DebugArea (line 19) | public static IContainer DebugArea(this IContainer parent, string? tex...
method DebugPointer (line 46) | public static IContainer DebugPointer(this IContainer parent, string l...
method DebugPointer (line 51) | internal static IContainer DebugPointer(this IContainer parent, DebugP...
method LayoutOverflowVisualization (line 60) | internal static IContainer LayoutOverflowVisualization(this IContainer...
FILE: Source/QuestPDF/Fluent/DecorationExtensions.cs
class DecorationDescriptor (line 9) | public sealed class DecorationDescriptor
method DecorationDescriptor (line 13) | internal DecorationDescriptor()
method Before (line 24) | public IContainer Before()
method Before (line 43) | public void Before(Action<IContainer> handler)
method Content (line 54) | public IContainer Content()
method Content (line 70) | public void Content(Action<IContainer> handler)
method After (line 81) | public IContainer After()
method After (line 100) | public void After(Action<IContainer> handler)
method Header (line 107) | [Obsolete("This element has been renamed since version 2022.2. Please ...
method Header (line 116) | [Obsolete("This element has been renamed since version 2022.2. Please ...
method Footer (line 123) | [Obsolete("This element has been renamed since version 2022.2. Please ...
method Footer (line 132) | [Obsolete("This element has been renamed since version 2022.2. Please ...
class DecorationExtensions (line 142) | public static class DecorationExtensions
method Decoration (line 155) | public static void Decoration(this IContainer element, Action<Decorati...
FILE: Source/QuestPDF/Fluent/DocumentOperation.cs
class DocumentOperation (line 11) | public sealed class DocumentOperation
class LayerConfiguration (line 16) | public sealed class LayerConfiguration
type DocumentAttachmentRelationship (line 45) | public enum DocumentAttachmentRelationship
class DocumentAttachment (line 73) | public sealed class DocumentAttachment
class EncryptionBase (line 127) | public class EncryptionBase
class Encryption40Bit (line 142) | public sealed class Encryption40Bit : EncryptionBase
class Encryption128Bit (line 157) | public sealed class Encryption128Bit : EncryptionBase
class Encryption256Bit (line 178) | public sealed class Encryption256Bit : EncryptionBase
method DocumentOperation (line 201) | private DocumentOperation()
method LoadFile (line 211) | public static DocumentOperation LoadFile(string filePath, string? pass...
method TakePages (line 230) | public DocumentOperation TakePages(string pageSelector)
method MergeFile (line 249) | public DocumentOperation MergeFile(string filePath, string? pageSelect...
method UnderlayFile (line 270) | public DocumentOperation UnderlayFile(LayerConfiguration configuration)
method OverlayFile (line 292) | public DocumentOperation OverlayFile(LayerConfiguration configuration)
method ExtendMetadata (line 319) | public DocumentOperation ExtendMetadata(string metadata)
method AddAttachment (line 328) | public DocumentOperation AddAttachment(DocumentAttachment attachment)
method Decrypt (line 382) | public DocumentOperation Decrypt()
method RemoveRestrictions (line 393) | public DocumentOperation RemoveRestrictions()
method Encrypt (line 403) | public DocumentOperation Encrypt(Encryption40Bit encryption)
method Encrypt (line 427) | public DocumentOperation Encrypt(Encryption128Bit encryption)
method Encrypt (line 453) | public DocumentOperation Encrypt(Encryption256Bit encryption)
method FormatBooleanFlag (line 476) | private string FormatBooleanFlag(bool value)
method Linearize (line 486) | public DocumentOperation Linearize()
method Save (line 496) | public void Save(string filePath)
FILE: Source/QuestPDF/Fluent/DynamicComponentExtensions.cs
class DynamicComponentExtensions (line 6) | public static class DynamicComponentExtensions
method Dynamic (line 20) | public static void Dynamic(this IContainer element, IDynamicComponent ...
method Dynamic (line 38) | public static void Dynamic<TState>(this IContainer element, IDynamicCo...
method Element (line 47) | public static void Element(this IContainer element, IDynamicElement ch...
FILE: Source/QuestPDF/Fluent/ElementExtensions.cs
class ElementExtensions (line 15) | public static class ElementExtensions
method ElementExtensions (line 17) | static ElementExtensions()
method Element (line 22) | internal static T Element<T>(this IContainer element, T child) where T...
method Element (line 51) | public static void Element(
method Element (line 82) | public static IContainer Element(
method Element (line 102) | public static void Element(this IContainer parent, IContainer child)
method NonTrackingElement (line 107) | internal static IContainer NonTrackingElement(this IContainer parent, ...
method AspectRatio (line 121) | public static IContainer AspectRatio(this IContainer element, float ra...
method Placeholder (line 146) | public static void Placeholder(this IContainer element, string? text =...
method ShowOnce (line 169) | public static IContainer ShowOnce(this IContainer element)
method SkipOnce (line 187) | public static IContainer SkipOnce(this IContainer element)
method ShowEntire (line 201) | public static IContainer ShowEntire(this IContainer element)
method EnsureSpace (line 226) | public static IContainer EnsureSpace(this IContainer element, float mi...
method PreventPageBreak (line 249) | public static IContainer PreventPageBreak(this IContainer element)
method PageBreak (line 258) | public static void PageBreak(this IContainer element)
method Container (line 269) | public static IContainer Container(this IContainer element)
method ExternalLink (line 274) | [Obsolete("This element has been renamed since version 2022.3. Please ...
method Hyperlink (line 286) | public static IContainer Hyperlink(this IContainer element, string url)
method Location (line 297) | [Obsolete("This element has been renamed since version 2022.3. Please ...
method Section (line 314) | public static IContainer Section(this IContainer element, string secti...
method InternalLink (line 327) | [Obsolete("This element has been renamed since version 2022.3. Please ...
method SectionLink (line 339) | public static IContainer SectionLink(this IContainer element, string s...
method ShowIf (line 355) | public static IContainer ShowIf(this IContainer element, bool condition)
method ShowIf (line 366) | public static IContainer ShowIf(this IContainer element, Predicate<Sho...
method Unconstrained (line 378) | public static IContainer Unconstrained(this IContainer element)
method DefaultTextStyle (line 391) | public static IContainer DefaultTextStyle(this IContainer element, Tex...
method DefaultTextStyle (line 407) | public static IContainer DefaultTextStyle(this IContainer element, Fun...
method StopPaging (line 419) | public static IContainer StopPaging(this IContainer element)
method ScaleToFit (line 432) | public static IContainer ScaleToFit(this IContainer element)
method Repeat (line 446) | public static IContainer Repeat(this IContainer element)
method RepeatAsHeader (line 451) | internal static IContainer RepeatAsHeader(this IContainer element)
method RepeatAsFooter (line 459) | internal static IContainer RepeatAsFooter(this IContainer element)
method Lazy (line 480) | public static void Lazy(this IContainer element, Action<IContainer> co...
method LazyWithCache (line 495) | public static void LazyWithCache(this IContainer element, Action<ICont...
method ZIndex (line 511) | public static IContainer ZIndex(this IContainer element, int indexValue)
method CaptureContentPosition (line 524) | public static IContainer CaptureContentPosition(this IContainer elemen...
method Canvas (line 539) | [Obsolete(CanvasDeprecatedMessage)]
FILE: Source/QuestPDF/Fluent/ExtendExtensions.cs
class ExtendExtensions (line 6) | public static class ExtendExtensions
method Extend (line 8) | private static IContainer Extend(this IContainer element, bool vertica...
method Extend (line 22) | public static IContainer Extend(this IContainer element)
method ExtendVertical (line 31) | public static IContainer ExtendVertical(this IContainer element)
method ExtendHorizontal (line 40) | public static IContainer ExtendHorizontal(this IContainer element)
FILE: Source/QuestPDF/Fluent/GenerateExtensions.cs
class GenerateExtensions (line 13) | public static class GenerateExtensions
method GenerateExtensions (line 15) | static GenerateExtensions()
method Generate (line 20) | internal static void Generate(this IDocument document, IDocumentCanvas...
method ClearGenerateAndShowFiles (line 30) | private static void ClearGenerateAndShowFiles()
method GeneratePdf (line 57) | public static byte[] GeneratePdf(this IDocument document)
method GeneratePdf (line 67) | public static void GeneratePdf(this IDocument document, string filePath)
method GeneratePdf (line 79) | public static void GeneratePdf(this IDocument document, Stream stream)
method GeneratePdfAndShow (line 89) | public static void GeneratePdfAndShow(this IDocument document)
method GenerateXps (line 107) | public static byte[] GenerateXps(this IDocument document)
method GenerateXps (line 120) | public static void GenerateXps(this IDocument document, string filePath)
method GenerateXps (line 135) | public static void GenerateXps(this IDocument document, Stream stream)
method GenerateXpsAndShow (line 151) | public static void GenerateXpsAndShow(this IDocument document)
method GenerateImages (line 166) | public static IEnumerable<byte[]> GenerateImages(this IDocument docume...
method GenerateImages (line 181) | public static void GenerateImages(this IDocument document, GenerateDoc...
method GenerateSvg (line 206) | public static ICollection<string> GenerateSvg(this IDocument document)
FILE: Source/QuestPDF/Fluent/GridExtensions.cs
class GridDescriptor (line 8) | public sealed class GridDescriptor
method GridDescriptor (line 12) | internal GridDescriptor()
method Spacing (line 17) | public void Spacing(float value, Unit unit = Unit.Point)
method VerticalSpacing (line 23) | public void VerticalSpacing(float value, Unit unit = Unit.Point)
method HorizontalSpacing (line 31) | public void HorizontalSpacing(float value, Unit unit = Unit.Point)
method Columns (line 39) | public void Columns(int value = Grid.DefaultColumnsCount)
method Alignment (line 47) | public void Alignment(HorizontalAlignment alignment)
method AlignLeft (line 52) | public void AlignLeft() => Alignment(HorizontalAlignment.Left);
method AlignCenter (line 53) | public void AlignCenter() => Alignment(HorizontalAlignment.Center);
method AlignRight (line 54) | public void AlignRight() => Alignment(HorizontalAlignment.Right);
method Item (line 56) | public IContainer Item(int columns = 1)
class GridExtensions (line 74) | public static class GridExtensions
method Grid (line 76) | [Obsolete("This element has been deprecated since version 2022.11. Ple...
FILE: Source/QuestPDF/Fluent/ImageExtensions.cs
class DynamicImageDescriptor (line 10) | public sealed class DynamicImageDescriptor
method DynamicImageDescriptor (line 14) | internal DynamicImageDescriptor(Elements.DynamicImage imageElement)
method UseOriginalImage (line 20) | public DynamicImageDescriptor UseOriginalImage(bool value = true)
method WithRasterDpi (line 27) | public DynamicImageDescriptor WithRasterDpi(int dpi)
method WithCompressionQuality (line 37) | public DynamicImageDescriptor WithCompressionQuality(ImageCompressionQ...
class ImageDescriptor (line 44) | public sealed class ImageDescriptor
method ImageDescriptor (line 50) | internal ImageDescriptor(Elements.Image imageElement, Elements.AspectR...
method UseOriginalImage (line 60) | public ImageDescriptor UseOriginalImage(bool value = true)
method WithRasterDpi (line 67) | public ImageDescriptor WithRasterDpi(int dpi)
method WithCompressionQuality (line 77) | public ImageDescriptor WithCompressionQuality(ImageCompressionQuality ...
method FitWidth (line 88) | public ImageDescriptor FitWidth()
method FitHeight (line 97) | public ImageDescriptor FitHeight()
method FitArea (line 110) | public ImageDescriptor FitArea()
method FitUnproportionally (line 119) | public ImageDescriptor FitUnproportionally()
method SetAspectRatio (line 125) | internal ImageDescriptor SetAspectRatio(AspectRatioOption option)
class ImageExtensions (line 135) | public static class ImageExtensions
method Image (line 143) | public static ImageDescriptor Image(this IContainer parent, byte[] ima...
method Image (line 156) | public static ImageDescriptor Image(this IContainer parent, string fil...
method Image (line 168) | public static ImageDescriptor Image(this IContainer parent, Stream fil...
method Image (line 181) | public static ImageDescriptor Image(this IContainer parent, Infrastruc...
method GetBestAspectRatioOptionFromParent (line 202) | internal static AspectRatioOption GetBestAspectRatioOptionFromParent(I...
method Image (line 232) | public static DynamicImageDescriptor Image(this IContainer element, Ge...
method Image (line 253) | public static DynamicImageDescriptor Image(this IContainer element, Fu...
method Image (line 266) | [Obsolete("This element has been changed since version 2023.5. Please ...
method Image (line 273) | [Obsolete("This element has been changed since version 2023.5. Please ...
method Image (line 280) | [Obsolete("This element has been changed since version 2023.5. Please ...
method Image (line 287) | [Obsolete("This element has been changed since version 2023.5. Please ...
method ApplyScaling (line 294) | internal static void ApplyScaling(this ImageDescriptor descriptor, Ima...
FILE: Source/QuestPDF/Fluent/InlinedExtensions.cs
class InlinedDescriptor (line 7) | public sealed class InlinedDescriptor
method InlinedDescriptor (line 11) | internal InlinedDescriptor()
method Spacing (line 21) | public void Spacing(float value, Unit unit = Unit.Point)
method VerticalSpacing (line 30) | public void VerticalSpacing(float value, Unit unit = Unit.Point)
method HorizontalSpacing (line 41) | public void HorizontalSpacing(float value, Unit unit = Unit.Point)
method BaselineTop (line 56) | public void BaselineTop()
method BaselineMiddle (line 64) | public void BaselineMiddle()
method BaselineBottom (line 72) | public void BaselineBottom()
method Alignment (line 81) | internal void Alignment(InlinedAlignment? alignment)
method AlignLeft (line 89) | public void AlignLeft()
method AlignCenter (line 97) | public void AlignCenter()
method AlignRight (line 105) | public void AlignRight()
method AlignJustify (line 113) | public void AlignJustify()
method AlignSpaceAround (line 121) | public void AlignSpaceAround()
method Item (line 132) | public IContainer Item()
class InlinedExtensions (line 140) | public static class InlinedExtensions
method Inlined (line 150) | public static void Inlined(this IContainer element, Action<InlinedDesc...
FILE: Source/QuestPDF/Fluent/LayerExtensions.cs
class LayersDescriptor (line 9) | public sealed class LayersDescriptor
method LayersDescriptor (line 13) | internal LayersDescriptor()
method Layer (line 18) | private IContainer Layer(bool isPrimary)
method Layer (line 40) | public IContainer Layer() => Layer(false);
method PrimaryLayer (line 48) | public IContainer PrimaryLayer() => Layer(true);
method Validate (line 50) | internal void Validate()
class LayerExtensions (line 62) | public static class LayerExtensions
method Layers (line 71) | public static void Layers(this IContainer element, Action<LayersDescri...
FILE: Source/QuestPDF/Fluent/LineExtensions.cs
class LineDescriptor (line 8) | public class LineDescriptor
method LineDescriptor (line 12) | internal LineDescriptor()
method LineColor (line 21) | public LineDescriptor LineColor(Color color)
method LineDashPattern (line 32) | public LineDescriptor LineDashPattern(float[] dashPattern, Unit unit =...
method LineGradient (line 50) | public LineDescriptor LineGradient(Color[] colors)
class LineExtensions (line 63) | public static class LineExtensions
method Line (line 65) | private static LineDescriptor Line(this IContainer element, LineType t...
method LineVertical (line 86) | public static LineDescriptor LineVertical(this IContainer element, flo...
method LineHorizontal (line 99) | public static LineDescriptor LineHorizontal(this IContainer element, f...
FILE: Source/QuestPDF/Fluent/MinimalApi.cs
class Document (line 8) | public sealed class Document : IDocument
method Document (line 10) | static Document()
method Document (line 19) | private Document(Action<IDocumentContainer> contentSource)
method Create (line 28) | public static Document Create(Action<IDocumentContainer> handler)
method WithMetadata (line 36) | public Document WithMetadata(DocumentMetadata metadata)
method WithSettings (line 45) | public Document WithSettings(DocumentSettings settings)
method Merge (line 55) | public static MergedDocument Merge(IEnumerable<IDocument> documents)
method Merge (line 64) | public static MergedDocument Merge(params IDocument[] documents)
method GetMetadata (line 74) | public DocumentMetadata GetMetadata() => Metadata;
method GetSettings (line 79) | public DocumentSettings GetSettings() => Settings;
method Compose (line 84) | public void Compose(IDocumentContainer container) => ContentSource(con...
FILE: Source/QuestPDF/Fluent/MultiColumnExtensions.cs
class MultiColumnDescriptor (line 9) | public sealed class MultiColumnDescriptor
method MultiColumnDescriptor (line 13) | internal MultiColumnDescriptor()
method Spacing (line 25) | public void Spacing(float value, Unit unit = Unit.Point)
method Columns (line 37) | public void Columns(int value = 2)
method BalanceHeight (line 52) | public void BalanceHeight(bool enable = true)
method Content (line 64) | public IContainer Content()
method Spacer (line 81) | public IContainer Spacer()
class MultiColumnExtensions (line 95) | public static class MultiColumnExtensions
method MultiColumn (line 107) | public static void MultiColumn(this IContainer element, Action<MultiCo...
FILE: Source/QuestPDF/Fluent/PaddingExtensions.cs
class PaddingExtensions (line 6) | public static class PaddingExtensions
method Padding (line 8) | private static IContainer Padding(this IContainer element, float top =...
method Padding (line 26) | public static IContainer Padding(this IContainer element, float value,...
method PaddingHorizontal (line 38) | public static IContainer PaddingHorizontal(this IContainer element, fl...
method PaddingVertical (line 50) | public static IContainer PaddingVertical(this IContainer element, floa...
method PaddingTop (line 62) | public static IContainer PaddingTop(this IContainer element, float val...
method PaddingBottom (line 74) | public static IContainer PaddingBottom(this IContainer element, float ...
method PaddingLeft (line 86) | public static IContainer PaddingLeft(this IContainer element, float va...
method PaddingRight (line 98) | public static IContainer PaddingRight(this IContainer element, float v...
FILE: Source/QuestPDF/Fluent/PageExtensions.cs
class PageDescriptor (line 11) | public sealed class PageDescriptor
method PageDescriptor (line 15) | internal PageDescriptor()
method Size (line 25) | public void Size(float width, float height, Unit unit = Unit.Point)
method Size (line 36) | public void Size(PageSize pageSize)
method ContinuousSize (line 48) | public void ContinuousSize(float width, Unit unit = Unit.Point)
method MinSize (line 61) | public void MinSize(PageSize pageSize)
method MaxSize (line 73) | public void MaxSize(PageSize pageSize)
method MarginLeft (line 85) | public void MarginLeft(float value, Unit unit = Unit.Point)
method MarginRight (line 93) | public void MarginRight(float value, Unit unit = Unit.Point)
method MarginTop (line 101) | public void MarginTop(float value, Unit unit = Unit.Point)
method MarginBottom (line 109) | public void MarginBottom(float value, Unit unit = Unit.Point)
method MarginVertical (line 117) | public void MarginVertical(float value, Unit unit = Unit.Point)
method MarginHorizontal (line 126) | public void MarginHorizontal(float value, Unit unit = Unit.Point)
method Margin (line 135) | public void Margin(float value, Unit unit = Unit.Point)
method DefaultTextStyle (line 152) | public void DefaultTextStyle(TextStyle textStyle)
method DefaultTextStyle (line 164) | public void DefaultTextStyle(Func<TextStyle, TextStyle> handler)
method ContentFromLeftToRight (line 174) | public void ContentFromLeftToRight()
method ContentFromRightToLeft (line 184) | public void ContentFromRightToLeft()
method PageColor (line 196) | public void PageColor(Color color)
method Background (line 201) | [Obsolete("This element has been renamed since version 2022.3. Please ...
method Background (line 218) | public IContainer Background()
method Foreground (line 234) | public IContainer Foreground()
method Header (line 250) | public IContainer Header()
method Content (line 266) | public IContainer Content()
method Footer (line 282) | public IContainer Footer()
class PageExtensions (line 295) | public static class PageExtensions
method Page (line 306) | public static IDocumentContainer Page(this IDocumentContainer document...
FILE: Source/QuestPDF/Fluent/RotateExtensions.cs
class RotateExtensions (line 6) | public static class RotateExtensions
method SimpleRotate (line 8) | private static IContainer SimpleRotate(this IContainer element, int tu...
method RotateLeft (line 22) | public static IContainer RotateLeft(this IContainer element)
method RotateRight (line 34) | public static IContainer RotateRight(this IContainer element)
method Rotate (line 44) | public static IContainer Rotate(this IContainer element, float angle)
FILE: Source/QuestPDF/Fluent/RowExtensions.cs
class RowDescriptor (line 9) | public sealed class RowDescriptor
method RowDescriptor (line 13) | internal RowDescriptor()
method Spacing (line 21) | public void Spacing(float spacing, Unit unit = Unit.Point)
method Item (line 29) | private IContainer Item(RowItemType type, float size = 0)
method RelativeColumn (line 41) | [Obsolete("This element has been renamed since version 2022.2. Please ...
method ConstantColumn (line 48) | [Obsolete("This element has been renamed since version 2022.2. Please ...
method RelativeItem (line 63) | public IContainer RelativeItem(float size = 1)
method ConstantItem (line 75) | public IContainer ConstantItem(float size, Unit unit = Unit.Point)
method AutoItem (line 92) | public IContainer AutoItem()
class RowExtensions (line 98) | public static class RowExtensions
method Row (line 111) | public static void Row(this IContainer element, Action<RowDescriptor> ...
FILE: Source/QuestPDF/Fluent/ScaleExtensions.cs
class ScaleExtensions (line 7) | public static class ScaleExtensions
method ScaleValue (line 9) | private static IContainer ScaleValue(this IContainer element, float x ...
method Scale (line 25) | public static IContainer Scale(this IContainer element, float factor)
method ScaleHorizontal (line 39) | public static IContainer ScaleHorizontal(this IContainer element, floa...
method ScaleVertical (line 53) | public static IContainer ScaleVertical(this IContainer element, float ...
method FlipHorizontal (line 68) | public static IContainer FlipHorizontal(this IContainer element)
method FlipVertical (line 80) | public static IContainer FlipVertical(this IContainer element)
method FlipOver (line 92) | public static IContainer FlipOver(this IContainer element)
FILE: Source/QuestPDF/Fluent/SemanticExtensions.cs
class SemanticExtensions (line 8) | public static class SemanticExtensions
method Artifact (line 10) | internal static IContainer Artifact(this IContainer container, int nod...
method SemanticIgnore (line 22) | public static IContainer SemanticIgnore(this IContainer container)
method SemanticTag (line 27) | internal static IContainer SemanticTag(this IContainer container, stri...
method SemanticArticle (line 42) | public static IContainer SemanticArticle(this IContainer container)
method SemanticSection (line 52) | public static IContainer SemanticSection(this IContainer container)
method SemanticDivision (line 62) | public static IContainer SemanticDivision(this IContainer container)
method SemanticBlockQuotation (line 71) | public static IContainer SemanticBlockQuotation(this IContainer contai...
method SemanticCaption (line 80) | public static IContainer SemanticCaption(this IContainer container)
method SemanticIndex (line 89) | public static IContainer SemanticIndex(this IContainer container)
method SemanticLanguage (line 99) | public static IContainer SemanticLanguage(this IContainer container, s...
method SemanticTableOfContents (line 114) | public static IContainer SemanticTableOfContents(this IContainer conta...
method SemanticTableOfContentsItem (line 123) | public static IContainer SemanticTableOfContentsItem(this IContainer c...
method SemanticHeader (line 132) | private static IContainer SemanticHeader(this IContainer container, in...
method SemanticHeader1 (line 144) | public static IContainer SemanticHeader1(this IContainer container)
method SemanticHeader2 (line 152) | public static IContainer SemanticHeader2(this IContainer container)
method SemanticHeader3 (line 160) | public static IContainer SemanticHeader3(this IContainer container)
method SemanticHeader4 (line 168) | public static IContainer SemanticHeader4(this IContainer container)
method SemanticHeader5 (line 176) | public static IContainer SemanticHeader5(this IContainer container)
method SemanticHeader6 (line 184) | public static IContainer SemanticHeader6(this IContainer container)
method SemanticParagraph (line 195) | public static IContainer SemanticParagraph(this IContainer container)
method SemanticList (line 207) | public static IContainer SemanticList(this IContainer container)
method SemanticListItem (line 216) | public static IContainer SemanticListItem(this IContainer container)
method SemanticListLabel (line 225) | public static IContainer SemanticListLabel(this IContainer container)
method SemanticListItemBody (line 234) | public static IContainer SemanticListItemBody(this IContainer container)
method SemanticTable (line 247) | public static IContainer SemanticTable(this IContainer container)
method SemanticSpan (line 261) | public static IContainer SemanticSpan(this IContainer container, strin...
method SemanticQuote (line 270) | public static IContainer SemanticQuote(this IContainer container)
method SemanticCode (line 278) | public static IContainer SemanticCode(this IContainer container)
method SemanticLink (line 287) | public static IContainer SemanticLink(this IContainer container, strin...
method SemanticFigure (line 300) | public static IContainer SemanticFigure(this IContainer container, str...
method SemanticImage (line 309) | public static IContainer SemanticImage(this IContainer container, stri...
method SemanticFormula (line 318) | public static IContainer SemanticFormula(this IContainer container, st...
FILE: Source/QuestPDF/Fluent/ShrinkExtensions.cs
class ShrinkExtensions (line 8) | public static
Condensed preview — 479 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,955K chars).
[
{
"path": ".github/CODE_OF_CONDUCT.md",
"chars": 3349,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": ".github/FUNDING.yml",
"chars": 17,
"preview": "github: QuestPDF\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 728,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n---\n\n**Describe the bu"
},
{
"path": ".github/ISSUE_TEMPLATE/companion_app_feedback.md",
"chars": 578,
"preview": "---\nname: Companion App Feedback\nabout: Suggest an idea for this project\ntitle: ''\nlabels: 'companion-app'\nassignees: ''"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 558,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/SECURITY.md",
"chars": 1627,
"preview": "# Security Policy\n\n## Supported Versions\n| Version | Supported | Scope "
},
{
"path": ".github/workflows/main.yml",
"chars": 5318,
"preview": "name: Build, Test And Create Nuget Package\n\npermissions: {}\n\non:\n push:\n branches: [ main ]\n workflow_dispatch:\n\njo"
},
{
"path": ".gitignore",
"chars": 3496,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "LICENSE.md",
"chars": 6897,
"preview": "# QuestPDF License\n\n## License Selection Guide\n\nWelcome to QuestPDF! This guide will help you understand how to select "
},
{
"path": "README.md",
"chars": 13318,
"preview": "<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/user-attachments/assets/9535de26-aea"
},
{
"path": "Source/.config/dotnet-tools.json",
"chars": 164,
"preview": "{\n \"version\": 1,\n \"isRoot\": true,\n \"tools\": {\n \"dotnet-stryker\": {\n \"version\": \"3.11.1\",\n \"commands\": [\n"
},
{
"path": "Source/.config/stryker-config.json",
"chars": 335,
"preview": "{\n \"stryker-config\":\n {\n \"solution\": \"../QuestPDF.sln\",\n \"project\": \"QuestPDF/QuestPDF.csproj\",\n \"test-projec"
},
{
"path": "Source/.editorconfig",
"chars": 6079,
"preview": "# Rules in this file were initially inferred by Visual Studio IntelliCode from the D:\\GithubRepos\\QuestPDF codebase base"
},
{
"path": "Source/QuestPDF/Build/QuestPDF.targets",
"chars": 455,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n <ItemG"
},
{
"path": "Source/QuestPDF/Build/net4/QuestPDF.targets",
"chars": 392,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n <ItemG"
},
{
"path": "Source/QuestPDF/Companion/CompanionExtensions.cs",
"chars": 3598,
"preview": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusin"
},
{
"path": "Source/QuestPDF/Companion/CompanionModels.cs",
"chars": 4553,
"preview": "using System;\nusing System.Collections.Generic;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestP"
},
{
"path": "Source/QuestPDF/Companion/CompanionService.cs",
"chars": 7779,
"preview": "#if NET6_0_OR_GREATER\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusi"
},
{
"path": "Source/QuestPDF/Companion/Helpers.cs",
"chars": 6583,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing QuestPDF."
},
{
"path": "Source/QuestPDF/Companion/HotReloadManager.cs",
"chars": 560,
"preview": "#if NET6_0_OR_GREATER\n\nusing System;\nusing QuestPDF.Companion;\n\n[assembly: System.Reflection.Metadata.MetadataUpdateHan"
},
{
"path": "Source/QuestPDF/Companion/Previewer.cs",
"chars": 1510,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing QuestPD"
},
{
"path": "Source/QuestPDF/Drawing/DocumentCanvases/CompanionDocumentCanvas.cs",
"chars": 4036,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing QuestPDF.Companion;\nusing QuestPDF.Draw"
},
{
"path": "Source/QuestPDF/Drawing/DocumentCanvases/DiscardDocumentCanvas.cs",
"chars": 667,
"preview": "using QuestPDF.Drawing.DrawingCanvases;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Drawing.DocumentCanvases;\n\nin"
},
{
"path": "Source/QuestPDF/Drawing/DocumentCanvases/ImageDocumentCanvas.cs",
"chars": 3627,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing QuestPDF.Drawing.DrawingCanvases;\nusing"
},
{
"path": "Source/QuestPDF/Drawing/DocumentCanvases/PdfDocumentCanvas.cs",
"chars": 7189,
"preview": "using System;\nusing System.Diagnostics;\nusing System.Linq;\nusing QuestPDF.Drawing.DrawingCanvases;\nusing QuestPDF.Drawi"
},
{
"path": "Source/QuestPDF/Drawing/DocumentCanvases/SemanticDocumentCanvas.cs",
"chars": 669,
"preview": "using QuestPDF.Drawing.DrawingCanvases;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Drawing.DocumentCanvases;\n\nin"
},
{
"path": "Source/QuestPDF/Drawing/DocumentCanvases/SvgDocumentCanvas.cs",
"chars": 2769,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Text;\nusing Que"
},
{
"path": "Source/QuestPDF/Drawing/DocumentCanvases/XpsDocumentCanvas.cs",
"chars": 2682,
"preview": "using System;\nusing System.Diagnostics;\nusing QuestPDF.Drawing.DrawingCanvases;\nusing QuestPDF.Drawing.Exceptions;\nusin"
},
{
"path": "Source/QuestPDF/Drawing/DocumentContainer.cs",
"chars": 1510,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Elements;\nusing QuestPDF.Fluent;\nusin"
},
{
"path": "Source/QuestPDF/Drawing/DocumentGenerator.cs",
"chars": 24099,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Companion;\nusing QuestPDF.Drawing.Docu"
},
{
"path": "Source/QuestPDF/Drawing/DocumentPageSnapshot.cs",
"chars": 831,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Skia;\n\nnamespace QuestPDF.Drawing;\n\nin"
},
{
"path": "Source/QuestPDF/Drawing/DrawingCanvases/DiscardDrawingCanvas.cs",
"chars": 3695,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Numerics;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Sk"
},
{
"path": "Source/QuestPDF/Drawing/DrawingCanvases/ProxyDrawingCanvas.cs",
"chars": 3794,
"preview": "using System;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\nusing QuestPDF.Skia.Text;\n\nnamespace QuestPDF.Drawing."
},
{
"path": "Source/QuestPDF/Drawing/DrawingCanvases/SemanticDrawingCanvas.cs",
"chars": 3695,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Numerics;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Ski"
},
{
"path": "Source/QuestPDF/Drawing/DrawingCanvases/SkiaDrawingCanvas.cs",
"chars": 7479,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\nu"
},
{
"path": "Source/QuestPDF/Drawing/Exceptions/DocumentComposeException.cs",
"chars": 237,
"preview": "using System;\n\nnamespace QuestPDF.Drawing.Exceptions\n{\n public sealed class DocumentComposeException : Exception\n "
},
{
"path": "Source/QuestPDF/Drawing/Exceptions/DocumentDrawingException.cs",
"chars": 377,
"preview": "using System;\n\nnamespace QuestPDF.Drawing.Exceptions\n{\n public sealed class DocumentDrawingException : Exception\n "
},
{
"path": "Source/QuestPDF/Drawing/Exceptions/DocumentLayoutException.cs",
"chars": 235,
"preview": "using System;\n\nnamespace QuestPDF.Drawing.Exceptions\n{\n public sealed class DocumentLayoutException : Exception\n "
},
{
"path": "Source/QuestPDF/Drawing/Exceptions/InitializationException.cs",
"chars": 374,
"preview": "using System;\n\nnamespace QuestPDF.Drawing.Exceptions\n{\n public sealed class InitializationException : Exception\n "
},
{
"path": "Source/QuestPDF/Drawing/FontManager.cs",
"chars": 5724,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing System.Li"
},
{
"path": "Source/QuestPDF/Drawing/Proxy/ElementProxy.cs",
"chars": 141,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Drawing.Proxy\n{\n internal class ElementProxy : ContainerElement\n "
},
{
"path": "Source/QuestPDF/Drawing/Proxy/LayoutDebugging.cs",
"chars": 12680,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Qu"
},
{
"path": "Source/QuestPDF/Drawing/Proxy/LayoutOverflowVisualization.cs",
"chars": 3484,
"preview": "using System;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnamespace QuestPDF.Drawing.Pr"
},
{
"path": "Source/QuestPDF/Drawing/Proxy/LayoutProxy.cs",
"chars": 3253,
"preview": "using System.Collections.Generic;\nusing QuestPDF.Companion;\nusing QuestPDF.Drawing.DrawingCanvases;\nusing QuestPDF.Eleme"
},
{
"path": "Source/QuestPDF/Drawing/Proxy/OverflowDebuggingProxy.cs",
"chars": 796,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Drawing.Proxy;\n\ninternal sealed class OverflowDebuggingProxy : Elemen"
},
{
"path": "Source/QuestPDF/Drawing/Proxy/SnapshotCacheRecorderProxy.cs",
"chars": 2432,
"preview": "using System;\nusing System.Collections.Generic;\nusing QuestPDF.Drawing.DrawingCanvases;\nusing QuestPDF.Helpers;\nusing Qu"
},
{
"path": "Source/QuestPDF/Drawing/Proxy/TreeTraversal.cs",
"chars": 1650,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Drawing.Proxy;\n"
},
{
"path": "Source/QuestPDF/Drawing/SemanticTreeManager.cs",
"chars": 4407,
"preview": "using System;\nusing System.Collections.Generic;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Drawing;\n\ninternal cl"
},
{
"path": "Source/QuestPDF/Drawing/SpacePlan.cs",
"chars": 1556,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Drawing\n{\n internal readonly struct SpacePlan\n {\n publi"
},
{
"path": "Source/QuestPDF/Drawing/SpacePlanType.cs",
"chars": 146,
"preview": "namespace QuestPDF.Drawing\n{\n internal enum SpacePlanType\n {\n Empty,\n Wrap,\n PartialRender,\n"
},
{
"path": "Source/QuestPDF/Elements/Alignment.cs",
"chars": 1982,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class Alignmen"
},
{
"path": "Source/QuestPDF/Elements/ArtifactTag.cs",
"chars": 683,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements;\n\ninternal class ArtifactTag : Conta"
},
{
"path": "Source/QuestPDF/Elements/AspectRatio.cs",
"chars": 3063,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Element"
},
{
"path": "Source/QuestPDF/Elements/Column.cs",
"chars": 5371,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusin"
},
{
"path": "Source/QuestPDF/Elements/Constrained.cs",
"chars": 4111,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing"
},
{
"path": "Source/QuestPDF/Elements/Container.cs",
"chars": 186,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal class Container : ContainerElement\n {\n "
},
{
"path": "Source/QuestPDF/Elements/ContentDirectionSetter.cs",
"chars": 207,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class ContentDirectionSetter : Contai"
},
{
"path": "Source/QuestPDF/Elements/DebugArea.cs",
"chars": 1241,
"preview": "using QuestPDF.Fluent;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnamespace QuestPDF."
},
{
"path": "Source/QuestPDF/Elements/DebugPointer.cs",
"chars": 1136,
"preview": "using System.Collections.Generic;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal enum Docum"
},
{
"path": "Source/QuestPDF/Elements/Decoration.cs",
"chars": 5800,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure"
},
{
"path": "Source/QuestPDF/Elements/DefaultTextStyle.cs",
"chars": 208,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class DefaultTextStyle : ContainerEle"
},
{
"path": "Source/QuestPDF/Elements/Dynamic.cs",
"chars": 9183,
"preview": "using System;\nusing System.Collections.Generic;\nusing QuestPDF.Drawing;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestP"
},
{
"path": "Source/QuestPDF/Elements/DynamicImage.cs",
"chars": 4912,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing QuestPDF.Drawing;\nus"
},
{
"path": "Source/QuestPDF/Elements/DynamicSvgImage.cs",
"chars": 2323,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Fluent;\nusing "
},
{
"path": "Source/QuestPDF/Elements/ElementPositionLocator.cs",
"chars": 1083,
"preview": "using System.Numerics;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal class ElementPositionL"
},
{
"path": "Source/QuestPDF/Elements/Empty.cs",
"chars": 571,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n intern"
},
{
"path": "Source/QuestPDF/Elements/EnsureSpace.cs",
"chars": 1973,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class EnsureS"
},
{
"path": "Source/QuestPDF/Elements/Extend.cs",
"chars": 1571,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed "
},
{
"path": "Source/QuestPDF/Elements/Grid.cs",
"chars": 2494,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Fluent;\nusing QuestPDF.Infrastructure;\n\nnamespace Q"
},
{
"path": "Source/QuestPDF/Elements/Hyperlink.cs",
"chars": 1579,
"preview": "using System.Collections.Generic;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{"
},
{
"path": "Source/QuestPDF/Elements/Image.cs",
"chars": 3493,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnames"
},
{
"path": "Source/QuestPDF/Elements/Inlined.cs",
"chars": 9349,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace "
},
{
"path": "Source/QuestPDF/Elements/Layers.cs",
"chars": 1178,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace "
},
{
"path": "Source/QuestPDF/Elements/Lazy.cs",
"chars": 3330,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Element"
},
{
"path": "Source/QuestPDF/Elements/Line.cs",
"chars": 3339,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nname"
},
{
"path": "Source/QuestPDF/Elements/MultiColumn.cs",
"chars": 8380,
"preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusi"
},
{
"path": "Source/QuestPDF/Elements/Padding.cs",
"chars": 2757,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing"
},
{
"path": "Source/QuestPDF/Elements/Page.cs",
"chars": 4378,
"preview": "using System;\nusing QuestPDF.Fluent;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnamesp"
},
{
"path": "Source/QuestPDF/Elements/PageBreak.cs",
"chars": 940,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n inter"
},
{
"path": "Source/QuestPDF/Elements/Placeholder.cs",
"chars": 1023,
"preview": "using QuestPDF.Fluent;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n intern"
},
{
"path": "Source/QuestPDF/Elements/PreventPageBreak.cs",
"chars": 1457,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class PreventP"
},
{
"path": "Source/QuestPDF/Elements/RepeatContent.cs",
"chars": 3529,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Elements.Text;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing Quest"
},
{
"path": "Source/QuestPDF/Elements/Rotate.cs",
"chars": 838,
"preview": "using System;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed"
},
{
"path": "Source/QuestPDF/Elements/Row.cs",
"chars": 7830,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusin"
},
{
"path": "Source/QuestPDF/Elements/Scale.cs",
"chars": 2509,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusin"
},
{
"path": "Source/QuestPDF/Elements/ScaleToFit.cs",
"chars": 2474,
"preview": "using System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal s"
},
{
"path": "Source/QuestPDF/Elements/Section.cs",
"chars": 1287,
"preview": "using System.Collections.Generic;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed cla"
},
{
"path": "Source/QuestPDF/Elements/SectionLink.cs",
"chars": 1061,
"preview": "using System.Collections.Generic;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{"
},
{
"path": "Source/QuestPDF/Elements/SemanticTag.cs",
"chars": 3635,
"preview": "using System;\nusing System.Text;\nusing QuestPDF.Drawing;\nusing QuestPDF.Drawing.DrawingCanvases;\nusing QuestPDF.Elements"
},
{
"path": "Source/QuestPDF/Elements/ShowEntire.cs",
"chars": 701,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class ShowEnt"
},
{
"path": "Source/QuestPDF/Elements/ShowIf.cs",
"chars": 1524,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements;\n\npublic sealed class "
},
{
"path": "Source/QuestPDF/Elements/ShowOnce.cs",
"chars": 1096,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class ShowOnce"
},
{
"path": "Source/QuestPDF/Elements/Shrink.cs",
"chars": 1431,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed "
},
{
"path": "Source/QuestPDF/Elements/SimpleRotate.cs",
"chars": 2445,
"preview": "using System;\nusing System.Text;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n"
},
{
"path": "Source/QuestPDF/Elements/SkipOnce.cs",
"chars": 999,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class SkipOnc"
},
{
"path": "Source/QuestPDF/Elements/SourceCodePointer.cs",
"chars": 755,
"preview": "using System.Collections.Generic;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements;\n\ninternal sealed class So"
},
{
"path": "Source/QuestPDF/Elements/StopPaging.cs",
"chars": 1006,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed"
},
{
"path": "Source/QuestPDF/Elements/StyledBox.cs",
"chars": 14298,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing;\nusing QuestPDF.Drawing.Drawin"
},
{
"path": "Source/QuestPDF/Elements/SvgImage.cs",
"chars": 1527,
"preview": "using System;\nusing QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnames"
},
{
"path": "Source/QuestPDF/Elements/SvgPath.cs",
"chars": 1078,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnamespace QuestPDF."
},
{
"path": "Source/QuestPDF/Elements/Table/DynamicDictionary.cs",
"chars": 928,
"preview": "using System.Collections.Generic;\nusing System.Linq;\n\nnamespace QuestPDF.Elements.Table\n{\n /// <summary>\n /// This"
},
{
"path": "Source/QuestPDF/Elements/Table/ITableCellContainer.cs",
"chars": 148,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements.Table\n{\n public interface ITableCellContainer : IContaine"
},
{
"path": "Source/QuestPDF/Elements/Table/Table.cs",
"chars": 22140,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing QuestPDF.Drawing;\nus"
},
{
"path": "Source/QuestPDF/Elements/Table/TableCell.cs",
"chars": 561,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements.Table\n{\n internal sealed class TableCell : ContainerEleme"
},
{
"path": "Source/QuestPDF/Elements/Table/TableCellRenderingCommand.cs",
"chars": 336,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements.Table\n{\n internal sealed class Ta"
},
{
"path": "Source/QuestPDF/Elements/Table/TableColumnDefinition.cs",
"chars": 407,
"preview": "namespace QuestPDF.Elements.Table\n{\n internal sealed class TableColumnDefinition\n {\n public float ConstantS"
},
{
"path": "Source/QuestPDF/Elements/Table/TableLayoutPlanner.cs",
"chars": 3477,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace QuestPDF.Elements.Table\n{\n static class"
},
{
"path": "Source/QuestPDF/Elements/Table/TableLayoutValidator.cs",
"chars": 2023,
"preview": "using System.Collections.Generic;\nusing QuestPDF.Drawing.Exceptions;\n\nnamespace QuestPDF.Elements.Table\n{\n static cla"
},
{
"path": "Source/QuestPDF/Elements/Text/Items/ITextBlockItem.cs",
"chars": 102,
"preview": "namespace QuestPDF.Elements.Text.Items\n{\n internal interface ITextBlockItem\n {\n \n }\n}"
},
{
"path": "Source/QuestPDF/Elements/Text/Items/TextBlockElement.cs",
"chars": 846,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements.Text.Items\n"
},
{
"path": "Source/QuestPDF/Elements/Text/Items/TextBlockHyperlink.cs",
"chars": 209,
"preview": "namespace QuestPDF.Elements.Text.Items\n{\n internal sealed class TextBlockHyperlink : TextBlockSpan\n {\n pub"
},
{
"path": "Source/QuestPDF/Elements/Text/Items/TextBlockPageNumber.cs",
"chars": 460,
"preview": "using System;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements.Text.Items\n{\n internal sealed class TextBl"
},
{
"path": "Source/QuestPDF/Elements/Text/Items/TextBlockParagraphSpacing.cs",
"chars": 299,
"preview": "namespace QuestPDF.Elements.Text.Items;\n\ninternal sealed class TextBlockParagraphSpacing : ITextBlockItem\n{\n public f"
},
{
"path": "Source/QuestPDF/Elements/Text/Items/TextBlockSectionLink.cs",
"chars": 251,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements.Text.Items\n{\n internal sealed class TextBlockSectionLink"
},
{
"path": "Source/QuestPDF/Elements/Text/Items/TextBlockSpan.cs",
"chars": 244,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements.Text.Items\n{\n internal class TextBlockSpan : ITextBlockI"
},
{
"path": "Source/QuestPDF/Elements/Text/SkParagraphBuilderPoolManager.cs",
"chars": 1085,
"preview": "using System;\nusing System.Collections.Concurrent;\nusing QuestPDF.Drawing;\nusing QuestPDF.Skia.Text;\n\nnamespace QuestPDF"
},
{
"path": "Source/QuestPDF/Elements/Text/TextBlock.cs",
"chars": 27379,
"preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF."
},
{
"path": "Source/QuestPDF/Elements/Translate.cs",
"chars": 1015,
"preview": "using System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace "
},
{
"path": "Source/QuestPDF/Elements/Unconstrained.cs",
"chars": 1243,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class Unconst"
},
{
"path": "Source/QuestPDF/Elements/ZIndex.cs",
"chars": 440,
"preview": "using QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Elements\n{\n internal sealed class ZIndex : ContainerElement\n {\n"
},
{
"path": "Source/QuestPDF/Fluent/AlignmentExtensions.cs",
"chars": 3135,
"preview": "using QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static class AlignmentE"
},
{
"path": "Source/QuestPDF/Fluent/ColumnExtensions.cs",
"chars": 2018,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace"
},
{
"path": "Source/QuestPDF/Fluent/ComponentExtentions.cs",
"chars": 1088,
"preview": "using System;\nusing System.Linq.Expressions;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF.Elements;\nusing QuestPDF."
},
{
"path": "Source/QuestPDF/Fluent/ConstrainedExtensions.cs",
"chars": 5296,
"preview": "using System;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static cl"
},
{
"path": "Source/QuestPDF/Fluent/ContentDirectionExtensions.cs",
"chars": 1502,
"preview": "using QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static class ContentDir"
},
{
"path": "Source/QuestPDF/Fluent/DebugExtensions.cs",
"chars": 2557,
"preview": "using QuestPDF.Drawing.Exceptions;\nusing QuestPDF.Drawing.Proxy;\nusing QuestPDF.Elements;\nusing QuestPDF.Helpers;\nusing"
},
{
"path": "Source/QuestPDF/Fluent/DecorationExtensions.cs",
"chars": 6087,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF.Elements;\nusing "
},
{
"path": "Source/QuestPDF/Fluent/DocumentOperation.cs",
"chars": 22182,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing QuestPDF.Qpdf;\n\nnamespace QuestPDF.Fluent;\n\n/// <"
},
{
"path": "Source/QuestPDF/Fluent/DynamicComponentExtensions.cs",
"chars": 3153,
"preview": "using QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static class DynamicComp"
},
{
"path": "Source/QuestPDF/Fluent/ElementExtensions.cs",
"chars": 27399,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Net.Mime;\nusing System.Runtime.CompilerServices;\nusin"
},
{
"path": "Source/QuestPDF/Fluent/ExtendExtensions.cs",
"chars": 1661,
"preview": "using QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static class ExtendExte"
},
{
"path": "Source/QuestPDF/Fluent/GenerateExtensions.cs",
"chars": 7949,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropService"
},
{
"path": "Source/QuestPDF/Fluent/GridExtensions.cs",
"chars": 2962,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace"
},
{
"path": "Source/QuestPDF/Fluent/ImageExtensions.cs",
"chars": 13334,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF."
},
{
"path": "Source/QuestPDF/Fluent/InlinedExtensions.cs",
"chars": 4808,
"preview": "using System;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public sealed cl"
},
{
"path": "Source/QuestPDF/Fluent/LayerExtensions.cs",
"chars": 3003,
"preview": "using System;\nusing System.Linq;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastruct"
},
{
"path": "Source/QuestPDF/Fluent/LineExtensions.cs",
"chars": 4004,
"preview": "using System;\nusing System.Linq;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n "
},
{
"path": "Source/QuestPDF/Fluent/MinimalApi.cs",
"chars": 3431,
"preview": "using System;\nusing System.Collections.Generic;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnamespace QuestPDF"
},
{
"path": "Source/QuestPDF/Fluent/MultiColumnExtensions.cs",
"chars": 4497,
"preview": "using System;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\nusing QuestPDF."
},
{
"path": "Source/QuestPDF/Fluent/PaddingExtensions.cs",
"chars": 5009,
"preview": "using QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static class PaddingExt"
},
{
"path": "Source/QuestPDF/Fluent/PageExtensions.cs",
"chars": 12149,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing QuestPDF.Drawing;\nusing QuestPDF.Drawing.Exceptions;\nusing Q"
},
{
"path": "Source/QuestPDF/Fluent/RotateExtensions.cs",
"chars": 1948,
"preview": "using QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static class RotateExte"
},
{
"path": "Source/QuestPDF/Fluent/RowExtensions.cs",
"chars": 4704,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF.Elements;\nusing Q"
},
{
"path": "Source/QuestPDF/Fluent/ScaleExtensions.cs",
"chars": 4309,
"preview": "using System;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static cl"
},
{
"path": "Source/QuestPDF/Fluent/SemanticExtensions.cs",
"chars": 11772,
"preview": "using System;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\nusing QuestPDF.Skia;\n\nnamespace QuestPDF.Fluent;\n\n"
},
{
"path": "Source/QuestPDF/Fluent/ShrinkExtensions.cs",
"chars": 2605,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace "
},
{
"path": "Source/QuestPDF/Fluent/StyledBoxExtensions.cs",
"chars": 13573,
"preview": "using System;\nusing QuestPDF.Elements;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent"
},
{
"path": "Source/QuestPDF/Fluent/SvgExtensions.cs",
"chars": 5041,
"preview": "using System;\nusing System.IO;\nusing QuestPDF.Elements;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\nusing Svg"
},
{
"path": "Source/QuestPDF/Fluent/TableExtensions.cs",
"chars": 12904,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF.El"
},
{
"path": "Source/QuestPDF/Fluent/TextExtensions.cs",
"chars": 22592,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\nusing QuestPD"
},
{
"path": "Source/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs",
"chars": 17412,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\nnamespace "
},
{
"path": "Source/QuestPDF/Fluent/TextStyleExtensions.cs",
"chars": 17298,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Linq;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastr"
},
{
"path": "Source/QuestPDF/Fluent/TranslateExtensions.cs",
"chars": 1598,
"preview": "using QuestPDF.Elements;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Fluent\n{\n public static class TranslateE"
},
{
"path": "Source/QuestPDF/Helpers/CallerArgumentExpression.cs",
"chars": 432,
"preview": "#if !NET6_0_OR_GREATER\n\nnamespace System.Runtime.CompilerServices\n{\n [AttributeUsage(AttributeTargets.Parameter, Allo"
},
{
"path": "Source/QuestPDF/Helpers/ColorParser.cs",
"chars": 3410,
"preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Globalization;\nusing QuestPDF.Infrastructure;\n\nnamespace"
},
{
"path": "Source/QuestPDF/Helpers/Colors.cs",
"chars": 20120,
"preview": "using QuestPDF.Infrastructure;\n\n#pragma warning disable CS1591 // Missing XML comment for publicly visible type or memb"
},
{
"path": "Source/QuestPDF/Helpers/FontFeatures.cs",
"chars": 7221,
"preview": "using System;\n\n#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member\n\nnamespace Ques"
},
{
"path": "Source/QuestPDF/Helpers/Fonts.cs",
"chars": 1293,
"preview": "#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member\n\nnamespace QuestPDF.Helpers\n{"
},
{
"path": "Source/QuestPDF/Helpers/Helpers.cs",
"chars": 8272,
"preview": "using System;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq.Expressions;\nusi"
},
{
"path": "Source/QuestPDF/Helpers/IsExternalInit.cs",
"chars": 488,
"preview": "// Licensed to the .NET Foundation under one or more agreements.\n// The .NET Foundation licenses this file to you under "
},
{
"path": "Source/QuestPDF/Helpers/LicenseChecker.cs",
"chars": 3574,
"preview": "using System;\nusing System.Diagnostics;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Helpers;\n\nstatic class Licens"
},
{
"path": "Source/QuestPDF/Helpers/NativeDependencyCompatibilityChecker.cs",
"chars": 5424,
"preview": "using System;\nusing System.Linq;\nusing System.Runtime.InteropServices;\n\nnamespace QuestPDF.Helpers\n{\n internal sealed"
},
{
"path": "Source/QuestPDF/Helpers/NativeDependencyProvider.cs",
"chars": 5249,
"preview": "using System;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices;\nusing "
},
{
"path": "Source/QuestPDF/Helpers/PageSizes.cs",
"chars": 5512,
"preview": "using System;\nusing QuestPDF.Infrastructure;\n\n#pragma warning disable CS1591 // Missing XML comment for publicly visibl"
},
{
"path": "Source/QuestPDF/Helpers/Placeholders.cs",
"chars": 13301,
"preview": "using System;\nusing System.IO;\nusing System.Linq;\nusing System.Reflection;\nusing QuestPDF.Infrastructure;\nusing QuestPD"
},
{
"path": "Source/QuestPDF/Helpers/TemporaryStorage.cs",
"chars": 1990,
"preview": "using System;\nusing System.IO;\nusing System.Linq;\n\nnamespace QuestPDF.Helpers;\n\ninternal static class TemporaryStorage\n{"
},
{
"path": "Source/QuestPDF/Infrastructure/AspectRatioOption.cs",
"chars": 1301,
"preview": "using QuestPDF.Fluent;\n\nnamespace QuestPDF.Infrastructure\n{\n public enum AspectRatioOption\n {\n /// <summar"
},
{
"path": "Source/QuestPDF/Infrastructure/BoxShadowStyle.cs",
"chars": 1706,
"preview": "using System;\nusing QuestPDF.Helpers;\n\nnamespace QuestPDF.Infrastructure;\n\n/// <summary>\n/// Represents the visual styli"
},
{
"path": "Source/QuestPDF/Infrastructure/Color.cs",
"chars": 3612,
"preview": "using System;\nusing QuestPDF.Helpers;\n\nnamespace QuestPDF.Infrastructure;\n\npublic readonly struct Color\n{\n public uin"
},
{
"path": "Source/QuestPDF/Infrastructure/ContainerElement.cs",
"chars": 1087,
"preview": "using System;\nusing System.Collections.Generic;\nusing QuestPDF.Drawing;\nusing QuestPDF.Elements;\n\nnamespace QuestPDF.In"
},
{
"path": "Source/QuestPDF/Infrastructure/ContentDirection.cs",
"chars": 793,
"preview": "namespace QuestPDF.Infrastructure\n{\n public enum ContentDirection\n {\n /// <summary>\n /// Sets the l"
},
{
"path": "Source/QuestPDF/Infrastructure/DocumentMetadata.cs",
"chars": 3992,
"preview": "using System;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace QuestPDF.Infrastructure\n{\n public sealed class Docume"
},
{
"path": "Source/QuestPDF/Infrastructure/DocumentSettings.cs",
"chars": 3163,
"preview": "using System;\n\nnamespace QuestPDF.Infrastructure\n{\n public sealed class DocumentSettings\n {\n public const "
},
{
"path": "Source/QuestPDF/Infrastructure/Element.cs",
"chars": 978,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing QuestPDF.Drawing;\n\nna"
},
{
"path": "Source/QuestPDF/Infrastructure/EmptyContainer.cs",
"chars": 241,
"preview": "using QuestPDF.Elements;\n\nnamespace QuestPDF.Infrastructure;\n\npublic static class EmptyContainer\n{\n /// <summary>\n "
},
{
"path": "Source/QuestPDF/Infrastructure/FontPosition.cs",
"chars": 138,
"preview": "namespace QuestPDF.Infrastructure\n{\n internal enum FontPosition\n {\n Normal,\n Subscript,\n Sup"
},
{
"path": "Source/QuestPDF/Infrastructure/FontWeight.cs",
"chars": 396,
"preview": "#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member\n\nnamespace QuestPDF.Infrastru"
},
{
"path": "Source/QuestPDF/Infrastructure/HorizontalAlignment.cs",
"chars": 129,
"preview": "namespace QuestPDF.Infrastructure\n{\n public enum HorizontalAlignment\n {\n Left,\n Center,\n Righ"
},
{
"path": "Source/QuestPDF/Infrastructure/IComponent.cs",
"chars": 886,
"preview": "namespace QuestPDF.Infrastructure\n{\n /// <summary>\n /// <para>This interface represents a reusable document fragme"
},
{
"path": "Source/QuestPDF/Infrastructure/IContainer.cs",
"chars": 476,
"preview": "using QuestPDF.Elements;\n\nnamespace QuestPDF.Infrastructure\n{\n /// <summary>\n /// Represents a layout structure w"
},
{
"path": "Source/QuestPDF/Infrastructure/IContentDirectionAware.cs",
"chars": 159,
"preview": "namespace QuestPDF.Infrastructure\n{\n internal interface IContentDirectionAware\n {\n public ContentDirection"
},
{
"path": "Source/QuestPDF/Infrastructure/IDocument.cs",
"chars": 1697,
"preview": "namespace QuestPDF.Infrastructure\n{\n /// <summary>\n /// Represents the document abstraction, including its conten"
},
{
"path": "Source/QuestPDF/Infrastructure/IDocumentCanvas.cs",
"chars": 363,
"preview": "using QuestPDF.Drawing;\n\nnamespace QuestPDF.Infrastructure\n{\n internal interface IDocumentCanvas\n {\n void "
},
{
"path": "Source/QuestPDF/Infrastructure/IDocumentContainer.cs",
"chars": 235,
"preview": "namespace QuestPDF.Infrastructure\n{\n /// <summary>\n /// Represents the primary container encapsulating the entire"
},
{
"path": "Source/QuestPDF/Infrastructure/IDrawingCanvas.cs",
"chars": 1721,
"preview": "using QuestPDF.Drawing;\nusing QuestPDF.Skia;\nusing QuestPDF.Skia.Text;\n\nnamespace QuestPDF.Infrastructure\n{\n internal"
},
{
"path": "Source/QuestPDF/Infrastructure/IDynamicComponent.cs",
"chars": 4170,
"preview": "using System;\nusing QuestPDF.Elements;\n\nnamespace QuestPDF.Infrastructure\n{\n internal sealed class DynamicComponentPr"
},
{
"path": "Source/QuestPDF/Infrastructure/IElement.cs",
"chars": 518,
"preview": "namespace QuestPDF.Infrastructure\n{\n /// <summary>\n /// Represents an element within the document content, for exa"
},
{
"path": "Source/QuestPDF/Infrastructure/IMergedDocument.cs",
"chars": 2769,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace QuestPDF.Infrastructure\n{\n internal en"
},
{
"path": "Source/QuestPDF/Infrastructure/IPageContext.cs",
"chars": 1231,
"preview": "using System.Collections.Generic;\nusing System.Numerics;\n\nnamespace QuestPDF.Infrastructure\n{\n internal sealed class"
},
{
"path": "Source/QuestPDF/Infrastructure/ISemanticAware.cs",
"chars": 164,
"preview": "using QuestPDF.Drawing;\n\nnamespace QuestPDF.Infrastructure;\n\ninternal interface ISemanticAware\n{\n public SemanticTree"
},
{
"path": "Source/QuestPDF/Infrastructure/IStateful.cs",
"chars": 195,
"preview": "namespace QuestPDF.Infrastructure\n{\n internal interface IStateful\n {\n void ResetState(bool hardReset = tru"
},
{
"path": "Source/QuestPDF/Infrastructure/Image.cs",
"chars": 3903,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing QuestPDF.Drawing.Exceptions;\nusing QuestPDF.Help"
},
{
"path": "Source/QuestPDF/Infrastructure/ImageCompressionQuality.cs",
"chars": 847,
"preview": "namespace QuestPDF.Infrastructure\n{\n public enum ImageCompressionQuality\n {\n /// <summary>\n /// JPE"
},
{
"path": "Source/QuestPDF/Infrastructure/ImageFormat.cs",
"chars": 117,
"preview": "namespace QuestPDF.Infrastructure\n{\n public enum ImageFormat\n {\n Jpeg,\n Png,\n Webp\n }\n}"
},
{
"path": "Source/QuestPDF/Infrastructure/ImageGenerationSettings.cs",
"chars": 1222,
"preview": "namespace QuestPDF.Infrastructure\n{\n public sealed class ImageGenerationSettings\n {\n /// <summary>\n "
},
{
"path": "Source/QuestPDF/Infrastructure/ImageScaling.cs",
"chars": 148,
"preview": "namespace QuestPDF.Infrastructure\n{\n public enum ImageScaling\n {\n FitWidth,\n FitHeight,\n Fit"
},
{
"path": "Source/QuestPDF/Infrastructure/ImageSize.cs",
"chars": 283,
"preview": "namespace QuestPDF.Infrastructure\n{\n public readonly struct ImageSize\n {\n public readonly int Width;\n "
},
{
"path": "Source/QuestPDF/Infrastructure/LicenseType.cs",
"chars": 1494,
"preview": "namespace QuestPDF.Infrastructure\n{\n /// <summary>\n /// The QuestPDF library is available under a hybrid license "
},
{
"path": "Source/QuestPDF/Infrastructure/PageContext.cs",
"chars": 2356,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace QuestPDF.Infrastructure\n{\n internal se"
},
{
"path": "Source/QuestPDF/Infrastructure/Position.cs",
"chars": 836,
"preview": "using System;\n\nnamespace QuestPDF.Infrastructure\n{\n internal readonly struct Position\n {\n public readonly "
}
]
// ... and 279 more files (download for full content)
About this extraction
This page contains the full source code of the QuestPDF/library GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 479 files (1.8 MB), approximately 375.8k tokens, and a symbol index with 3132 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.