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
2
votes
1 answer

PDF created by PHP pdfLib not opening on windows 7 or XP

I have created a PDF using PHP's pdflib. The PDF contains images and some text. The pdf is generated successfully. I am using a Ubuntu 11.10 server and my development machine also runs the same. The generated PDF opens successfully on my dev…
unni
  • 2,891
  • 4
  • 19
  • 22
2
votes
1 answer

PHP: How to break a string by words within a character limit and near line breaks

I am using a terrible wrapper of PDFLib that doesn't handle the problem PDFLib has with cells that are more than the character limit (Which is around 1600 characters per cell). So I need to break a large paragraph into smaller strings that fit…
2
votes
1 answer

PDFlib library PHP background image

I'm using PDFlib library PHP to write PDF. Can I put an image as a background for a whole page? If so, how can I do it?
DAM_86
  • 67
  • 8
2
votes
1 answer

Draw path is not closing the shape

I'm using PDFLib v-8 and trying to generate triangle using that path point. I'm able to generate 2 sides of triangle not the complete one. Though I can add one more path to that,but in the case of uneven shape I'll be not able to do that just…
Smit
  • 1,559
  • 17
  • 38
1
vote
0 answers

pdflib 8 - text wrap in continue_text or similar function

i'm working with pdflib 8 and adding alot of different strings using the continue_text function. for example: p.continue_text("Title"); p.continue_text("Leadtext"); now i need to add some multiline-text, unfortunately i can only specify a…
1
vote
1 answer

PHP pdflib binary not working and also showing error in compiling

I want to use pdflib for php 8.2 in Alma 9 or Ubuntu 22.04. There is no pecl binary available. I downloaded php_pdflib.so and added it in php.ini. The required functions are available now. But PDF_new() or pdf_new() is not available. I tried to…
srvnk
  • 13
  • 3
1
vote
0 answers

Why the pdf document is not having any data inside it

project: certificate generator I have a certificate template.png file in the folder directory. Link for the template file: https://drive.google.com/file/d/1UgYkO-VOXvCUjBkdbSEDOGVd8szZXZ0z/view?usp=sharing Here I am looking to get a new pdf file…
Abijith
  • 37
  • 3
1
vote
1 answer

How to add the pdflib extension in ddev's web container?

I'm wondering how we could add the php extension pdflib to the ddev's web container?
alpham8
  • 1,314
  • 2
  • 14
  • 32
1
vote
2 answers

How to install pdflib on WAMP Server

I want to install pdflib on my wampserver2. I have downloaded pdflib and I've set the following line: extension=php_pdflib.dll in my php.ini file, but I'm still getting a Call to undefined function pdf_new() error.
ahmer
  • 41
  • 1
  • 1
  • 3
1
vote
1 answer

Node.JS JavaScript fetching PDF contents prints PDFPage Formats instead

I'm trying to fetch the text contents of the first page of a PDF file using NPM node module 'PDF-lib'. However when I fetch the contents and print the results, I instead get an array of data that looks something like below; Could you please help me…
Vakindu
  • 529
  • 1
  • 5
  • 17
1
vote
1 answer

PDFlib PHP image boxsize with set height and dynamic width

In PDFlib we can define the boxsize for an image using boxsize={65 65} (for example). Since we need two values, is there any way to set the height value and leave the width value to be dynamically? In my use case I want to add all images with a set…
strayed soul
  • 67
  • 1
  • 7
1
vote
1 answer

PDFlib create svg graphic from other image

Is it possible in PDFlib to create an svg graphic from another image-file (like png) and than put it out in the pdf? Like first load the png image with $p->load_graphics and than create a svg file within pdflib? I googled this but found nothing that…
strayed soul
  • 67
  • 1
  • 7
1
vote
1 answer

PDFlib PHP linebreak in textflow

I'm currently working on my first project with PDFlib and need to create a textflow which consists of multiple defined texts. But my problem is, that between those Texts there is no line breaking, the second text just starts right after the last…
strayed soul
  • 67
  • 1
  • 7
1
vote
1 answer

PDFlib copy page and use font

The PDFlib example search and replace text copies pages and pastes rectangles and text. Instead of loading a font from my hard disk (like it is done in the example with int font = p.load_font(REPLACEMENT_FONT, "unicode", "");) I'd like to use the…
S. Doe
  • 685
  • 1
  • 6
  • 25