Title: Code a really custom PDF EXPORT for posts.
Last modified: August 22, 2016

---

# Code a really custom PDF EXPORT for posts.

 *  [nicopulse](https://wordpress.org/support/users/nicopulse/)
 * (@nicopulse)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-a-really-custom-pdf-export-for-posts/)
 * Hi,
 * I’m web dev, but new in WordPress. In my WP site have posts with many customs
   fields (custom fields with ACF plugin).
    - I want to make a php file to **generate pdf file** with **classic php/pdf 
      library**.
    - And a link in all post pages to get the pdf : [http://www.test.com/getPdfExport.php?postID=1234](http://www.test.com/getPdfExport.php?postID=1234)
 * But where I can put the php code ? In the theme directory ? In the plugin ?
    
   And what can be URL in my post page ?
 * Can someone help me to start ?
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [TrishaM](https://wordpress.org/support/users/trisham/)
 * (@trisham)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-a-really-custom-pdf-export-for-posts/#post-5685063)
 * You could put it in your theme’s functions.php file, and then call the function
   in your template for single posts so that it echos that URL with a variable that
   will enter the Post ID, but then if you switch Themes you’d lose that, so personally
   I would make it a plugin, if I were you.
 *  Thread Starter [nicopulse](https://wordpress.org/support/users/nicopulse/)
 * (@nicopulse)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-a-really-custom-pdf-export-for-posts/#post-5685102)
 * Ok thanks 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Code a really custom PDF EXPORT for posts.’ is closed to new replies.

## Tags

 * [export](https://wordpress.org/support/topic-tag/export/)
 * [pdf](https://wordpress.org/support/topic-tag/pdf/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [nicopulse](https://wordpress.org/support/users/nicopulse/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/code-a-really-custom-pdf-export-for-posts/#post-5685102)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
