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

Copying text will add more space #1258

Open
consiststh opened this issue Jan 13, 2025 · 0 comments
Open

Copying text will add more space #1258

consiststh opened this issue Jan 13, 2025 · 0 comments
Labels

Comments

@consiststh
Copy link

Describe the bug

After adding the word according to the coordinate of the word, there will be an extra space after some words are copied.

To Reproduce

Code to reproduce the issue

Some core code:
BaseFont baseFont = BaseFont.createFont(curFontPath, BaseFont.IDENTITY_V, BaseFont.EMBEDDED);
PdfContentByte cb = writer.getDirectContentUnder();
cb.beginText();
cb.setFontAndSize(baseFont, fontHeight);
cb.setGState(gState);
cb.showTextAligned(PdfContentByte.ALIGN_LEFT, txt, x, y, 0);
cb.endText();

Expected behavior

We want the copied word to have no Spaces

Screenshots

image
郝𭣣 忠𫠡 陵

System

  • Used font:Inconvenient to provide
  • OpenPDF version:1.4.2
@consiststh consiststh added the bug label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant