pdf-generation

Splitting HTML page so Printer splits it into separate pages

喜夏-厌秋 提交于 2019-12-06 00:59:59
问题 I am planning price list available for clients online and I was thinking about simple very long page or div container with some anchor links aside to help jump to different products. However in case someone wants to print off just price list with certain products I don't want all the pages to print off but only current one. Is there any print breaking character or tag? Just in case someone has better idea all I want to achieve is having price list in html to change it in one place but still

PDFKit, nodeJS merging two PDF files

巧了我就是萌 提交于 2019-12-06 00:31:40
does anyone have experience with PDFKit with NodeJS. Specifically, I'm trying to merge 2 PDF documents into 1, but I can't seem seem to get the content of the two PDFs properly with formatting inside the merged one. Here's what I do: var PDFDocument = require('pdfkit'); var fs = require('fs'); var doc = new PDFDocument(); var fileName = 'test.pdf'; doc.pipe(fs.createWriteStream(fileName)); var file1 = '1.pdf'; var file2 = '2.pdf'; var stream1 = fs.createReadStream(file1); doc.text(stream1); doc.addPage(); var stream2 = fs.createReadStream(file2); doc.text(stream2); doc.end(); The output, that

Pdf setting the font color to the text

主宰稳场 提交于 2019-12-06 00:16:15
I am trying to add some text to a pdf file manually.I was able to add new text with a specific font. But i am not able to set the font color. So how can i do it manually? (I just want to change these manually as i already have the code where i write these byte to make the pdf file) Also how can i use graphic states specified in the pdf standard to manipulate the text so that feature changes does not affect the color changes etc.How exactly i can use the graphic state? Source pdf file click here Modified pdf file clcik here mkl The PDF color operators are listed in Table 74 of the PDF

BadPasswordException when filling out pdf with iTextSharp

末鹿安然 提交于 2019-12-06 00:04:29
问题 I have a third-party PDF file with some form fields, that I need to fill out programmatically. PDF file is secured. Detailed security settings: SecurityMethod: Password Security, Document Open Password: No, ... Form Field Fill-in or Signing: Allowed... When I'm trying to open and fill out the document manually, everything is ok, and I'm not asked for any password. But with the code, it fails with exception. Here's the code (I'm using iTextSharp library): var str = new MemoryStream(); var

Symfony2 - PdfBundle not working

可紊 提交于 2019-12-05 22:05:56
Using Symfony2 and PdfBundle to generate dynamically PDF files, I don't get to generate the files indeed. Following documentation instructions, I have set up all the bundle thing: autoload.php: 'Ps' => __DIR__.'/../vendor/bundles', 'PHPPdf' => __DIR__.'/../vendor/PHPPdf/lib', 'Imagine' => array(__DIR__.'/../vendor/PHPPdf/lib', __DIR__.'/../vendor/PHPPdf/lib/vendor/Imagine/lib'), 'Zend' => __DIR__.'/../vendor/PHPPdf/lib/vendor/Zend/library', 'ZendPdf' => __DIR__.'/../vendor/PHPPdf/lib/vendor/ZendPdf/library', AppKernel.php: ... new Ps\PdfBundle\PsPdfBundle(), ... I guess all the setting up is

Generate a PDF logbook from git commits

放肆的年华 提交于 2019-12-05 21:27:11
问题 I know that I am able to view previous commits in various ways using git log but I was wondering if anybody here could recommend some good tools for creating a PDF or HTML logbook from git commits. I was hoping I would be able to generate something similar to the style of Github commit logs but with different info. If people don't have any ideas on programs to generate these logs, what are their thoughts or recommendations if I attempt to make my own generator? 回答1: Since the project is due

PDF or Word creation documents with Yii?

本小妞迷上赌 提交于 2019-12-05 21:00:02
Hello I'm building an application with Yii that will now generate reports. My client wants to edit the reports after these are generated. I think the best option is creating a Word document so my client will be able to edit it, but I can't find information or extensions to create Word documents with Yii Framework. I've also seen but not test yet a couple of PDF extensions such as DOMPDF, tcpdf and Zend_PDF. But if I generate a PDF report, then, how is my client going to edit this file? Guys I need recommendations on how to tackle this requirement. Generate Word or PDF documents? Which will be

“Access is Denied” when attempting to open a URL generated for a procedurally-generated PDF in IE11

左心房为你撑大大i 提交于 2019-12-05 20:53:54
For an application I am working on, we have a feature where we are generating a report for an object on the server side, and opening it in a new tab (for the time being) on the client. I'm using the URL.createObjectURL function to make a URL for a Blob , which is comprised of the results of an AJAX call. Whenever a $window.open(generatedFileUrl) call is made, however, I recieve a JavaScript error. Controller: (function() { angular.module('app').controller('someCtrl', [ '$window', 'someSvc', controller ]); function controller($window, someSvc) { var vm = this; vm.thing = {}; // How we get the

Converting .xls to .pdf using Java(or not)

倾然丶 夕夏残阳落幕 提交于 2019-12-05 20:52:59
Is there a way to convert a xls file into a pdf ? I want to make a dynamical report directly to pdf file, but didn't find a way to make dynamic columns on iReport, so I've made a method on Java that exports to xls dynamically. So I was wondering if is there a way to convert this file to pdf , but it need to be on a method from my code. Or if you have a better idea, it can be used too. Maybe there's a way to make this pdf file from my code as I did with xls . Please help me out. Thanks. Try using iText http://itextpdf.com/ - I've used it to create PDFs with columnar structure. In addition to

embaded images are breaked between pdf pages in flaying-saucer

被刻印的时光 ゝ 提交于 2019-12-05 20:01:57
I have some problem with images (all images are embedded in html as base64 strings). I use css img {page-break-inside: avoid;} and it helps but not always. In some cases the same image can be processed correctly where in other situation is divided between pages. It depends form many factors, examples: image is assigned as block element previous images are or are not block elements there is some big image before divided one I also noticed that if the problem occurred at least once than all images to the end of document can be broken when they don't fit on the page. I'm using this approach with