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
0 answers
8 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
10 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
13 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
26 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
38 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
6 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
1 vote
1 answer
26 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
  • 111
0 votes
0 answers
23 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
80 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
  • 5,961
0 votes
0 answers
115 views

Looking for a way to insert PDF image preview in TinyMCE

We're still using TinyMCE as our post editor. When Editors use the 'Add Media' button to select a PDF from the Media Library, they choose the thumbnail or medium size image from the Attachment Display ...
jchwebdev's user avatar
  • 765
0 votes
0 answers
154 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
  • 765
0 votes
0 answers
24 views

Custom Search on media files PDF images pages posts

Hi all – hoping to find a code solution for developing a custom search bar in WordPress that searches for both Posts/Pages but will ALSO search for media files such as PDFs and images. Basically I ...
gg7nMUUU90's user avatar
0 votes
0 answers
30 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
774 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
46 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
0 answers
127 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: ...
FlourishDNA's user avatar
0 votes
0 answers
254 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
156 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
75 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
278 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
626 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
  • 5,979
1 vote
0 answers
264 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
1k 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
0 votes
1 answer
862 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
  • 621
0 votes
1 answer
176 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
270 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
299 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
57 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
46 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
191 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
3k 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
  • 765
0 votes
0 answers
215 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
695 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
110 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
  • 1,968
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 ...
charley5's user avatar
0 votes
0 answers
99 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
175 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
246 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
275 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
923 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
0 votes
1 answer
329 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 ...
Radovan Bezak's user avatar
0 votes
0 answers
384 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 ...
Valentin Gjorgoski's user avatar
0 votes
0 answers
21 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
richard marcuss's user avatar
1 vote
1 answer
2k 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 ...
Michael's 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 ...
Nicautre's user avatar