2022 Developer Survey is open! Take survey.

Questions tagged [pdf]

The Portable Document Format (PDF) is a file format used to present documents in a manner independent of application software, hardware, and operating systems.

Filter by
Sorted by
Tagged with
0 votes
1 answer
21 views

Empty Pdf file generated with FPDF library in WordPress plugin [closed]

I am currently implementing a pdf export functionality within a wordpress plugin i'm developing but the pdf file generated when i click on export button is empty. To implement the export i use FPDF ...
user avatar
0 votes
0 answers
14 views

Contact form 7 send product PDF after submit

We are trying to display a cf7 form on woocommerce product pages, where users can submit the form and receive a pdf file related to the product (either as an email file attachment, as a link in the ...
user avatar
0 votes
0 answers
14 views

Thumbnails not being generated for PDF files

I have installed all the required extensions like ImageMagick, Imagick, and Ghostscript. I used a plugin to test the requirements and everything passed. ImageMagick: Installed Imagick: ...
user avatar
0 votes
0 answers
50 views

Merge PDF files from post custom fields(ACF) into one PDF file and respond back the created PDF file, Wordpress(AJAX Request)

I am using Advanced Custom Fields plugin(free version) for attaching 3 different pdf files to a single post. After displaying a list of posts on a template, with a button click I am making an AJAX ...
user avatar
0 votes
0 answers
14 views

Create a pdf from the entries in DB

I have a website containing details of certificates and I want to create pdf files for each certificate using the id. The process I want is: The user enters the id of the certificate and a page should ...
user avatar
0 votes
0 answers
28 views

PDF Upload from Input Error

I have a custom plugin that creates an input field under each post, that allows users to upload PDF files. $html .= '<input accept="application/pdf" type="file" id="...
user avatar
1 vote
1 answer
21 views

How to correctly detect accessing wp-content/uploads?

Not sure if this is a stupid question or not; however, I've been trying to detect when a user accesses a PDF. I want to be able to know how often a user is accessing specific PDF files. I have been ...
user avatar
0 votes
0 answers
38 views

Upload Image with a file URL and show dynamically on Frontend

Please help! I am a newbie on Wordpress. I am looking for a workaround or plugin which can help me upload an Image on the backend (like thorugh WP Frontend Admin plugin. and on the Frontend, it comes ...
user avatar
0 votes
1 answer
49 views

Custom folder with PDF files (not in WP Library) - Create url for each file

I have a folder mywebsite.com/wp-content/customUploads which contains hundreds of pdf files. At this point the url to see a pdf file is for example: mywebsite.com/wp-content/customUploads/myfile.pdf ...
user avatar
0 votes
1 answer
120 views

Error in pdf generating plugin using FPDF

I'm trying to create a plugin using FPDF to create an options page to print custom post types. Here is my code: <?php /* * Plugin Name: RT FPDF Tutorial * Description: A plugin created to ...
user avatar
  • 5,257
0 votes
0 answers
31 views

_wp_attachment_metadata is not being added to database when PDF files uploaded

When I upload a JPG or PNG image, a _wp_attachment_metadata value is created in the database, but this is not the case for PDF files. Is this the normal behavior or should the _wp_attachment_metadata ...
user avatar
  • 101
0 votes
0 answers
24 views

How to saving a file to Media Libary by code

I'm building a plugin that works only in admin. I've a page where the user choose some parameters and the script get data from posts and posts meta then it generate a pdf file and then I want to save ...
user avatar
  • 1
0 votes
1 answer
248 views

Create a permalink to a pdf?

I have a website where I want the permalink to my resume to be www.example.com/resume, so that whenever I send someone that link, it goes to the most recent version of my resume. But I don't want my ...
user avatar
  • 103
0 votes
1 answer
179 views

Why are thumbnails not being generated for PDF files?

I'm trying to figure out why one of my WordPress sites is not generating thumbnails for PDF uploads. It works on my dev and staging sites. When comparing them, the only difference that I can find is ...
user avatar
  • 611
0 votes
1 answer
95 views

Looking for Wordpress PDF Converter with Custom Templates?

I work with a number of companies who want bios converted to PDF files for download. The problem is that we cannot find a plugin solution that fits our needs. WP-MPDF has worked in the past, but it is ...
user avatar
  • 1
0 votes
0 answers
121 views

FPDF for creating pdf diplomas

Before anything else, I must say I am new on building WordPress functions. I have a website with online courses. Students have to sit exams and at the end they get a score, an average of all the exams....
user avatar
1 vote
0 answers
166 views

PDF file randomly breaks upon upload

The issue randomly started happening. When I upload a PDF file via the media library, it sometimes 'adds' random lines and graphics to the PDF file(or solid brown color), but sometimes it is okay. WP ...
user avatar
  • 23
0 votes
0 answers
25 views

Is there a way to add a featured image to an image/file attachment page?

So what I'm wanting to do is be able to use the url of an attachment page for a PDF file, post that link on Facebook, and be able to customize the preview/featured image that shows up there. I've ...
user avatar
  • 1
0 votes
0 answers
39 views

How to include shortcodes and pdfs in WordPress search without plugin?

I have a WordPress website using Avada theme. The website uses an inbuilt WordPress search tool which searches only posts. The website uses shortcode to add toggle/ accordion etc. I want to include ...
user avatar
0 votes
0 answers
19 views

Opening a file of the theme from outside

I have a problem. I want to open a file that is in the active theme. Actually, I have a link that is shown in an admin menu, and when I click the link I want to redirect to a file that is stored in ...
user avatar
0 votes
1 answer
1k views

Attach pdf from dynamic url

When I save a custom post, I would like to send a PDF by email as attachment. I tried that : function my_custom_save_post( $post_id, $post, $update ) { if( ! $update ) { return; } if( ...
user avatar
0 votes
1 answer
87 views

Show uploaded pdf files dynamically and filter by month name

I want to show PDFs for a specific WordPress page that filters by (month)name. e.g: check the current month (October) and show october.pdf. All the PDF documents will upload from the admin panel and I ...
user avatar
  • 1
0 votes
1 answer
2k views

Call to undefined function wp_generate_attachment_metadata()

In content-attachment.php I have: /* preview for PDFs*/ if ('' === $ai) { wp_generate_attachment_metadata( $the_ID, wp_upload_dir() ); } And it throws this error: Fatal error: Call to undefined ...
user avatar
  • 743
0 votes
0 answers
119 views

open menu link (PDF) in new tab not download

I have a specific requirements where the menu item has link to the PDF. My needs are to open the PDF on the click of the menu item in new window. I have checked the option of open link in new tab in ...
user avatar
2 votes
0 answers
304 views

Building Wordpress Plugin Using FPDF - How do you get post content from currently viewed post?

I am using FPDF to build a plugin in wordpress that will add a button on each post(documentation) that gives the user the ability to export it as a styled pdf from the post without having to maintain ...
user avatar
1 vote
0 answers
708 views

Add PDF to ACF image field from file url

I am basically looping some fields from a gravity form entries. I using this function below to pass a file url into $filename and convert the file into a media library item, and then attaching that ...
user avatar
  • 422
0 votes
0 answers
81 views

ACF Flexible in TCPDF

So, i need to display Flexible content in TCPDF, i have my Flexible content fields: if( have_rows('levels') ): while ( have_rows('levels') ) : the_row(); if( get_row_layout() == '...
user avatar
  • 111
1 vote
2 answers
701 views

Force documents to appear in Featured Image dialogue

Having a perplexing issue... ...for a custom post-type called 'Resources' I used the 'Featured Image' or 'thumbnail' function within WordPress to allow users to attach documents to 'Resources'. The ...
user avatar
  • 1,860
0 votes
0 answers
21 views

(Only on Firefox) Why links to pdfs on my website ask me whether I want to save file?

The two pages of my website can be found here: https://www.lightfigures.com/metaphysical-diaries/ https://www.lightfigures.com/spiritual-diaries/ For some reason, and only on Mozilla Firefox (not ...
user avatar
0 votes
0 answers
69 views

generate PDF from member information

I'm building a website with membership and I would like to generate a pdf using user information such as name and email and to make it downloadable in his member space. I've seen that there are some ...
user avatar
  • 1
0 votes
1 answer
106 views

Attach and retrive multiple pdf files to post or page

I need to create two sections that will respectively contains only some pdf to downloads. I've never used pdf inside a wordpress websites, my question is how I can display them or in any case had a ...
user avatar
  • 321
1 vote
0 answers
23 views

How to display PDF in a new tab instead of downloading? [closed]

I'd like to open some external PDF files in a new tab instead of downloading them. Here you can see the problem : https://quantum-genomics.com/en/investors/annual-information/ Thx for your help ;)
user avatar
  • 11
1 vote
1 answer
177 views

Is It Possible to Upload Certain Attachment Files To A Remote Server

My Situation I'm developing a book-store WordPress website where you can purchase and download books in PDF format. I don't want to use the local space for file storage (the host provider offers ...
user avatar
0 votes
0 answers
28 views

Wordpress5.2.3: Better File Download Plugin validation issue

I am using Better File Download plugin for uploading a PDF file from the Admin panel. The issue is it allows all file type which listed in wp_get_mime_types() function. I want to give a validation ...
user avatar
  • 101
0 votes
1 answer
611 views

Create template for just a print

I have custom post which prints some content in tabbed table, where only selected tab is visible. Now, if print is selected, I would like to print contents of all the tabs. The problem is, that some ...
user avatar
0 votes
1 answer
259 views

TCPDF only exports .pdf when user is administrator

Context I use TCPDF for PDF generation hooked to admin-post. The admin-post-action handling function retrieves an object from database according to query parameters, requires a template.php and ...
user avatar
0 votes
0 answers
291 views

Why embedded PDF documents sometimes failed to load on my website

My WordPress site Reload on every hour, and sometimes some of the PDF documents (random) don't load. All embedded PDF's are only one sided. Why is this happening? UPDATE: This happen only on Chrome ...
user avatar
0 votes
0 answers
18 views

PDF Viewer Origin is Different

PDFf POSTER or any other pdf viewer plugin is showing an error saying that the origin is different but the pdf files are hosted on the site itself. ERROR PAGE LINK
user avatar
1 vote
1 answer
1k views

Open Custom Post Type as PDF

I have a custom post type set up using CMB2. I have overriden the standard print template, so when a user wants to print the page it takes the CMB2 fields and organizes them into a specific layout ...
user avatar
  • 88
1 vote
3 answers
2k views

How to do string attachment with wp_mail

I'm using a gift card plugin for my woocommerce shop and I would like to add a generated pdf file to allow customers to download the gift card as a pdf. The idea is to use TCpdf or Fpdf to generate ...
user avatar
0 votes
1 answer
587 views

How to upload PDF from Front-End and post automatically?

I have a medical client and they want to upload and post pdf automatically. So I stumbled upon frontend uploader, which allows users to upload and post an image to a blog post. It does however post ...
user avatar
1 vote
1 answer
604 views

SSL certificate verify failed

I have a gift voucher plugin for wordpress that creates a PDF after a user has finished filling in a form and sends it to the users email. This plugin uses the fpdf library to create the pdf. It ...
user avatar
  • 11
0 votes
1 answer
2k views

Change meta data of pdf file

I've noticed recently that pdf files provided by client have got indexed with weird and random title tags when searched for in google (site:mysite.com/path-to-file.pdf). Now I've tried to change it ...
user avatar
  • 127
0 votes
1 answer
159 views

How to create multiple pages for PDFs

In my wordpress site, I have multiple PDFs that I need to display in individual pages. I could just create a page for each PDF, but this seems very tedious. The pages will each be very similar, they ...
user avatar
0 votes
1 answer
934 views

How do i create a search option for pdf's only

I need help with a search page. We are a circuit court and use the latest version of WordPress for our website (flcourts18.org). We want the public to be able to search our administrative orders, ...
user avatar
0 votes
0 answers
3k views

Some data has already been output, can't send PDF file - fpdf issue in Wordpress

I encountered a problem with FPDF in wordpress. Actually, I am developing a wordpress plugin where need to generate pdf. As a php application its working fine. But when I converted it to wordpress ...
user avatar
  • 23
2 votes
1 answer
1k views

How does the media library determine if a PDF file has preview images?

When PDF preview images are available, how does the Media Library determine that it needs to display them? Does it check for a '_wp_attachment_metadata' record in the postmeta table? And where in ...
user avatar
  • 661
1 vote
2 answers
87 views

Client PDF Upload (Catalogue) - Automatically update link to PDF

I've built a custom WP theme. In the footer is a button to "download catalogue". The catalogue is a PDF created by the client which is periodically updated. I'm looking for some pointers on a good ...
user avatar
3 votes
1 answer
4k views

automatic PDF invoice with FPDF in PHP (creating Plugin)

I hope someone can help me. What I would like to achieve: I would like to create an automatic PDF invoice, as soon as an order has taken place and download it to a folder. It DOES NOT have to be ...
user avatar
  • 374
0 votes
2 answers
2k views

Add Watermark to PDF's of logged in user in WordPress upon upload to media library [closed]

How can I add a watermark to my PDFs that are uploaded via the media library of the logged in WordPress User when viewing and printing the pdf. I have tried utilizing plugins but they are all limited ...
user avatar