Skip to main content

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
28 views

Get Specific Files (Only Specific Extension Type All Files in Loop ) from Media

I want to get Specific Extension Files from Media of Current Post Uploads—for Instance, .jpg or .png or .pdf, or MP4. (Get Only 1 Extension All Files From Current Post Uploads) Specific Extension ...
Islamic Quran Center's user avatar
0 votes
0 answers
31 views

Protect pdf file for only logged in user in nginx wordpress

I need to protect pdf file for only logged in user I have redirected all pdf files to php file and i need to open file if logged in if (!is_user_logged_in()) { // redirect to login page or show ...
vellai durai's user avatar
1 vote
0 answers
212 views

PHPWord and DOMPDF: PHP Fatal error: Uncaught Error: Class "Dompdf\Dompdf" not found

I'm trying to convert docx to PDF on woocommerce hook woocommerce_checkout_update_order_meta and I've tried to make .docx from template and it worked well, but now I have to convert the docx to pdf ...
Martin Orešanský's user avatar
0 votes
1 answer
70 views

How to generate PDF dynamically based on values from the database in WordPress

How to generate PDF by using the values from database without using plugin in WordPress. For example, I have a form and will enter the Name. Then it needs to fetch the data from DB based on the ...
Manikandan's user avatar
0 votes
1 answer
57 views

ACF file - How to force download instead of open in the browser

Using ACF, ACF file field PDF - How to force a file to download instead of open in the browser? Any proper way to disable the file URL/Path to view in inspect mode (Eg: scribd.com) <a href=&...
VKS's user avatar
  • 43
0 votes
0 answers
27 views

Why are PDF thumbnails over-saturated?

Often then colors of PDF thumbnails generated by Wordpress are wrong, they look over saturated. Is there something I can do to correct that, or is that caused by the PDF itself ?
mike23's user avatar
  • 6,001
0 votes
0 answers
15 views

Can I progressively load a page that has lots of PDF fies on it?

I have a page that has 41 individual PDF pages on it, does the progressive load plugins load each PDF as it becomes visible? The original issue was that with all pages in one PDF the page was 8MB in ...
Barry O'shaughnessy's user avatar
0 votes
0 answers
10 views

post comment dont show the pdf file wordpress

we use Wordpress6.4.1 and I would like to add a PDF document in Post Comment. I do it but I can't open the document. do you have a solution?
Herve Boris's user avatar
0 votes
0 answers
18 views

Organizing media files (pdf) and searching based on the folders created

I am attempting to find a way to search through sorted PDF files inside the media section of WP. My goal is to be able to set up different search engines within my site that pull from specified ...
M. Dave's user avatar
0 votes
0 answers
33 views

How to add Upload File function in WordPress Plugin

I'm trying to create a plugin in which I want the option of uploading pdf document file. My code is as follows: How can I proceed further? What function should I use in register_setting and how do I ...
RazKaz's user avatar
  • 1
0 votes
0 answers
27 views

Wordpress Site: PDF's are replicating virtual URL's

Single Wordpress Site Recently Migrated All software = Latest versions Php 7.4.33 (previously had 8.1 but host recommended we revert to see if this may be a fix) Apache V 2.4.57 MySQL V 10.6.14 ...
KSteele's user avatar
0 votes
1 answer
135 views

Xhr.send : PDF upload failed with status 400 and response 0

Hope you are doing good. I need your help if you may, please. I have a js code that actually generate a pdf client side and should supposely upload it on the wordpress server. It's not the first time ...
Louis-Emmanuel Metan's user avatar
0 votes
0 answers
7 views

sh ow different PDF based on URL param

I have a WP post that displays information based on a URL param from this post: https://cascoly-images.com/prints-products/ this works fine for creating the links i need - eg choose 'Rainier' and ...
steve estvanik's user avatar
2 votes
1 answer
145 views

Search with indexing and linking to PDF content

I need to implement a search functionality that makes the content of a PDF file indexable and links directly to the selected content area of the search query. Is that even possible and what is the way ...
tinytree's user avatar
  • 121
0 votes
0 answers
78 views

HTML content to align vertical and convbert to PDF

I am requireing PHP library of HTML to PDF, which supports external JS/CSS. What I excatly needed is HTML to PDF content with vertical align with auto page break. In Vertical align should support ...
Yagnesh's user avatar
3 votes
1 answer
137 views

How can I add custom sizes for PDF thumbnails generation?

I define custom image sizes in my theme like this : add_action( 'after_setup_theme', 'mwm_custom_image_sizes' ); function mwm_custom_image_sizes() { add_theme_support( 'post-thumbnails' ); ...
mike23's user avatar
  • 6,001
0 votes
0 answers
257 views

How can I change the page title of PDFs opened from a WordPress link which use the browser's viewer?

When you open a Media page and click the link to open an attached PDF, it uses the browser's own code to generate the HTML wrapper. And the HTML title is extracted from the PDF. We have many documents ...
jchwebdev's user avatar
  • 775
0 votes
0 answers
56 views

Updating Media Library PDF's in bulk

I've built a new site for my client that uses PDF's from the old site media library. He's redesigned all the pdf's and now has asked me to replace them on site. It should be noted that the old PDFs a ...
user28315's user avatar
  • 101
0 votes
1 answer
964 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 ...
T. Nelson's user avatar
0 votes
0 answers
60 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 ...
Aymen Eddaoudi's user avatar
0 votes
1 answer
211 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: ...
Dev Guy's user avatar
  • 141
0 votes
0 answers
272 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 ...
Çlirim Kastrati's user avatar
0 votes
0 answers
186 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="...
Mihnea-Octavian Manolache's user avatar
1 vote
1 answer
157 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 ...
please_help_me's user avatar
0 votes
1 answer
336 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 ...
billato's user avatar
0 votes
1 answer
795 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 ...
rudtek's user avatar
  • 6,163
1 vote
0 answers
345 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 ...
Joe's user avatar
  • 111
1 vote
1 answer
2k 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 ...
Catlard's user avatar
  • 113
1 vote
2 answers
1k 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 ...
eljefejb's user avatar
  • 641
0 votes
1 answer
222 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 ...
Jeff's user avatar
  • 1
0 votes
0 answers
286 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....
Andrés's user avatar
1 vote
0 answers
398 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 ...
niki's user avatar
  • 23
0 votes
0 answers
93 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 ...
Paul's user avatar
  • 1
0 votes
0 answers
58 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 ...
Celin Thomas's 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 ...
Çlirim Kastrati's user avatar
0 votes
1 answer
2k 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( ...
user7734861's user avatar
0 votes
1 answer
223 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 ...
Hamza's user avatar
  • 1
0 votes
1 answer
4k 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 ...
jchwebdev's user avatar
  • 775
0 votes
0 answers
237 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 ...
user193310's user avatar
2 votes
0 answers
804 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 ...
PepeLePew's user avatar
1 vote
0 answers
1k 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 ...
joshmoto's user avatar
  • 447
0 votes
0 answers
127 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() == '...
Lerry's user avatar
  • 111
1 vote
2 answers
1k 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 ...
Tony Djukic's user avatar
  • 2,109
0 votes
0 answers
22 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 ...
charley5's user avatar
0 votes
0 answers
149 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 ...
pietro's user avatar
  • 1
0 votes
1 answer
201 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 ...
sialfa's user avatar
  • 319
1 vote
0 answers
425 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 ;)
Oliv's user avatar
  • 11
1 vote
1 answer
287 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 ...
Babak Y.'s user avatar
0 votes
0 answers
30 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 ...
Ravi Soni's user avatar
  • 101
0 votes
1 answer
1k 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 ...
Pavel Janicek's user avatar