Questions tagged [pdf-writer]

58 questions
1
vote
1 answer

Java writing PDF - Font not supported

Below is the code to write PDF using Java. Code public class PDFTest { public static void main(String args[]) { Document document = new Document(PageSize.A4, 50, 50, 50, 50); try { File file = new…
chinna_82
  • 6,353
  • 17
  • 79
  • 134
1
vote
0 answers

How do I export HTML to PDF using telerik.pdf namespace

I have the requirement where on click of a button, I want to write the contents on multiple lists to PDF document For example, I have List and I want to write all the details present in Employee class to the pdf document I want to implement this…
1
vote
2 answers

Print the substring in small font size in pdf

I using the below code to print a string in pdf which give me an out put of the same sized string i want to make the last two string in different font size. how can i do this ? PdfContentByte cb = writer.getDirectContent(); String stl = "",…
Nibha Jain
  • 7,742
  • 11
  • 47
  • 71
1
vote
1 answer

Convert text to PDF

I am trying to create a PDF file by inserting some text into it with a proper structure in Android. Document doc = new Document(); PdfWriter.getInstance(doc, new FileOutputStream("urgentz.pdf")); doc.open(); Image image = Image.getInstance…
Sumit
  • 928
  • 2
  • 15
  • 34
1
vote
2 answers

trying to protect PDF (iText) trying to disable users to do copy on pdf's content

Below is my code. My objective is to create a PDFs where endusers can do whatever they want EXCEPT copying the text (select the text and COPY to a notepad). Can anyone explain what code should come in line 18? I allow printing but not ALLOW_COPY) I…
adhg
  • 10,437
  • 12
  • 58
  • 94
0
votes
0 answers

iTextSharp pdf add custom header on every page

I am iterating a list and it is creating new page automatically, I want to add table header on every new page Image with header on first page I want same header on second page second page created while list iteration I try to add html string
0
votes
0 answers

How can I create a signature box on the first page of a PDF file in Python using pdfrw and pdfrw.PdfWriter?

I am trying to create a signature box on the first page of the PDF file. I am getting the following error. pdfrw.PdfWriter().write(pdf_file, pdf_file.getobject(), signature_box) ^^^^^^^^^^^^^^^^^^ AttributeError: '_io.BufferedReader' object has no…
Sapar
  • 1
  • 1
0
votes
0 answers

Save a file from PDF Writer

I have created a variable through a PdfWriter and add to it pages from other PDF document. How can I save variable from PdfWriter as PDF in GoogleCollab? pdf_writer_new = PdfWriter() for page in range(totalPages): if num == 7: if page in…
0
votes
0 answers

PdfWriter not appending data

lowagie PdfWriter is not appending data but overwriting it whenever writeData is called. How can we append data? void writeData(List item){ boolean isExistingFile = Files.exists(Paths.get(filePath)); File file = new…
surm
  • 167
  • 2
  • 11
0
votes
1 answer

Problem with merging PDF pages (Python3, PyPDF2 )

I've question: Why program below, doesn't generate 107 different pages?: import PyPDF2 import os from fpdf import FPDF from reportlab.pdfgen import canvas from reportlab.lib.units import mm from reportlab.lib.pagesizes import A4, landscape font_h =…
Robert
  • 1
  • 3
0
votes
1 answer

Pdf file produces blank

I am creating a PDF file without text from a pdf file with text using the following program def remove_text_from_pdf(pdf_path_in, pdf_path_out): '''Removes the text from the PDF file and saves it as a new PDF file''' #Open the PDF file with the…
0
votes
3 answers

How to fill a pdf with python

I don't have a concrete project yet, but in anticipation I would like to know if it is possible to fill a pdf with data stored in mysql? It would be a question of a form with several lines and column history not to simplify the thing... If yes, what…
0
votes
0 answers

extracting a pdf page from each of multiple pdfs using PyPDF2 without changing the original pdf file names

i'm having hundreds of pdf files on my google drive and i want to extract page 6 from all the pdf files without necessarily changing the original pdf file name as output using Jupyter notebook on google colab. I used the code below to extract a page…
0
votes
0 answers

Problem with accents after generating pdf file with java

i'm working with liferay 7.2 on local and after generating pdf, working so fine for me after deploying on test site the pdf is generated without recognizing letters with accents like é a collegue told me that the problem is caused due to the site…
0
votes
1 answer

how to include aspose.pdf.cpp in vs c++ project?

I am trying to implement this basic example https://docs.aspose.com/pdf/cpp/hello-world-example/ but I am getting errors that MakeObject, Document and TextFragment are not defined. I was developing on vscode but then I realized that aspose can be…
Robinson
  • 13
  • 3