pdf-generation

Split each PDF page in two?

三世轮回 提交于 2019-12-20 08:42:11
问题 I have a large number of PDF files which have two slides to a page (for printing). The format is A4 pages each with two slides setup like so: ----------- | slide 1 | ----------- | slide 2 | ----------- How can I generate a new PDF file with one slide per page? Happy to use GUI, CLI, scripts or even interface with a language's PDF library; but I do need the text on the slides to still be selectable. 回答1: PDF Scissors allowed me to bulk split (crop) all pages in a PDF. 回答2: Briss is "a simple

Why doesn'n create pdf-documents in java servlet? [duplicate]

若如初见. 提交于 2019-12-20 08:09:38
问题 This question already has answers here : How can I serve a PDF to a browser without storing a file on the server side? (4 answers) Closed 3 years ago . I use iText/Pdfbox to create a PDF document. Everything works when I create the PDF using a standalone Java class like this: public static void main(String[] args){ ... ... ... } The document is created correctly. But I need create a PDF document from a Servlet. I paste the code into the get or post method, run that servlet on the server, but

Creating table with 2 rows in pdf footer using itext

让人想犯罪 __ 提交于 2019-12-20 06:36:32
问题 Hi I want to add footer with 2 rows. 1st row will have document name with background color. 2nd row will have copy rights notes. I tried to create using ColumnText. but I am not able to set the background color for the row(only text getting background color). Is there any ay to achieve this. i spend my whole night to find a solution but not able to do. 回答1: You could have saved yourself a sleepless night by reading the documentation. You'd have discovered that you can set the background of a

Javascript to automatically supply password

北城余情 提交于 2019-12-20 05:43:35
问题 I have an application that displays password protected PDFs using iTextSharp. pdfCopy.SetEncryption(true, "Secretinfo", "Secretinfo", 0); If the user saves the PDF, the saved copy of the PDF is password protected. Which is great. The problem is it also prompts for password before displaying the PDF on the browser. Which isn't good. So I'm thinking maybe it's possible to supply the password using javascript just to display it on the browser. It's bad practice but I don't see that I have any

PdfBox issue while changing page

一曲冷凌霜 提交于 2019-12-20 05:18:24
问题 I'm not a big fan of asking this kind of questions but well, it's been 3 whole days now trying to solve this bug on my code. I know it's a logic problem and I know how to solve it in my mind, but when it comes to translate my ideas into code I just can't make it work as I want. I'm working on a contract endorsement (a modification of a contract) which compares the data from 2 tables and if any of them has changed then it paints only that information. Sometimes the information that changes

Attaching files to a PDF

故事扮演 提交于 2019-12-20 05:14:16
问题 I am struggling with attaching files to a PDF that I am generating at runtime. I'm using C# ASP.net in the MVC framework. I originally created the PDF using ABCpdf from a HTML View but I then realised, I also needed to attach files to the PDF. I switched to using iText and I have managed to attach a file to the PDF using the solution at iTextSharp for PDF - how add file attachments? The problem I have now is that I can't seem to reference these attachments as links within the PDF. The "iText

Programmatically print to a PDF printer [closed]

梦想与她 提交于 2019-12-20 04:31:36
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I am looking for a free open source .Net based, preferably C# , pdf printer such as CutePDF's Custom PDF Writer with programmatic

Programmatically print to a PDF printer [closed]

老子叫甜甜 提交于 2019-12-20 04:31:13
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I am looking for a free open source .Net based, preferably C# , pdf printer such as CutePDF's Custom PDF Writer with programmatic

How to keep original rotate page in itextSharp (dll)

风格不统一 提交于 2019-12-20 04:20:15
问题 i would like create the project, reading from Excel and write on pdf and print this pdf. From Excel file (from cell) read directory where is original pdf on computer or server, and next cell have info what write on the top in second pdf. And problem is here, original pdf is horizontal, landscape, rotate and my program create copy from original pdf and write info from excel on the top on copy pdf file. But pdf which is landscape is rotate for 270 deegres. This is no OK. For portrait rotation

PDF generated with PDFBox is blank

徘徊边缘 提交于 2019-12-20 03:39:06
问题 I am trying to write content into a PDF file. I have written the code public ByteArrayOutputStream createPDF(String text) throws IOException, COSVisitorException { PDDocument document; PDPage page; PDFont font1; PDPageContentStream contentStream; ByteArrayOutputStream output = new ByteArrayOutputStream(); document = new PDDocument(); try { page = new PDPage(); document.addPage(page); contentStream = new PDPageContentStream(document, page); contentStream.beginText(); contentStream