Comments (5)
My preference for this season would be:
:-)
But for the rest of the year I think your proposal is a good one.
Just one remark/question: Is the padding supposed to be to the centerline of the border or to the edge of the border? In the picture you posted it appears to be the centerline:
![image](https://private-user-images.githubusercontent.com/34062862/292621707-6545054c-8b6f-4897-b55e-48a190f8cfb2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDUwMjcxMzQsIm5iZiI6MTcwNTAyNjgzNCwicGF0aCI6Ii8zNDA2Mjg2Mi8yOTI2MjE3MDctNjU0NTA1NGMtOGI2Zi00ODk3LWI1NWUtNDhhMTkwZjhjZmIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAxMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMTEyVDAyMzM1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzMTNkM2Y5MzQ0MWM5YjExM2YxNDcxNzg1YmI2M2ZmZTY1YmQyZTFhMTlmNjI3ODZjYmRlYzFmOTZlYzFlODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.WGJ0Cph2CFS0ZWq_r20tySv3scVtDG0TnJgzvKj5yJ0)
from fpdf2.
When the outer border width is not specified then I think the border should be fragmented.
I don't think there was really a use case for the combination of outer border width and padding when I implemented it. Having it continuous would be more efficient.
from fpdf2.
Hi @mjasperse and thank you for this report! 👍
To me this seems like a bug.
I looked at the existing test reference PDF files, and to me it would make more sense for them to have an "unbroken" outer border.
Pinging @RubendeBruin about this, as he contributed most of the padding implementation, and may have extra useful information to share regarding this 😊
But it'd be nice to see how you fixed that, so feel free to submit a PR!
from fpdf2.
Before I submit a PR, I want to check what you think of the following change to handle this combination of options:
This adds the gutter space inside the outer border, which is compatible with how HTML renders tables with nonzero border-spacing
.
from fpdf2.
@RubendeBruin thanks for the observation! I added a padding amount of outer_border_width/2
so that the spacing is more consistent as you pointed out.
from fpdf2.
Related Issues (20)
- Currently failing unit tests in the GitHub Actions pipeline HOT 5
- Can i change the vertical space between lines inside a table? HOT 8
- Creating Links in Table Cells HOT 10
- adding an SVG image displays a black square HOT 6
- Pillow Import Issue when using custom FPDF2 Layer in AWS Lambda HOT 4
- TypeError: FPDF.set_fill_color() takes from 2 to 4 positional arguments but 5 were given HOT 8
- Place image in a background page HOT 8
- Table header override style is not working HOT 4
- SVG inside table cell is stretched forcefully HOT 6
- Leading spaces on new lines ignored in <pre><code> tags HOT 7
- Tables with multiple header rows and merging cells HOT 4
- Test failure in test_share_images_cache on fast computers HOT 1
- Sections must have a style HOT 2
- Long HTML list entries are not correctly indented HOT 24
- HTML blockquotes are not indented HOT 1
- Combination of set_text_shaping and offset_rendering causing error HOT 5
- `KeyError: '{http://www.w3.org/2000/svg}path'` when using an svg HOT 4
- Error when using multi-page tables in table of contents placeholder HOT 5
- Headings and Title styles HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fpdf2.