pdf-generation

How to achieve a dashed underline using chunk.setUnderline?

女生的网名这么多〃 提交于 2019-12-24 20:34:15
问题 I use SAXItexthandler to achieve custom underlining of specified thickness, color & specified Y position using the below code. So basically i have different strings in multiple itext cells in a itext row and the below code helps me to do the underlining for every chunk where every chunk is embedded within a cell and it works perfectly fine. Color c = Color.decode(custom_color); currentChunk.setUnderline(c, thickness, 0.01f, ypos, 0.01f, PdfContentByte.LINE_CAP_BUTT); Now is there a way i can

HTML tables to PDF in PHP - neither DOMPDF nor html2ps/pdf are working

…衆ロ難τιáo~ 提交于 2019-12-24 20:09:50
问题 For the longest time now I've been trying to convert HTML pages containing large tables to PHP. These are styled with CSS and can be several pages long. I first tried DOMPDF. It works great, until a document is more than one page. None of the fixes I've found work. Either it errors out, or any element that would be even partially on the second page gets lumped over the content of page 1. I've tried both the latest release and the SVN copy I checked out today. I also tried html2ps/pdf, and it

Using Automator or Applescript or both to recursively print documents to PDF

♀尐吖头ヾ 提交于 2019-12-24 17:12:33
问题 I have a massive set of files (4000+) that are in an old Apple format (Appleworks). My employed needs them all updated to PDF. By opening the documents in Appleworks and using the system print dialogue, I can save them to PDF—this is ideal. I'm a complete nub with Applescript/Automator, however. Using a Python script I was able to gather all the Appleworks files from my bosses computer and put them in a directory; each file is then in a subdirectory with a .txt file containing its original

iOS merging pdf files

三世轮回 提交于 2019-12-24 16:41:14
问题 I am trying to merge two pdf files in my app. But my app keeps breaking at the point where the combined file reference is created. (See comments in code). Can someone point me in the right direction here? Thanks. - (void) mergerPDFFiles : (NSString*) firstPDFFile : (NSString* ) secondPDFFile { //set path to plist to read in docs directory NSString* pdf1Path = [documentsDirectory stringByAppendingPathComponent:firstPDFFile]; NSString* pdf2Path = [documentsDirectory

Batch export indesign file to pdf with custom footer for each client

南笙酒味 提交于 2019-12-24 14:30:41
问题 I have a fairly large Indesign file with a text field that needs to have a different text for each client. The name of the client must come in the text field. When I have for example 100 clients, I want to automaticly export 100 PDF's and each PDF has its own custom text in that field. The name of the client must be appended to the filename of the exported PDF. Example: Portfolio_1_contoso.pdf with "Contoso" in the text field. Portfolio_2_stackexchange.pdf with "Stackexchange" in the text

Why I can't obtain rounded table corners in this iText\iTextSharp footer table?

拟墨画扇 提交于 2019-12-24 14:13:11
问题 I have the following situation: I have to create a round corner table into the footer of my PDF using iTextSharp but I am finding some difficulties to do it. First of all I have create a class named PdfHeaderFooter that extends the PdfPageEventHelper iTextSharp interface. In this class I have implemented the OnEndPage() method that create the footer on the end of all pages, this is my code: // Write on end of each page public override void OnEndPage(PdfWriter writer, Document document) { base

pypfop 0.2.0 and environment variable FOP_CMD

 ̄綄美尐妖づ 提交于 2019-12-24 12:53:00
问题 I'm trying to get working pypfop 0.2.0 with this tutorial. Unfortunately I'm not able to pass through step 2.2: Decompress in wherever place you like and set environment variable FOP_CMD to the bin/fop of the decompressed folder. Links seem broken so I downloaded binary package from here but suppose it doesn't matter. However, if I decompress the package no path bin/fop is presneted. My current FOP_CMD setup (I've decompressed fop package into ~/utils ): $ echo $FOP_CMD ~/utils/fop-1.1 Now I

Add multiple pages to new PDF using PIL/Pillow

橙三吉。 提交于 2019-12-24 12:41:37
问题 http://pillow.readthedocs.org/en/3.0.x/handbook/image-file-formats.html#pdf The Pillow docs mention being able to save multiple pages, but I can't find any other docs or code samples that tell you how to add pages to a new PDF. 回答1: You could try the following: im.save('test.pdf', save_all=True) By default, the output format is determined by the file extension. This is documented in the release notes. 回答2: Doesn't seem like this is currently possible with Pillow, I used reportlab to build a

Generate pdf from current document

浪子不回头ぞ 提交于 2019-12-24 11:50:10
问题 I need a way to dynamicly generate a pdf from the currently opened coldfusion document. But I don't have an idea how to handle this because I didn't find a way i.e. to pass the current (html) text to a function which generates the pdf by using the cfdocument tag. Any hints or ideas, how to solve this problem? 回答1: Rather than capture the current response body, you could use the "src" attribute of cfdocument to request the current page via an internal self-referencing request. within

PDFBox TextPosition width and height in mm

走远了吗. 提交于 2019-12-24 10:37:42
问题 I am using PDFTextStripper to extract text from a PDF. I want to get the width and height, in millimeters, for each TextPosition . This can be found from a given TextPostion tp using tp.getWidth() and tp.getHeight(). My problem is that the value returned is in display unit . I tried to look around to find the right conversion factor but I got confused. I know that PDFs uses different coordinate systems as explained in the PDF documentation (picture below). I also found this post but It may be