Skip to content
Advertisement

TCPDF page size change is creating several pages when all I want is one

As you can see in my code; I am just trying to create a PDF document 4 inches wide and 3 inches tall.

JavaScript

However, when I do this, my PDF renders with duplicate pages (full code follows):

enter image description here

What I am trying to achieve is this:

enter image description here

How can I make TCPDF create just one 4″ x 3″ image like I have done above?

Here is my full code for TCPDF:

JavaScript

Advertisement

Answer

In fact, this was the answer:

JavaScript

Ref. TCPDF Qr code resize on small size page

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement