pdf-conversion

Convert HTML file to PDF file using ITextSharp

心不动则不痛 提交于 2019-12-03 08:09:23
I'd like to accomplish the following: Given the path name of an html file, and the desired pathname of a pdf file, convert the HTML file to PDF using ITextSharp. I've seen plenty of code samples which do close to this but not exactly what I need. I believe my solution will need to use the iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList() function but I'm having trouble getting this to work with an actual HTML file and outputting an actual PDF file. public void GeneratePDF(string htmlFileName, string outputPDFFileName) {...} is the function I'd really like to get working properly.

Convert HTML to PDF in ASP.NET MVC

女生的网名这么多〃 提交于 2019-12-03 07:43:58
Im working in a project which requires current html page to convert in pdf and that pdf will automatically save on button click on server and its reference will be save in database.I can convert the view if its data comes from data base but the data in this form is static that means on the view it has so many radio button and text box in which i can write the detail and check the check box on after clicking save button it will save on the server and and its reference will save in the data base. the reason is that im not saving the data in database is that the report is less use full for the

SWFTools Segmentation Fault

懵懂的女人 提交于 2019-12-02 10:41:41
问题 I am getting a Segmentation fault (core dumped) error when converting a PDF to SWF using the pdf2swf from swftools. Has anyone come across this or knows what could be wrong. The notices I get before the error are: NOTICE File contains jpeg pictures NOTICE file contains soft masks NOTICE file contains forms NOTICE file contains transparency groups Segmentation fault (core dumped) This may be impossible to help me but worth a shot. 回答1: And try running pdf2swf with "-O 1" flag. 回答2: use gdb and

Unable to Export HTML Markup to PDF using iTextSharp API in asp.net using C#?

强颜欢笑 提交于 2019-12-02 08:29:51
I have an HTML markup which has HTML Table and Images in it. I am using iTextSharp API to convert the HTML markup to PDF . But, unfortunately the iTextSharp fails to export the HTML markup containing the Images & Table to PDF. Error:The network path was not found. Result must be: Code: using iTextSharp.text; using iTextSharp.text.pdf; using iTextSharp.text.html; using System.Data.SqlClient; using System.Text; using iTextSharp.text.html.simpleparser; public string strSelectUserListBuilder = @" <div style='width: 50%; border: 1 solid #000000; padding-bottom: 100; padding-left: 100; padding-right

SWFTools Segmentation Fault

你离开我真会死。 提交于 2019-12-02 04:05:52
I am getting a Segmentation fault (core dumped) error when converting a PDF to SWF using the pdf2swf from swftools. Has anyone come across this or knows what could be wrong. The notices I get before the error are: NOTICE File contains jpeg pictures NOTICE file contains soft masks NOTICE file contains forms NOTICE file contains transparency groups Segmentation fault (core dumped) This may be impossible to help me but worth a shot. And try running pdf2swf with "-O 1" flag. use gdb and attach to the core dump and see what happened... Check dmesg and you will probably see something similar to:

Best setting for scanners for scanning documents(TIFF and PDF) [closed]

风流意气都作罢 提交于 2019-12-01 13:02:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . What are the best settings for scanner in order to scan documents(white & black text) and use them for OCR conversion(for best results) and what are standard settings and specification for PDF and TIFF format ? 回答1: For OCR, best scanning settings are: 300 dpi resolution for regular text, 400 dpi resolution for

How to convert a PDF to grayscale from command line avoiding to be rasterized?

纵饮孤独 提交于 2019-11-28 23:19:58
I'm trying to convert to grayscale this PDF: https://dl.dropboxusercontent.com/u/10351891/page-27.pdf Ghostscript (v 9.10) with pdfwrite Device fails with a "Unable to convert color space to Gray, reverting strategy to LeaveColorUnchanged." message. I'm able to convert it through an intermediary ps file (using gs, pdftops (v 0.24.3) or pdf2ps) but this convertion rasterize the whole PDF. I tryed a lot of other things: normalize the PDF using qpdf (v 5.0.1) or pdftk (v 1.44), transform it to a svg file and back to a PDF via Inkscape (v 0.48.4)... nothing seems to work. The only one solution I

ImageMagick convert pdf to jpeg has poor text quality after upgrading ImageMagick version to 6.7.8

◇◆丶佛笑我妖孽 提交于 2019-11-28 17:14:51
After upgrading ImageMagick text quality got degraded when convert pdf to jpeg: Old image New Image Conversion command: convert foo.pdf foo.jpeg Old ImageMagick version: [root@home]# convert -version Version: ImageMagick 6.2.8 05/07/12 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC generated files size: -rw-r--r-- 1 root root 139K Apr 2 16:11 foo-0.jpeg -rw-r--r-- 1 root root 130K Apr 2 16:11 foo-1.jpeg -rw-r--r-- 1 root root 334K Mar 24 14:27 foo.pdf After upgrading ImageMagick [root@home]# convert -version Version: ImageMagick 6

Converting windows form in C# to PDF using PdfSharp

青春壹個敷衍的年華 提交于 2019-11-28 09:59:50
问题 I am trying to convert the current contents of a C# windows form to a pdf document. I am using the PDFSharp dll to do the conversion, I am not sure of how to capture the windows form and convert it to a PDF. I gather I should use the XGraphics.DrawImage() method to copy the contents of the windows form. Any help or suggestions would be appreciated! 回答1: You could first Capture screenshot of active window? and then pass the image into PDFSharp like: var doc = new PdfDocument(); var oPage = new

How to convert a PDF to grayscale from command line avoiding to be rasterized?

我怕爱的太早我们不能终老 提交于 2019-11-27 14:41:09
问题 I'm trying to convert to grayscale this PDF: https://dl.dropboxusercontent.com/u/10351891/page-27.pdf Ghostscript (v 9.10) with pdfwrite Device fails with a "Unable to convert color space to Gray, reverting strategy to LeaveColorUnchanged." message. I'm able to convert it through an intermediary ps file (using gs, pdftops (v 0.24.3) or pdf2ps) but this convertion rasterize the whole PDF. I tryed a lot of other things: normalize the PDF using qpdf (v 5.0.1) or pdftk (v 1.44), transform it to a