pdfsharp

Either 'GDI', 'WPF' or 'SILVERLIGHT' must be defined how to remove this error?

[亡魂溺海] 提交于 2019-12-14 03:27:34
问题 I have been working on a project in Visual Studio, C# language and I found an error described above. How can I remove this error? "Either 'GDI', 'WPF' or 'SILVERLIGHT' must be defined" 回答1: Open the project properties for the project that throws the error (Alt+Enter in VS Solution Explorer), go to the Build tab and enter the symbol you want into the "Conditional compilation symbols" field. Enter one of the three values. It seems the value got lost. I cannot tell you which value got lost.

PDFSharp WPF 1.32 private fonts will not work with Azure Blob storage

不想你离开。 提交于 2019-12-13 18:14:50
问题 I have some code that adds text using a private font to a PDF file using PDFSharp. This works successfully if the font is located on the local file system but does not work when I provide it with a url to a font stored on a Azure blog storage. I also tried using a google font on their CDN, which also didn't work. Is there some problem with loading fonts from a web url? The sample code is below. Note that I have solved the CORS issue on Azure blob storage so it isn't that. private readonly

pdfsharp in visual c++

那年仲夏 提交于 2019-12-13 00:55:55
问题 I am new to visual c++. I am trying to save a label as pdf file in visual c++. I linked pdfsharp dll by add resources from properties. When i run the .exe file in my system, it doesnt give any error. But when the .exe is run in other systems it gives error telling "could not load file or assembly 'pdfSharp, version=1.31.1789.0, culture = neutral, publicKeytoken= f94615aa0424f9eb' or one of its dependencies" But when i add the pdfsharp in the folder where this .exe stays, it doesnt give any

Does PDFsharp with MigraDoc support HTML syntax?

為{幸葍}努か 提交于 2019-12-12 18:24:43
问题 Does PDFsharp with MigraDoc support HTML syntax? <a> <strong> etc. If yes, how can I implement it on the document? 回答1: No, it doesn't support HTML directly. You have to write a code that reads the HTML and create the PDF using either MigraDoc or PdfSharp. To create the PDF, you need to use the API, for instance: .AddPage(...) , .Draw(...) , .DrawRectangle(...) You have a full example here. You can also use this project to convert HTML to PDF: https://wkhtmltopdf.org/ 回答2: For example: para1

Creating multiple pages with PDFsharp using C#

二次信任 提交于 2019-12-12 07:04:19
问题 I am using PDFsharp to create a PDF page. This works very well for a document with just one page. There will be a situation where the rows will need to fill up two pages. Whenever the number of lines is equal to 20, I will like to create a new page and write the remaining content to it. This code writes content on the first page but once the number of lines equals 20 it will continue to write on the first page and not go to the second. How do I fix this please? PdfDocument document = new

How to make room for the header on PDF document?

倖福魔咒の 提交于 2019-12-12 05:48:31
问题 This is a follow up of this other question. I have an image and text on the header of a PDF document created with MigraDoc. Problem is that content that should be below header is placed over the header partially, hiding part of the header content (they overlap vertically, table starts before header finishes). How to force a table control to make room to all header content? 回答1: You have to "protect" your header by setting header position and top margin as needed. It's up to you to determine

how to Add Input Text Field to Pdf (AcroForm) with PDFSharp

Deadly 提交于 2019-12-11 18:35:09
问题 it's should be simple but i couldn't find the answer anywhere in google or the source documentation. someone have asked the same question 4 years ago, but still no one answered! if it's not possible. can someone please confirm, so that i can find another pdf generator library that can do that. because it's very important in my case to be able to generate pdf with input capability thanks! 回答1: We will go through the step by step First you need to create object of PdfReader PdfReader pdfReader

Alter Links to Other PDF Documents

时光毁灭记忆、已成空白 提交于 2019-12-11 08:59:35
问题 We have a ton of pdf documents that each have links that open other pdf documents. When clicking on the links it will open up the other pdf document in the same file system. The problem is that we need to change the name of some of the directories which will require the changing of all the links that point to pdf documents in that directory. We would do this manually but there are literally thousands of links that need to be alter. We have tried to use iTextSharp and PdfSharp to alter the

PdfSharp - Getting started

╄→гoц情女王★ 提交于 2019-12-11 08:44:18
问题 I have a C# console application and would like to add some of the functionality of PdfSharp to it. I've downloaded both zip files from Sourceforge ... both the assemblies and the source code. There seem to be a couple of ways to add the functionality a reference to the .dll file in the unzipped assemblies folder. actually add the projects to my solution. I'm trying to use the latter method. Is this all I need to do? I copied and pasted the folder "PdfSharp" from the unzipped source code file

Find a word in PDF using PDFSharp

老子叫甜甜 提交于 2019-12-11 05:37:21
问题 I am using PDFSharp. I need help. I need to check wether the document contains the word "abc". Example: 11abcee = true 444abcggw = true 778ab = false I wrote this code, but it does not work as expected: PdfDocument document = PdfReader.Open("c:\\abc.pdf"); PdfDictionary dictionary = new PdfDictionary(document); string a = dictionary.Elements.GetString("MTZ"); if (a.Equals("MTZ")) { MessageBox.Show("OK", ""); } else { MessageBox.Show("NO", ""); } Am I missing something? 回答1: maybe this SO