How to enable LTV for a timestamp signature?

This is the sample code this question is about: public void addLtv(String src, String dest, OcspClient ocsp, CrlClient crl, TSAClient tsa) throws IOException, DocumentException, GeneralSecurityException { PdfReader r = new PdfReader(src); FileOutputStream fos = new FileOutputStream(dest); PdfStamper stp = PdfStamper.createSignature(r, fos, ‘\0’, null, true); LtvVerification v = stp.getLtvVerification(); AcroFields fields = stp.getAcroFields(); List<String> names = … Read more

How to fill out a pdf file programatically? [closed]

To elaborate on the answer by duffymo you’ve approved, allow me to share a chapter of my book with you: manning.com/lowagie2/samplechapter6.pdf In section 6.3.5, you’ll find out how to create a PDF template using Open Office, and listing 6.19 will show you how to fill it out programmatically: PdfReader reader = new PdfReader(src); PdfStamper stamper … Read more

Script (or some other means) to convert RGB to CMYK in PDF?

This answer is not for Illustrator, but for ‘some other tool’, namely Ghostscript (download gs871w32.exe or gs871w64.exe). Ghostscript allows you to ‘re-distill’ PDFs (without an intermediate conversion to PostScript, the dreaded ‘refrying’ detour). Try this command: gswin32c.exe ^ -o c:/path/to/output-cmyk.pdf ^ -sDEVICE=pdfwrite ^ -dUseCIEColor ^ -sProcessColorModel=DeviceCMYK ^ -sColorConversionStrategy=CMYK ^ -sColorConversionStrategyForImages=CMYK ^ input-rgb.pdf And if you … Read more

Gluing (Imposition) PDF documents

I just came across a nice tool on superuser.com called PDFjam that can do all of the above in a single command: pdfjam –nup 2×1 file1.pdf file2.pdf –outfile DONESKI.pdf It has other standard features like page size plus a nice syntax for more sophisticated collations of pages (the tricky page re-ordering necessary for true booklet-style … Read more

Change PDF title in browser window

Ok, So I found out how to change the meta-data in a .pdf form here: http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7c63.w.html (dead link; archived version here) Sure enough the Title in the Meta Data within the .pdf was “Coury And…” Once I changed this the Tab and the Title in Firefox web browser changed to have the title that I … Read more

How to install wkhtmltopdf on a linux based (shared hosting) web server

I’ve managed to successfully install wkhtmltopdf-amd64 on my shared hosting account without root access. Here’s what i did: Downloaded the relevant static binary v0.10.0 from here: http://code.google.com/p/wkhtmltopdf/downloads/list EDIT: The above has moved to here via ssh on my shared host typed the following: $ wget {relavant url to binary from link above} $ tar -xvf … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)