问题标签 [migradoc]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3187 浏览

fonts - 在 Migradoc 中嵌入字体

像往常一样,网络上有很多关于此的帖子,但这些都没有帮助...我使用 windows 和 Migradoc Version = "1.32.3885.0"

要生成 pdf,我创建了一个文档。

然后我用字体定义文档的样式

然后我添加我的部分、段落等并按如下方式打印 pdf

这工作正常。但是,从设计师那里我得到了另一种字体,它没有安装在我的电脑上。我安装了 .otf 文件(它是 HelveticaNeueLTStd-Cn.otf 和其他两个版本的 HelveticaNeueLT)。我可以在所有程序(例如 MSWord)中使用新安装的字体,但我不能在我的文档中使用它们。我得到错误

我可以直接从 c# 加载字体(不是安装的,而是源代码)

但我不知道如何将它嵌入到我的 Migradoc 文档中......

所以问题是:如何在 MigraDoc 文档中使用 .otf 字体来生成 pdf(在 Windows 机器上)?

谢谢。

0 投票
1 回答
1176 浏览

c# - Migradoc 页脚注释跳过第一页

一切都很顺利,直到客户说他希望 pdf 的第一页成为封面。这意味着第一页应该没有边距,而下一页应该没有边距。我继承了所有导出文件的基类在它的构造函数中具有:

我注意到,即使我评论脚注部分,没有任何变化,我仍然得到脚注编号。因此,在这种格式下,所有页面都会获得边距。如果我把它们拿出来,封面看起来很完美,但其余的页面却没有。但是我想在每一个导出的项目上我都可以做缩进或其他事情,还不知道,也许有人也可以对此有所了解......但是可以摆脱页码,更重要的是,怎么能我跳过了第一页(封面)的编号?真的希望有人能帮忙。谢谢

0 投票
2 回答
1439 浏览

vb.net - Winform - Label Printing?

I am working on an application in which I need to print labels ranging from 1"x3" up to 8"x10". The text and images that will be printed on the labels is defined in a xml file that contains all needed info including its location on the label as defined by the top-left xy coordinate. I do not want to preview the print job, just send it to the printer on command. My question is, what is the preferred method for doing this?

I have toyed around with 2 different methods.

Method one: Reading the xml and locating the items on a form, creating an image of the form and then printing it. This works but it just seems a bit hokey?? I have to display the form for a second to create the image and I really do not want to do that.

Method two: I have looked into using MigraDoc to create a label document and then sending it to the printer. This approach will create the form and send it to the printer without being displayed however, I do not see how I can locate the items within the document based on xy coordinates?? Maybe I have missed something here but everything seems to be section and paragraph driven.

What would be the best/easiest way to accomplish this?

0 投票
2 回答
3014 浏览

c# - MigraDoc 图表中数据值的不同颜色

我在 C# 应用程序中使用 MigraDoc 创建了以下图表:

现在假设我想成为 bar A inColors.AliceBlue和 bar B in Colors.DarkGray。我怎样才能做到这一点?是否可以通过官方API?还是我必须破解 MigraDoc?

0 投票
3 回答
13508 浏览

c# - MigraDoc C# Align left and right on same line

I have a table with a cell where i want two texts, the first, aligned on left and the second aligned on the right, in the same cell, on the same line.

I tried to reproduce this cell with MigraDoc without success. I only can add two texts aligned on left and right but not on same line.

Here my code:

A solution is presented here (http://forum.pdfsharp.net/viewtopic.php?f=2&t=2373) but I'm not able to do same with my table. I don't understand how it work.

Edit : Partial solution :

After a hard work to understand how it work, my code is partially working. partial because the only way I found to right align is to creat a TabStop with an approximative value... not fine.

It work but how to find the good value for the AddTab function ? I put 67 because 68to70 is not working.

0 投票
1 回答
413 浏览

fonts - 将 System.Drawing.Font 转换为 MigraDoc.DocumentObjectModel.Font?

想知道为什么我不能将 System.Drawing.Font 转换为 MigraDoc.DocumentObjectModel.Font。我需要在我的应用程序中加载特定的字体。我想通过这样的样式来做到这一点:

或者更好的是,我可以以某种方式轻松创建 MigraDoc 字体吗?

找到了一个关于如何向 MigraDoc 添加字体的链接,但它并没有真正帮助我 http://www.pdfsharp.net/wiki/PrivateFonts-sample.ashx

0 投票
2 回答
2070 浏览

c# - PdfSharp/MigraDoc - 如何对段落的一部分进行着色

Paragraph有没有办法在 PdfSharp/MigraDoc 中对 a 的一部分(例如,只是一个词)应用阴影?我尝试添加Style带有阴影的aDocument然后将样式名称传递给该AddFormattedText方法,但它只从样式中获取字体信息。

谢谢,

0 投票
1 回答
1877 浏览

c# - 如何使用资源中的位图而不是文件(migradoc)?

如何使用例如资源中的位图而不是类中的物理图像文件MigraDoc.DocumentObjectModel.Tables.Cell

在方法 public Image AddImage(string fileName);

0 投票
1 回答
863 浏览

nuget - PDFsharp-MigraDoc-WPF nuget 包

我正在寻找PDFsharp-MigraDoc-WPF Nuget 包。pdfsharp 站点表明该包存在,但它不存在于 Nuget 库中:那里只有一个GDI 包。按名称尝试Install-Package失败。

是否需要进行配置更改(例如,指向发布 PDFsharp-MigraDoc-WPF 的公司的另一台 nuget 服务器)才能获取包?

0 投票
1 回答
14196 浏览

c# - 带表格的 Migradoc 标头

我可以像这样在 Migradoc 中创建一个标题:

我可以制作一个像这样的简单表格:

如何将表格放入标题中,使其出现在每一页的顶部?

编辑:所以为了让它工作,我改变了:

至: