vb.net 如何使用 PDFsharp 创建表格?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47011519/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 20:21:06  来源:igfitidea点击:

How to create a table using PDFsharp?

vb.netpdfpdfsharpmigradoc

提问by kingraphaii

Just started using PDFsharp and it works fine, but now I want to create tables in my PDF, but tried other sources and found nothing.

刚开始使用 PDFsharp 并且它工作正常,但现在我想在我的 PDF 中创建表格,但尝试了其他来源并没有发现任何东西。

So far I know how to use graph.drawString().

到目前为止,我知道如何使用graph.drawString().

回答by I liked the old Stack Overflow

With PDFsharp: draw text, draw lines around it.

使用 PDFsharp:绘制文本,在其周围绘制线条。

With MigraDoc (you already added that tag): add a Table to your document and add the columns, rows, and borders you need.

使用 MigraDoc(您已经添加了该标签):将表格添加到您的文档并添加您需要的列、行和边框。

The MigraDoc samples that come with MigraDoc are all C#, but a VB.NET sample can be found on the forum.

MigraDoc 附带的 MigraDoc 示例都是 C# 的,但可以在论坛上找到 VB.NET 示例。

VB.NET sample on official PDFsharp/MigraDoc forum:
http://forum.pdfsharp.net/viewtopic.php?f=8&t=3207

官方 PDFsharp/MigraDoc 论坛上的 VB.NET 示例:http: //forum.pdfsharp.net/viewtopic.php?f=8&t=3207

C# sample on official site that shows usage of tables:
http://pdfsharp.net/wiki/Invoice-sample.ashx

显示表格用法的官方网站上的 C# 示例:http:
//pdfsharp.net/wiki/Invoice-sample.ashx