Questions tagged [pdf-writer]

58 questions
6
votes
1 answer

System.UnauthorizedAccessException Access to the path is denied

At attempt to write PDF document with following code: document = new Document(); PdfWriter writer = null; ; try { writer = PdfWriter.GetInstance(document, new FileStream(@"E:\mergFiles", FileMode.Create)); } catch (Exception xc) { } I am…
yogesh lawate
  • 217
  • 1
  • 2
  • 11
3
votes
3 answers

pdf-writer invalid multibyte char (US-ASCII) expecting keyword_end content = "%PDF-#{@version}\n%âãÏÓ\n" Rails 3

I have a problem with the pdf-writer gem on a collaborative project I'm trying to run, I'm using RVM, Ruby 1.9.2p180, Rails 3.1.0 on Ubuntu 10.10. I created a new gemset to install the required gems with Bundler, but when I try to run the app I get…
josethernandezc
  • 160
  • 2
  • 12
2
votes
0 answers

How to add a pdf page to the existing pdf at a desired position instead of adding at the top?

I am using this code to merge a pdf file to the start of pdf but want to set it to the 2nd page of existing pdf. How do I do that ? How to go with this? I have spent days on it but no luck. public static string MergeFiles(string destinationFile,…
Stacky
  • 57
  • 1
  • 8
2
votes
2 answers

(Python) Change pagesize and format of PDF file generated with xtopdf

I want to convert an xlsx with Python. I used the modules tablib and xtopdf to build a well structured table. Works excellent! Unfortunately the content does not fit on one pdf page. So I wanted to change the pagesize and format to horizontal A3.…
Felix
  • 115
  • 2
  • 12
2
votes
0 answers

Rotating PDF using Javascript

I am looking for a solution where i can use java-script to rotate an existing PDF. I tried many things but could not find anything. i am not sure if PDF.JS or jsPDF.js can help me, i tried to figure out but was not very successful. But doing the…
karan
  • 71
  • 7
2
votes
1 answer

ERROR -12 closing pdfwrite device in ghost script

In our module we are using the ghost script to compress PDF of higher size to lower size use the command gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -sOutputFile=output.pdf input.pdf while converting this we are getting an…
Ravipati Praveen
  • 446
  • 1
  • 7
  • 28
2
votes
2 answers

iTextSharp PdfWriter Rotating page layout when it shouldnt be

I have a program that takes a pdf and prints text onto the first page using Itextsharp and PdfWriter. Currently this has been working as intended for each pdf that that I had to input text on. However, when the source pdf's layout is landscape, the…
Ben
  • 667
  • 6
  • 13
2
votes
2 answers

how to set color in ruby pdf-writer

I'm using pdf-writer gem in ruby. While drawing a table, i need to set the shade_color and shade_color2 of table so that the rows get the alternate shade and shade2 colors. Can anyone tell me how to set them? Like table.shade2 =…
Satya Kalluri
  • 5,148
  • 4
  • 28
  • 37
2
votes
2 answers

How to reduce memory consumption of PdfPTable with many cells

I'm creating a PDF using ITextSharp which is composed of a single PdfTable. Unfortunately for a particular data set, I'm getting an Out of memory Exception due to the large number PdfPCells that are created (I've profiled the memory usage - I've…
Tom Carter
  • 2,938
  • 1
  • 27
  • 42
1
vote
1 answer

I can't add the ₺ (Turkish Lira) icon to the file with Java PDFWriter

BaseFont bfSpecial = BaseFont.createFont("get_font/verdana.ttf",BaseFont.IDENTITY_H, BaseFont.EMBEDDED); Font my_font = new Font(bfSpecial, 9, Font.BOLD, BaseColor.BLACK); document.add(new Paragraph("\n",my_font)); document.add(new…
1
vote
1 answer

Justify a Document object using itext pdf

I've added Chunks in a Document object Document document = new Document(); document.add(new Chunk("This is a text")); document.add(new Chunk("This is another text")); document.close(); I tried to use the setAlignment(Element.ALIGN_JUSTIFIED)…
Sajan Rai
  • 35
  • 5
1
vote
2 answers

.net PDF writer/creator

I have a need to create PDFs from HTML content with specific layouts. I have looked around quite a bit and the only options I could come up with worth any repute are SuperWebGoo and PDFSharp. PDFSharp hasn't been updated in 2 years whereas…
Gabbar
  • 4,006
  • 7
  • 41
  • 78
1
vote
1 answer

Copying annotations with PdfWriter instead of PdfCopy

I need to copy annotations using PdfWriter instead of PdfCopy because at the time of the copy I need to resize/rotate the page. Can anyone tell me how to do this?
1
vote
1 answer

iTextSharp : Cannot attach PageEvent on a PdfSmartCopy writer

This code using ItextSharp 5.5.10: var msOutput = new MemoryStream(); var document = new Document(PageSize.A4, 0, 0, 0, 20); var writer = new PdfSmartCopy(document, msOutput); writer.PageEvent = new MyHeaderFooterEvents(); Throws "Operation is…
Jean-Marie
  • 297
  • 3
  • 14
1
vote
1 answer

Is it possible to access PdfWriter or PdfContentByte when given iTextSharp.text.Document alone?

My question is exactly as the title says. The reason I ask this question is that I need to workaround a wrong design. Simply speaking, my task is to implement the body of a callback function. The callback function receives a single argument of…
rwong
  • 6,062
  • 1
  • 23
  • 51
1
2 3 4