Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

VariableBorder cell renders border differently from nonVariableBorder cell

Aperta
#1,207 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Start in OpenPDF’s PdfPCell border rendering code and trace how useVariableBorders(true) changes border placement compared with the normal path. Reproduce the report with the supplied two-cell example on OpenPDF 2.0.3, then locate or add a regression test for the differing border positions. Done means both cells render identical borders; the issue names no source file or test, so finding the right entry point takes project exploration.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Describe the bug

useVariableBorder(true) causes a cell to render its border slightly inward compared to a nonVariableBorder counterpart (See image below)

VariableBorders
To Reproduce

This code was used to generate the image above

PdfPTable table = new PdfPTable(2);
table.setWidthPercentage(100f);
			
PdfPCell cell = new PdfPCell(new Phrase("Variable Borders"));
cell.setBorderWidth(5);
cell.setUseVariableBorders(true);
cell.setUseBorderPadding(true); //This is to prevent the text from getting squashed by the border - The issue is replicable without this line
			
PdfPCell normalCell = new PdfPCell(new Phrase("Non Variable Borders"));
normalCell.setBorderWidth(5);
normalCell.setUseBorderPadding(true);
normalCell.setUseBorderPadding(true); 
			
table.addCell(cell);
table.addCell(normalCell);
doc.add(table);
Expected behavior

I would expect both of these cell borders to be identical, as the only thing differing from these cells, aside from the text, is the isVariableBorders boolean

System
  • OS: Windows
  • Used font: Default font
  • OpenPDF version: 2.0.3

Your real name

Steven Streasick

Lingua principale
Java
Stelle
4.4k
Fork
714
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LibrePDF/OpenPDF

Tutte le issue di LibrePDF/OpenPDF

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.