Fonts & Character SetsCopy and Paste of pdf gives Chinese characters only

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
marek_step
Posts: 27
Joined: Sun Aug 19, 2012 8:48 am

Copy and Paste of pdf gives Chinese characters only

Post by marek_step »

Hello all!


I have a large pdf mainly written in English, but with some Chinese characters in it.

The output (pdf - made with pdflatex in Terminal - shell) is good. Only the copy and paste on the pdf is not possible. Highlighting English text in the pdf and copy it, pasting it for example in Safari for internet search is giving Chinese Characters only.

I tried to make a dummy file, with the same headers of the original, but the copy on the pdf and paste was working here. Something of my code:

Code: Select all

\documentclass[twoside=false,BCOR=12mm,DIV=calc,headsepline=yes,headings=normal,draft=true]{scrartcl} 
\KOMAExecuteOptions{fontsize=12pt}
\linespread{1.3}
\KOMAoptions{DIV=classic}
\pagestyle{headings}
\usepackage[utf8]{inputenc}
\usepackage{CJKutf8}
\usepackage[T1]{fontenc}
\usepackage[german,french,english]{babel}
\usepackage{color}
\usepackage{graphicx}
\usepackage{eurosym}
\usepackage{longtable}
\usepackage{booktabs, tabularx}
\usepackage[normalem]{ulem}
\usepackage[backend=biber,style=authoryear]{biblatex}
\usepackage{csquotes}
\usepackage[hyperindex=true]{hyperref}
\usepackage{titlesec}
\addbibresource{china_cosmetics.bib}
\setlength{\heavyrulewidth}{0.1em}
\newcommand{\otoprule}{\midrule[\heavyrulewidth]}
\titleformat{\section
}

the Chinese characters are inserted as follows: \begin{CJK*}{UTF8}{gbsn} 中~国 \end{CJK*}

Is there a problem, when a pdf is becoming "too" large??? Thank you for your help


marek
Last edited by Stefan Kottwitz on Sun Aug 19, 2012 9:46 am, edited 1 time in total.

Recommended reading 2024:

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

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

marek_step
Posts: 27
Joined: Sun Aug 19, 2012 8:48 am

Copy and Paste of pdf gives Chinese characters only

Post by marek_step »

I think, that I have found the solution myself:


My Chinese letters were embedded "inline" like follows:

Code: Select all

The name ``Middle Kingdom'' which originally comes from the Chinese characters 
\begin{CJK*} {UTF8}{gbsn} 中~国 \end{CJK*} \emph{zhongguo} means ``country of the middle''.
Running the latex tidy script from Eric Hsu over my document, this code reads now like follows:

Code: Select all

The name ``Middle Kingdom'' which originally comes from the Chinese characters 
\begin{CJK*}
	{UTF8}{gbsn} 中~国 
\end{CJK*}
\emph{zhongguo} means ``country of the middle''.
... and the strange copy & paste problem of my pdf-file has gone away!


Thank you all


marek
Post Reply