Questions tagged [pdflib]

PDFlib is a library for generating and manipulating files in Adobe’s well known Portable Document Format (PDF).

PDFlib is a library for generating and manipulating files in Portable Document Format (PDF). The library is a commercial product from PDFlib GmbH, a German company that builds and maintains the library.

PDFlib - A library for generating PDF on the Fly

PDFlib is the leading developer toolbox for generating and manipulating files in the Portable Document Format (PDF). PDFlib’s main targets are dynamic PDF creation on a Web server, or any other server system, and to implement "Save as PDF" in existing applications. You can use PDFlib to dynamically create PDF documents from database contents, similar to dynamic Web pages. PDFlib has proven itself in a wide range of other use cases as well. Application programmers need only decent graphics or print output experience to be able to use PDFlib quickly. Since PDFlib frees you from the technicalities of the PDF file format, you can focus on acquiring the data and arranging text, graphics, and images on the page.

Lots of information and coding samples can be found in the free PDFlib Cookbook which contains sample code for PHP and Java.

257 questions
1
vote
2 answers

Alignment in textflow

I'm placing a textflow with UTF-16 text in PHP (PDF_create_textflow,PDF_fit_textflow) which works fine. How do I get justified Text "" without seeing the BOM sign (Up Arrow) in the Document? Any other way I could style text justified rather than…
1
vote
2 answers

Creating Tables With PHP Using PDFLib

I was wondering if there was a good source on how to build tables using the PDFLib for PHP. I am planning to populate a PDF Document with a Database Table (well a few that I join together to create a new view) and I wanted to make it a PDF document…
The God Emperor
  • 355
  • 2
  • 6
  • 15
1
vote
1 answer

PDFlib - controlling background and opacity of text color, text background and text stroke

I'm trying to set separate values of background and opacity of text color, text background and text stroke (outline). Code below $p->save(); $p->setfont($font, 240); $p->set_gstate($p->create_gstate('opacityfill=1 opacitystroke=1')); // Both fill…
temuri
  • 2,767
  • 5
  • 41
  • 63
1
vote
1 answer

PDFlib - add SVG from string

Is it possible to add SVG graphics to PDF page from string when working with PDFlib? Documentation states that load_graphics() takes file name on disc. Is there a way around it?
temuri
  • 2,767
  • 5
  • 41
  • 63
1
vote
2 answers

PDFlib - setting stroke and fill opacity (transparency)

Is it possible to set value of alpha channel when providing fill and stroke colors in PDFlib? $p->setlinewidth(20); $p->setcolor('fill', 'rgb', 1, 0, 0, null); $p->setcolor('stroke', 'rgb', 0, 1, 0, null); $p->rect(0, 0, 100,…
temuri
  • 2,767
  • 5
  • 41
  • 63
1
vote
1 answer

Transparent background-color (fillcolor) for textline matchboxes

I'm creating business cards with pdflib and php. I'm using PDFLib 9.0.6p4 for Mac with PHP Version 5.6. There is a background image on which the text is displayed. To get it readable I want to have some background-color for my text. Managed to do…
1
vote
2 answers

PDFlib Unable to load dynamic library

I'm trying to make PDFlib to work on wamp. I've downloaded http://www.pdflib.com/download/pdflib-family/pdflib-7/ and followed the installation guide .. I took the libpdf_php.dll and i copied it in C:\wamp\bin\php\php5.3.4\ext (of course the…
Ziggy
  • 11
  • 1
  • 2
1
vote
0 answers

Laravel job with database driver returns Class not found

I am using a Laravel job which handles specific registration confirmations via mail. In the handle() function of the job I am referring to another class' static function (TicketController) which generates a PDF: public function handle() { …
Mango D
  • 501
  • 3
  • 11
  • 28
1
vote
2 answers

How to create font preview image from font file on Linux?

I am wondering if there is any easy / possible way to create a "font preview image" file for a given font file on the Linux command line. You know, like when you click on a font file in Linux or Windows file explorer and you get a little font…
Dougal
  • 55
  • 1
  • 5
1
vote
1 answer

PDFlib 7 & 8 changes?

I've been trying to find a list of changes in PDFlib 7 & 8, but all I can find is references to "please see the documentation for details". For example, the "change log" link here: http://www.pdflib.com/download/pdflib-family/pdflib-8/ Includes bugs…
Colen
  • 13,428
  • 21
  • 78
  • 107
1
vote
1 answer

pdflib 8.0 convert html to pdf

How to convert html to pdf using pdflib 8.0. $html = "
Hello World
"; $signature = $p->create_textflow($html, ""); Doesn't work... PDFlib exception occurred in hello sample: [1400] create_textflow: Unknown option 'div'
MeAtComellink
  • 11
  • 1
  • 2
1
vote
1 answer

Java- stretch pdf pages content

How can I make the page larger in the way that the text/images will stretch according to the new size? I only found ways to scale down but not scale up... any idea? Thanks in advance!!!
coral
  • 181
  • 1
  • 1
  • 12
1
vote
1 answer

why PDF_begin_page_ext: Function must not be called in 'object' scope

the code is read pdf file and return new file copy from source pdf I got the error when compile with nodejs https://github.com/NitroPye/node-pdflib use nodejs to pdflib const lib = require('../../pdf'); const pdflib = lib.pdflib; const PDFLIB =…
aloebys
  • 123
  • 2
  • 10
1
vote
1 answer

How to add nameddest to existing PDF

I tried to use PDF_add_nameddest to add nameddest but I don't know exactly how to use it or is it possible. My codes are: $pdf = pdf_new(); pdf_open_pdi_document($pdf, 'test.pdf', ""); pdf_add_nameddest( $pdf , 'testdestination', 'bottom' ); My…
rmondesilva
  • 1,732
  • 3
  • 17
  • 29
1
vote
1 answer

CMYK SVG in PDFLIB

I would like to use PDFLIB to create a PDF. I would like to import an SVG file which has cmyk colours. I am using PDFLIB's load_graphic. How should I define those colours in the SVG file, to be translated as cmyk in PDFLIB? I tried with icc,…
pape04
  • 57
  • 9