abcpdf

Symbol font on ABCpdf

旧时模样 提交于 2019-12-30 09:39:47
问题 I'm using the ABCpdf.net component to convert HTML to PDF. Some of the HTML uses the Symbol font to display certain characters. Unfortunately, we are consuming the HTML from a third-party, and it cannot be changed. My development environment displays the font correctly, but my production environment will not. It acts as though the font is not installed, even though it is. If I render the same HTML in Internet Explorer on the production environment, it displays just fine. I have tried

download html file as pdf using abcpdf

不想你离开。 提交于 2019-12-30 07:24:27
问题 How can I download an HTML file as a PDF using abcpdf in ASP.Net, C#? 回答1: The following ASP.NET example in C# shows how you might create a PDF from a web page and stream it to a web browser... <% @Page Language="C#" %> <% @Import Namespace="WebSupergoo.ABCpdf7" %> <% Doc theDoc = new Doc(); theDoc.AddImageUrl("http://www.example.com"); byte[] theData = theDoc.GetData(); Response.Clear(); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "inline; filename

Extra blank page when converting HTML to PDF using abcPDF

我的梦境 提交于 2019-12-30 03:09:10
问题 I have an HTML report, with each print page contained by a <div class="page"> . The page class is defined as width: 180mm; height: 250mm; page-break-after: always; background-position: centre top; background-image: url(Images/MainBanner.png); background-repeat: no-repeat; padding-top: 30mm; After making a few changes to my report content, when I call abcPDF to convert the report to PDF, suddenly I'm getting a blank page inserted after every real report page. I don't want to roll back the

Converting PDF to Grayscale pdf using ABC PDF

谁说我不能喝 提交于 2019-12-25 18:35:15
问题 I am trying convert PDF to grayscale(Black/White) PDF using Websupergoo ABCpdf. I am referring http://www.websupergoo.com/helppdfnet/source/8-abcpdf.operations/3-recoloroperation/1-methods/recolor.htm?q=recoloroperation Doc theDoc = new Doc(); theDoc.Read(Server.MapPath("src.pdf")); int pages = theDoc.PageCount; MyOp.Recolor(theDoc, (WebSupergoo.ABCpdf8.Objects.Page)theDoc.ObjectSoup[theDoc.Page]); //Here problem theDoc.Save(Server.MapPath("greyscale1.pdf")); theDoc.Clear(); Above code works

Export Doc to PDF Asp.net

拥有回忆 提交于 2019-12-25 03:09:03
问题 So I am using this code, to export a formview to Word. Its works great..But I want it to export to PDF so that it cannot be edited. Or may be to a word doc so that not body can make changes. protected void Button1_Click(object sender, EventArgs e) { Response.Clear(); Response.Buffer = true; Response.AddHeader("content-disposition", "attachment;filename=Report.doc"); Response.Charset = ""; Response.ContentType = "application/vnd.ms-word"; StringWriter sw = new StringWriter(); HtmlTextWriter hw

ABCpdf, render an HTML within a “template”: How to add margin?

限于喜欢 提交于 2019-12-25 02:58:12
问题 I'm trying to render an HTML within a predefined PDF-template (e.g. within a frame.) The template/frame should reach the edges. But the HTML shouldn't do that. So I need some kind of margin for the HTML only. Here is my code so far: var doc = new Doc(); doc.MediaBox.String = "A4"; doc.Rect.String = doc.MediaBox.String; var id = doc.AddImageUrl(url.ToString()); doc.AddImageDoc("template.pdf", 1, doc.MediaBox); while (doc.Chainable(id)) { doc.Page = doc.AddPage(); id = doc.AddImageToChain(id);

ABCpdf 5 Problems with encoding (special characters)

拥有回忆 提交于 2019-12-24 10:02:14
问题 I am using ABCpdf Version 5 in order to render some html-pages into PDFs. I basically use HttpServerUtility.Execute() - Method in order to retrieve the html for the pdf: System.IO.StringWriter writer = new System.IO.StringWriter(); server.Execute(requestUrl, writer); string pageResult = writer.ToString(); WebSupergoo.ABCpdf5.Doc pdfDoc = new WebSupergoo.ABCpdf5.Doc(); pdfDoc.AddImageHtml(pageResult); response.Buffer = false; response.ContentType = "application/pdf"; response.AddHeader(

Creating radio button through abcpdf

半世苍凉 提交于 2019-12-24 02:56:21
问题 I'm trying to add a radio button to a pdf page I'm rendering through abcpdf. I'm looking at the documentation for abcpdf and it specifies that I use the following code Doc theDoc = new Doc(); InteractiveForm form = new InteractiveForm (theDoc); form.AddRadioButtonGroup(new string[2]{"40 610 80 650", "40 660 80 700"}, "RadioGroupField", 0); The problem is that I don't know what assembly InteractiveForm is referencing so the compiler will error on that line. If I simply add a radiobutton to the

Why did ABCPdf code start generating a Window Error 5

梦想的初衷 提交于 2019-12-22 10:36:49
问题 I have had some long standing code which has worked fine for quite some time. Recently it began generating the following error. 1st on a asp site and later on a .Net MVC site. Neither of which have changed. I really curious as to why the this error now is rising. I am hoping this post will be of use to someone in the future since the solution was difficult to find searching the error itself. Error: ABCpdf error '80070000' Unable to render HTML. Unable to get printer device-mode size.

Tell abcPdf to scale the html to fit on a single pdf page

泪湿孤枕 提交于 2019-12-18 17:03:17
问题 I am using abcPdf to convert an HTML report into a pdf file. The pdf has to be a single landscape A4 page. Do you know if there is any way to tell abcPdf to scale the HTML page to fit on a single page in the pdf? I tried using the Magnify() method, and it scales the content but still breaks it into pages, even though it would fit on one page. I've been scratching my head on this for a while now, and am wondering if anyone has done it. Here's the code I'm using at the moment: public byte[]