GeneralStrange characters appear when I copy text from pdf file

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Minero
Posts: 3
Joined: Thu Jul 21, 2011 1:46 pm

Strange characters appear when I copy text from pdf file

Post by Minero »

Hello everybody,

I'm having problems when I try to copy a text existing in a PDF file generated by LaTeX.
I generated a PDF file using LaTeX and I opened it in Adobe Reader, xpdf and Okular. In these cases, I use the selection tool to copy a text and when I paste it into a txt file, strange characters and symbols appear instead of the text itself.
In .tex source code, I'm using package

Code: Select all

\usepackage[T1]{fontenc}
What am I doing wrong? How can I solve this problem?

Thanks

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Strange characters appear when I copy text from pdf file

Post by Stefan Kottwitz »

Hi Minero,

perhaps provide a code example, so we could test that.

Stefan
LaTeX.org admin
Minero
Posts: 3
Joined: Thu Jul 21, 2011 1:46 pm

Strange characters appear when I copy text from pdf file

Post by Minero »

Hello Stefan_K,

Code: Select all

\documentclass[12pt,a4paper,oneside,final]{book}

\usepackage[brazil]{babel}
\usepackage[latin1]{inputenc}      
\usepackage{amssymb}                    
\usepackage{amsmath,amsfonts}
\usepackage{setspace}                    
\usepackage[brazil]{varioref}           
\usepackage{indentfirst}            
\usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec} 
\usepackage{fancybox}             
\usepackage{color}                    
\usepackage{colortbl}               
\usepackage{rotating}
\usepackage{fancyvrb}                      
\usepackage{graphicx,xr}             
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{url}
\usepackage{algorithm}
\usepackage{geometry}                      
   \geometry{a4paper,top=20mm,bottom=20mm,left=30mm,right=20mm}
\usepackage{cite}


\hyphenation{
 re-es-cre-ve-re-mos
 ob-via-men-te
 bo-lhas
 su-per-vi-si-o-na-do
}

\usepackage[T1]{fontenc}             

\newcommand{\pr}{\hspace*{.7cm}}

\setlength{\topmargin}{-1mm}
\setlength{\oddsidemargin}{-0.6mm}
\setlength{\textheight}{23.5cm}
\setlength{\textwidth}{17.0cm}
\setlength{\unitlength}{1cm}
\linespread{1.2}

\begin{document}

% ---------------------------------------------------------------------------- %
\newpage
% ---------------------------------------------------------------------------- %
\begin{center}
 \begin{minipage}[c]{15cm}

  \chapter*{Abstract}

  \pr Image segmentation is an important step in the existing pattern recognition and feature extraction systems. The primal goal is to subdivide an image into its constituent regions. Among the many works published in the literature, we highlight the methods based on variational principles, which are effective tools to formulate stable techniques for image segmentation.
  
  \pr Here, we studied variational models for image segmentation present in literature, in which will be discussed their mathematical formulations and characteristics of their minimization processes. Among these techniques will be explored in detail the method {\it Region Growing} and segmentation models that can be derived from its energy functional. Inspired by this method, three modifications were proposed based on these models that minimize some of their limitations and which emerges as alternatives for real world image segmentation.
  
  \pr The proposed modifications were validated by the good results obtained using natural images, textured and noisy. In addition, some comparative results are shown with other similar techniques with the objective of reporting the effectiveness of the proposed models.

  \vspace{0.5cm}

  {\bf Key-words:} soft image segmentation, Region Growing, Variational Methods, Partial Differential Equations.

 \end{minipage}
\end{center}

\begin{center}
 \begin{minipage}[c]{15cm}

  \chapter*{Resumo}

  \pr A segmentação de imagens é uma importante etapa existente nos sistemas de reconhecimento de padrões e extração de características. Seu objetivo é subdividir uma imagem em suas regiões constituintes. Dentre os diversos trabalhos publicados na literatura, destacam-se os métodos baseados em princípios variacionais, que são ferramentas eficazes para se formular técnicas estáveis para segmentação de imagens. 
  
  \pr Neste trabalho, são estudados alguns modelos variacionais para segmentação de imagens existentes na literatura, nos quais serão analisados as suas formulações matemáticas e as características de seus processos de minimização. Dentre estas técnicas, serão explorados em detalhes o método {\it Crescimento de Regiões} e os modelos de segmentação que podem ser derivados do seu funcional de energia. Inspirados nesse método, foram propostas três modificações baseadas nesses modelos que minimizam algumas limitações de seus modelos e que surgem como alternativas para a segmentação de imagens do mundo real.
  
  \pr As modificações propostas foram validadas pelos bons resultados obtidos utilizando-se de imagens naturais, texturizadas e ruidosas. Além disso, são mostrados alguns resultados comparativos com outras técnicas semelhantes com o objetivo de relatar a eficiência destas propostas.
  \vspace{0.5cm}

  {\bf Palavras-chave:} segmentação {\it soft} de imagens, Crescimento de Regiões, Métodos Variacionais, Equações Diferenciais Parciais.

 \end{minipage}
\end{center}

\end{document}
The source code that I'm generating the PDF using LaTeX is above.
I'm compiling using the following sequences:

Code: Select all

#latex example.tex
#dvipdf example.dvi
Thanks!
Post Reply