Graphics, Figures & TablesImport Table Content from PDF

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Import Table Content from PDF

Post by NELLLY »

Hello,

I want to import the contents of a statistical table from Minitab to a document. To do this, I saved the table's contents in a PDF file and I used the package pdfpages.

Code: Select all

\documentclass[12pt]{article}
\usepackage[square]{natbib}
\usepackage{pdfpages}
\usepackage{tabularx,graphicx,rotating,subfigure,booktabs,multirow}
\begin{table}
\caption{tablecaption}\hline
\includepdf[pages={1}]{tablename.pdf}\hline
\end{table}
%%%%%%%%%Table's content%%%%
\includepdf[pages={1}]{tablename.pdf}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

In the output the table is empty. Howerver, when I use the command \includepdf[pages={1}]{table name.pdf} without defining a table the content's appear. What should I do? I think that the operation is possible .

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Import Table Content from PDF

Post by localghost »

With pdfpages the PDF file is included as a complete page. Hence it doesn't work in a float environment. Use the \includegraphics command from graphicx to get the desired result.


Remarks:
  • Think about creating the table directly with LaTeX code for better consistency.
  • Next time kindly prepare a self-contained and minimal example to give an adequate problem description. It's not the first time that you are told to do so and we don't want to repeat that request in every single thread.

Thorsten
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

Re: Import Table Content from PDF

Post by NELLLY »

Thanks. This works well now. Concerning your advices I was so busy, I will take them into account next time. :D
Post Reply