Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The position of pageBuilderAddText is incorrect #912

Open
Charltsing opened this issue Oct 4, 2024 · 0 comments
Open

The position of pageBuilderAddText is incorrect #912

Charltsing opened this issue Oct 4, 2024 · 0 comments
Labels
bug document-editing Related to creating or editing/modifying documents

Comments

@Charltsing
Copy link

Charltsing commented Oct 4, 2024

yb.zip
1

i try code
捕获

using (PdfDocument pdf = PdfDocument.Open(fullname))
{
    PdfDocumentBuilder builder = new PdfDocumentBuilder { };
    PdfDocumentBuilder.AddedFont font = builder.AddStandard14Font(Standard14Font.Helvetica);

    PdfPageBuilder pageBuilder = builder.AddPage(pdf, 1);  
    pageBuilder.SetStrokeColor(0, 255, 0);

    pageBuilder.AddText("TEST Y=-20", 6, new PdfPoint(50, -20), font);
    pageBuilder.AddText("TEST X=0,Y=0", 6, new PdfPoint(0, 0), font);
    pageBuilder.AddText("TEST X=-20", 6, new PdfPoint(-20, 20), font);
    pageBuilder.AddText("TEST X=-50", 6, new PdfPoint(-50, 50), font);
    pageBuilder.AddText("TEST X=-100", 6, new PdfPoint(-100, 100), font);
    pageBuilder.AddText("TEST X=-200", 6, new PdfPoint(-200, 200), font);
    pageBuilder.AddText("TEST X=-300", 6, new PdfPoint(-300, 300), font);
    pageBuilder.AddText("TEST X=-400", 6, new PdfPoint(-400, 400), font);
    pageBuilder.AddText("TEST X=-450", 6, new PdfPoint(-450, 450), font);
}

@BobLd BobLd added document-editing Related to creating or editing/modifying documents bug labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug document-editing Related to creating or editing/modifying documents
Projects
None yet
Development

No branches or pull requests

2 participants