Title: PDF Export &#8211; Format / Display &#8211; Column
Last modified: April 23, 2020

---

# PDF Export – Format / Display – Column

 *  [daltai](https://wordpress.org/support/users/daltai/)
 * (@daltai)
 * [6 years ago](https://wordpress.org/support/topic/pdf-export-format-display-column/)
 * Hi Guys,
 * I am trying to recreate the PDF layout seen on this example – [https://dreamcargiveaways.co.uk/wp-content/uploads/2020/04/tool-bundle-2204.pdf](https://dreamcargiveaways.co.uk/wp-content/uploads/2020/04/tool-bundle-2204.pdf)
 * As you can see it uses a 3 column layout and has a title at the top for the product
   that was ordered.
 * Currently using advanced order export for WooCommerce I have been able to create
   a 1 column layout, not a 3 column one. The 1 column layout I have created is 
   here – [https://dreamwheelscompetition.co.uk/wp-content/uploads/2020/04/Competition_Entries-23-04-2020-12-42-32.pdf](https://dreamwheelscompetition.co.uk/wp-content/uploads/2020/04/Competition_Entries-23-04-2020-12-42-32.pdf)
 * As you can see one the first column is filled the next customer record moves 
   to a new page instead of moving to a new column.
 * Can you help me with recreating this?
 * Thanks,
 * Shane
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpdf-export-format-display-column%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [6 years ago](https://wordpress.org/support/topic/pdf-export-format-display-column/#post-12720122)
 * Hi Shane
 * we use CSV file as storage for PDF. So it’s possible to rebuild it.
 * try add following code to section “Misc Settings”
    thanks, Alex
 *     ```
       // rebuild CSV file to 3 columns 
       add_action("woe_pdf_started", function($pdf, $formatter){
           //read
           $file = fopen($formatter->filename, 'r');
           $keys = fgetcsv($file);
           $rows = array();
           while ($val = fgetcsv($file))
               $rows[] = $val;
           fclose($file);
   
           //write back
           $file = fopen($formatter->filename, 'w');
           fputcsv($file, array_merge($keys,$keys,$keys) ); //write 3 headers
   
           // merge lines 
           $row_out = array(); 
           $out_counter = 0;
           foreach($rows as $row) {
       		$out_counter++;
       		$row_out = array_merge($row_out,$row);
       		if($out_counter == 3 ) {
       			fputcsv($file,$row_out);
       			$row_out = array(); 
       			$out_counter = 0;
       		}	
           }    
       	if($out_counter != 0 ) 
       		fputcsv($file,$row_out);
   
           fclose($file);
       },10,2);
       ```
   
    -  This reply was modified 6 years ago by [algol.plus](https://wordpress.org/support/users/algolplus/).

Viewing 1 replies (of 1 total)

The topic ‘PDF Export – Format / Display – Column’ is closed to new replies.

 * ![](https://ps.w.org/woo-order-export-lite/assets/icon-256x256.png?rev=1365554)
 * [Advanced Order Export For WooCommerce](https://wordpress.org/plugins/woo-order-export-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-order-export-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-order-export-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-order-export-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-order-export-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-order-export-lite/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [algol.plus](https://wordpress.org/support/users/algolplus/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/pdf-export-format-display-column/#post-12720122)
 * Status: not resolved