pdf-generation

Print webpage from QtWebKit.webView to pdf PyQt4

て烟熏妆下的殇ゞ 提交于 2019-12-10 20:03:56
问题 Hi what i'am trying to accomplish is that, i have a QWidget with a custom QtWebKit.QWebView which displays a particular website. I want to save that web page as a pdf using python and PyQt. from PyQt4 import QtCore, QtGui from PyQt4 import QtWebKit from Save_Evidence import * import sys ##### Custom WebView ############# class Browser(QtWebKit.QWebView): def __init__(self,parent =None): QtWebKit.QWebView.__init__(self,parent) self.loadFinished.connect(self._result_available) def _result

itextsharp add 1 page template to all pages

萝らか妹 提交于 2019-12-10 19:33:08
问题 I'm creating a PDF file dynamically in an ASP.Net application. The data can vary from spanning 1 page to over 10 pages. I'm using PdpfTables and Cells to align the data which is working perfectly. IT's creating pages as it needs new pages. The only problem is I can't get it to add my template to all pages, only the first page. My Template is a 1 page PDF file. To add it to the first page I'm using the following code PdfContentByte cb = writer.DirectContent; cb.AddTemplate(page, 0, 0); As I

Digitally Sign and Verify Pdf Document using itextSharp 5.3.3

我的未来我决定 提交于 2019-12-10 19:27:09
问题 I am trying to digitally sign and Verify pdf documents on server(c#) using iTextSharp 5.3.3. I have generated .Pfx file using DigiSign(Online tool) and then using windows to generate the certificate(.cer) file /// <summary> /// Signs a PDF document using iTextSharp library /// </summary> /// <param name="sourceDocument">The path of the source pdf document which is to be signed</param> /// <param name="destinationPath">The path at which the signed pdf document should be generated</param> ///

how to make fillable forms with reportlab in python [closed]

青春壹個敷衍的年華 提交于 2019-12-10 18:33:12
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . can anyone please help me with creating forms in python using the reportlab lib. i am totally new to this and i would appreciate sample code thanks 回答1: Apparently reportlab does not support creating fillable pdf

Allow page extraction in a password security pdf with itextsharp

天涯浪子 提交于 2019-12-10 17:39:39
问题 I don't know if it is possible to create a pdf with password security enabled, that also allows extraction of pages. I havn't found any property in itextsharp which will allow enable page extraction. Any one has any idea? This is the property that i would like to enable. Thank you very much. 回答1: I've taken a look at the permission bits in the draft of ISO-32000-2 and I've compared them with the parameters (written in ALL_CAPS) available in iText: bit 1: Not assigned bit 2: Not assigned bit 3

Writing text on the border of an A4 PDF in R

▼魔方 西西 提交于 2019-12-10 17:17:11
问题 I need to write on a PDF device on the extreme border of the page. With this snippet: pdf('foo.pdf') #Write next plot to foo.pdf in current dire par(mar=c(0, 0, 0, 0)) #Set numbers of lateral blank lines to zero par(xaxs='i', yaxs='i') #Does not extend axes by 4 percent for pretty labels plot.new() #Create a blank plot, as we just want to write our text text(0, .5, "hello", pos=4, offset=0) #Write to the right with no default 0.5 offset dev.off() #Close device, that is saving for a PDF device

iTextSharp - calculating phrase/paragraph height before adding to column

隐身守侯 提交于 2019-12-10 17:14:45
问题 I am creating PDF work orders that have a varying amount of items and notes. I am using ColumnText.SetSimpleColumn(phrase, x, y, x2, y2, height, alignment) to add text to a single column. I can get the ColumnText.YLine value, but only after applying it to the ColumnText object with the Go() method. What I want to do is to either pre-calculate the final YLine value or undo the adding of a phrase if the YLine is past mjy bottom threshold so I can manually add another page and continue. Is this

How to fill column background color for pdfmake with fillColor?

情到浓时终转凉″ 提交于 2019-12-10 15:59:50
问题 Is there any option to fill column background color with fillColor: '#dedede' ? fillColor works in tablecell very well at the same time it doesn't work for column :( <script src="https://rawgit.com/bpampuch/pdfmake/master/build/vfs_fonts.js"></script> <script src="https://rawgit.com/yelouafi/pdfmake/master/build/pdfmake.js"></script> <script> function print(argument) { // open the PDF in a new window pdfMake.createPdf(docDefinition).open(); } </script> <button onclick="print()" style="display

How to bring added images using iTextSharp in C# to the forefront

旧时模样 提交于 2019-12-10 15:57:24
问题 Ok, I'm having to make a PDF that has some styles to it. It's for labels. I have the following code: Document doc = new Document(PageSize.A4); int labelHeight = 394; int labelWidth = 556; float labelTop = doc.PageSize.Height - 2; float labelBottom = doc.PageSize.Height - labelHeight; MemoryStream ms = new MemoryStream(); PdfWriter writer = PdfWriter.GetInstance(doc, ms); doc.Open(); PdfContentByte cb = writer.DirectContent; // Generate Boxes For Content cb.SetColorStroke(new CMYKColor(207,

Data.Frame to PDF/HTML table with Colored Text

前提是你 提交于 2019-12-10 15:21:08
问题 I have a very simple problem. I have a data frame with multiple rows and columns. My rows represents points in time. My columns are potential conditions and my cells are the probabilities that those conditions occurred at a specfic time. I would like to take this information and output to a PDF table. Additionally, I'd like to add coloring to this. For example < 60% grey text. 60-75 green text. 75+ bright green. Is there anyway to do this? Additionally, would it be possible to have one column