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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
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