Graphics, Figures & TablesLost text in imported PDF

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
chw0112
Posts: 5
Joined: Wed Feb 22, 2012 4:31 pm

Lost text in imported PDF

Post by chw0112 »

I want to include a PDF in my document, which is output as a PDF as well. I've tried this two ways and I can't seem to make it so the text doesn't disappear. I've tried using Inkscape to convert it to a .pdf_tex and use epstopdf, and i've tried directly using pdfpages. Both times the text is lost when viewing the pdf in Texmaker X and Foxit. I have a feeling it is because the original pdf was generated on a mac, so my pc doesn't recognise the font, but even when I use Inkscape to convert the text to vectors it doesn't work, here's two examples of the code I'm using.

Code: Select all

\documentclass[10pt,a4paper,onecolumn]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{color}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[]{pdfpages}
\textwidth 6.25in
\oddsidemargin 0in
\textheight 650pt
\setlength{\unitlength}{1cm}
\voffset -1cm

\begin{document}
\begin{figure}[h]
\centering
\includepdf[angle=90]{Workbook11.pdf}
\label{fig:workbook}
\end{figure}
\end{document}
or

Code: Select all

\begin{document}
\begin{figure}[h]
\centering
\def\svgwidth{13cm}
\input{Workbook11.pdf_tex}
\caption{blaaaah}
\label{fig:workbook}
\end{figure}
\end{document}

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
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Re: Lost text in imported PDF

Post by Stefan Kottwitz »

Hi,

perhaps add such a PDF file here as attachment to a forum post, so we could test it on out TeX system.

Stefan
LaTeX.org admin
chw0112
Posts: 5
Joined: Wed Feb 22, 2012 4:31 pm

Re: Lost text in imported PDF

Post by chw0112 »

Sure thing, here you are!
Attachments
Workbook11.pdf
(33.92 KiB) Downloaded 407 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Lost text in imported PDF

Post by Stefan Kottwitz »

I tested it on Windows, and both \includepdf and \includegraphics work and show also the text. I attach an example. Can you see the text in that PDF file? If not, then it's a PDF viewer problem, as I can see the text.

Code: Select all

\begin{figure}[ht]
 \centering
 \includegraphics[angle=90,width=\textwidth]{Workbook11.pdf}
 \caption{Workbook}
 \label{fig:workbook}
end{figure}
Stefan
Attachments
work.pdf
(43.83 KiB) Downloaded 412 times
LaTeX.org admin
chw0112
Posts: 5
Joined: Wed Feb 22, 2012 4:31 pm

Re: Lost text in imported PDF

Post by chw0112 »

Thanks, it seems that I somehow lost the text in the pdf by trying to convert it to a .pdf_tex with inkscape. WHen I replaced the inkscape pdf with the original and used the code you provided it worked perfectly.
Post Reply