Scribus Forums

Scribus => PDF Generation => Topic started by: ronnietucker on April 10, 2011, 04:00:46 pm

Title: can't copy text from generated PDF
Post by: ronnietucker on April 10, 2011, 04:00:46 pm
Hi folks,

For some reason I (and my readers) are unable to select and copy text from the PDF's that I'm generating from Scribus.

Each page has a text box that has four columns, the text for the text box is pasted into the Story Editor, and I then add any images on top of the text box. I do that for each article. I have several paragraph styles, one has the new Ubuntu font (which is what I mostly use) and one has a basic courier font style. The courier style WILL select/copy to the clipboard, but the Ubuntu style won't. But even when the courier style does select (for copying) it selects horizontally across the four columns, rather than top to bottom, left to right. This makes it impossible to copy programming code, or command line commands.

My PDF's can be downloaded from: http://fullcirclemagazine.org
and an archive of each issue from: http://wiki.ubuntu.com/UbuntuMagazine (under the /Translations section)

Any help would be much appreciated.
Title: Re: can't copy text from generated PDF
Post by: ronnietucker on April 10, 2011, 04:31:00 pm
UPDATE:

I believe it has something to do with the new Ubuntu font. Scribus will embed the bold Ubuntu font, but will only outline the regular and italic fonts.

Is there any way to force embedding of the italic and regular, or is this a problem with the Ubuntu font itself?

The problem with selections going horizontal is still there though  :(
Title: Re: can't copy text from generated PDF
Post by: John_Jason_Jordan on April 10, 2011, 07:28:02 pm
UPDATE:
I believe it has something to do with the new Ubuntu font. Scribus will embed the bold Ubuntu font, but will only outline the regular and italic fonts.
Is there any way to force embedding of the italic and regular, or is this a problem with the Ubuntu font itself?

Go into Preferences > Fonts and check to see which check boxes are ticked for the fonts in question.
Title: Re: can't copy text from generated PDF
Post by: ronnietucker on April 10, 2011, 07:33:05 pm
UPDATE:
I believe it has something to do with the new Ubuntu font. Scribus will embed the bold Ubuntu font, but will only outline the regular and italic fonts.
Is there any way to force embedding of the italic and regular, or is this a problem with the Ubuntu font itself?

Go into Preferences > Fonts and check to see which check boxes are ticked for the fonts in question.

It has all four Ubuntu fonts (bold, regular, italic and bold italic) ticked for: 'Use Font', 'Embed In (Postscript)', and 'Subset'.
Title: Re: can't copy text from generated PDF
Post by: Meho R. on April 10, 2011, 09:10:20 pm
Untick "Subset".
Title: Re: can't copy text from generated PDF
Post by: ronnietucker on April 10, 2011, 10:11:24 pm
Untick "Subset".

That did it! MANY thanks!   :)
Title: Re: can't copy text from generated PDF
Post by: Morda on March 06, 2012, 08:22:51 pm
Hi guys!

I have a problem similar to Ronnie's (that's why I use this old topic), unfortunately Meho's advice does not work for me.

Here's the situation:

When I export my (all text) file, the pdf I get is a bit strange: some parts of the text behave like text (can be selected and copied, are searchable, etc.), but some are just an image. The division has to do with fonts: some of them create text, the remaining create image. I enclose a test .sla and .pdf files. As you can see, with Arabic typesetting, Arial and Letter Gothic the  result is text , with Calibri and Cambria there´s image.

In this .sla file I outlined all the fonts (in order to reduce the file size) — there´s no change with embedding.

Another pdf version? - no, the result is the same for 1.5 and for 1.3.

I thought that maybe there´s a difference in the font permissions to embed, but all of them  are marked as "editable".

I have noticed that pdf readers (Acrobat Reader, Foxit Reader) or Acrobat X do not show all the fonts used in the document — I don´t know whether this is important or not.


Well, I think that will be it. If any of you can help me with this, I´ll apprec¡ate any suggestion.    (I use 1.4.0 rc5, Win)

Take care,

Morda
Title: Re: can't copy text from generated PDF
Post by: utnik on March 06, 2012, 09:01:10 pm
hi morda

could you upload a package which includes the fonts as well? when i open the .sla, scribus replaces the fonts – not the best setting to track down the problem…

utnik
Title: Re: can't copy text from generated PDF
Post by: Morda on March 06, 2012, 09:12:56 pm
Sure. I upload both the .sla and the .pdf — just in case.

Morda
Title: Re: can't copy text from generated PDF
Post by: Nermander on March 06, 2012, 09:44:19 pm
Scribus currently can not embed certain fonts, I think Open Type fonts are the problem. They will be "subset" which if I recall correct means they are converted to outlines (or something like that). It means they will not appear as text in the PDF.
Title: Re: can't copy text from generated PDF
Post by: utnik on March 06, 2012, 10:37:10 pm
hi morda

Sure. I upload both the .sla and the .pdf — just in case.

this .sla file is comes still without the used fonts – what i meant, was: 'file' → 'collect for output…', then zip and upload this folder.

utnik
Title: Re: can't copy text from generated PDF
Post by: Morda on March 07, 2012, 12:16:38 am
Oooops, sorry, a misunderstanding. Here comes the file with all.

Morda
Title: Re: can't copy text from generated PDF
Post by: Nermander on March 07, 2012, 08:31:25 am
The PDF only have 3 embedded fonts:

ArabicTypesetting
ArialMT
LetterGothic-Reg

They are all TrueType.

So I think my previous analyze stands: The erring fonts are Open Type fonts and get converted to outlines.
Title: Re: can't copy text from generated PDF
Post by: utnik on March 07, 2012, 09:05:25 am
hi morda

take a look at http://bugs.scribus.net/view.php?id=8950 (http://bugs.scribus.net/view.php?id=8950) – maybe, this is the solution: go to 'file' → 'document setup' → 'fonts', search for the font in question and see, if the 'subset' box is checked (if so, uncheck it…)

utnik
Title: Re: can't copy text from generated PDF
Post by: Morda on March 07, 2012, 05:42:45 pm
→ Nermander: 
Exactly, this is what I said before ("...pdf readers (Acrobat Reader, Foxit Reader) or Acrobat X do not show all the fonts used in the document"). The fonts that are not shown in pdf are just the ones that pose problems.

OK, you say OpenType / TrueType. But... how do I tell  the type of a given font? A silly question? - maybe not:
- in Character Map fonts are accompanied by a little icon: for some of them it's "TT", for some "O" and a small group has none. I guess that "TT" stands for TrueType and "O" for "OpenType". Well, let's see: Arabic Typesetting: "O", Arial: "O", Calibri: "O", Cambria: "O", Letter Gothic: "TT".
- in Control Panel → Fonts → (double click on a chosen font): 
Arabic Typesetting (OpenType): "OpenType arrangement, digitally signed, TrueType outlines",
Arial (OpenType): "OpenType arrangement, digitally signed, TrueType outlines",
Calibri (OpenType): "OpenType arrangement, digitally signed, TrueType outlines",
Cambria (TrueType): "OpenType arrangement, TrueType outlines",
Letter Gothic (TrueType): "TrueType outlines".

The difficult fonts are, in my case, Calibri and Cambria. But Character Map shows them as the same kind of font as non problematic Arabic Typesetting and Arial, while the Control panel shows Cambria and Calibri as fonts of different types. A complete mess and no clue to solve the problem.

→ utnik: 
This trick is what helped Ronnie a year ago. Unfortunately, as I've already written, ticking and unticking the "Subset" option changes nothing. Well, there is a little difference: if this option is selected, I cannot embed the font and it has to be outlined. But in either case the parts for which Calibri and Cambria were used are not "real text" in pdf.
Title: Re: can't copy text from generated PDF
Post by: Nermander on March 08, 2012, 09:01:45 am
I don't think the problem is possible to solve, yet. You have to remember that Scribus is first of all intended for print ready work. It's how the page looks when printed that is most important.

You also should consider the consequences of embedding 10+ MB fonts into a PDF. (Yes, fonts supporting many languages can be that big.)
Title: Re: can't copy text from generated PDF
Post by: Morda on March 13, 2012, 06:51:30 pm
You have to remember that Scribus is first of all intended for print ready work. It's how the page looks when printed that is most important.)
Absolutely true. My work is intended for print and that´s why I sent some sample files to my printers. "Unfortunately none of the files could be printed. We are not able to tell the reason. Maybe the files contain some non-standard settings which are not shown as errors." They say they checked the pdf-s with their usual tools - the files are apparently good... but no printing is possible. It seems that I´m in bigger trouble than I was before.
Title: Re: can't copy text from generated PDF
Post by: a.l.e on March 13, 2012, 07:30:41 pm
strange...

was the .pdf huge?

lot of outlined glyphs?

are you using scribus 1.4?

it's very rare that pdfs created by scribus  fail at the printer, with a bit more details we could even try to help you...

ciao
a.l.e
Title: Re: can't copy text from generated PDF
Post by: Morda on March 13, 2012, 08:05:59 pm
strange...
it's very rare that pdfs created by scribus  fail at the printer

I know. Before I decided to use Scribus I read a lot about the program and so I know it´s not a toy. And that´s why I feel a bit disappointed now. But I do hope that there is a solution  :)

Quote
with a bit more details we could even try to help you... was the .pdf huge? lot of outlined glyphs? are you using scribus 1.4?

OK, I think that instead of describing the file that was rejected by the printers´system I´ll just attach it. (Actually, two files were tested: one with all 5 fonts embedded and one with all of them outlined. I only attach the smaller file as the bigger´s size slightly exceeds the 2 MB limit.)

I use Scribus 1.4.0rc5 with Win7 Professional SP1.

If you need more information, I´ll be glad to supply it. (You might want to read a couple of my previous posts with the information why I got suspicious about the pdfs in the first place.)

Greets,
Morda
Title: Re: can't copy text from generated PDF
Post by: a.l.e on March 14, 2012, 12:20:55 pm
if you try select some text in your pdf you will notice that not all the text is selectable.

the part which is not selectable has been converted to outlines.

if you have lot of such glyphs, the printer will need way too much memory...

for longer bunches of text you should really use a font that can be embedded or at least subset.

without knowing more about the fonts you used, why you're using them and whether you could consider using another font, it's hard to give you a better hint, than simply changing them.

good luck and ask further if you need more help
a.l.e
Title: Re: can't copy text from generated PDF
Post by: Nermander on March 14, 2012, 12:27:28 pm
"Unfortunately none of the files could be printed. We are not able to tell the reason. Maybe the files contain some non-standard settings which are not shown as errors." They say they checked the pdf-s with their usual tools - the files are apparently good... but no printing is possible.

That looks as if the printer people do not know what they are doing. If the file passes their pre-flight check but does not print it surely is a problem on their side.

As a.l.e suggests it is probably a memory problem, their RIP (or printer) does not have enough memory.
Title: Re: can't copy text from generated PDF
Post by: Morda on March 14, 2012, 05:38:51 pm
That looks as if the printer people do not know what they are doing.

Well, I think they probably do: we are talking about a fully professional printing shop with the best equipment. And the opinion among the clients is excellent. (That's why I chose them.)

Quote
(...) it surely is a problem on their side. As a.l.e suggests it is probably a memory problem, their RIP (or printer) does not have enough memory.

With a 2-page 680 kB document? I doubt.


if you try select some text in your pdf you will notice that not all the text is selectable.

This was why I started to suspect that there may be some problems with the pdfs I am creating with Scribus. I tried to get some help here but till now the problem is unsolved.

Quote
the part which is not selectable has been converted to outlines.

Not exactly so: the non-selectable parts are set with some fonts and the selectable parts - with other fonts. (In the pdf I uploaded all fonts have been converted to outlines - at least this was what I had told Scribus to do...)

Quote
for longer bunches of text you should really use a font that can be embedded or at least subset.

In the file I could not upload here (due to its size) all the fonts were embedded (again: this was what Scribus had been asked to do), but the printer reports the same problems as in the all-outlined .pdf file.

Quote
without knowing more about the fonts you used (...)


Well, the two fonts that seem to pose problems (Cambria and Calibri) come with Windows and that is why I thought that they are of at least decent quality.

Quote
(...) and whether you could consider using another font (...)

I would prefer to keep to the ones I've chosen, but if there's no other solution (and if I can be sure that this will solve the problem), I'll give up and will choose some other fonts. But will this solve my problem?
Title: Re: can't copy text from generated PDF
Post by: a.l.e on March 14, 2012, 07:59:29 pm
for two pages, outlined fonts can't be the issue...

expect if you typed your text with size 4...

the issue could come from a bad font... or a bad image...

if you think that everything you're using in your file is correct, please, upload a .pdf that fails at your printer to the bug tracker (http://bugs.scribus.net).
marking the issue as "private" will make it visible to the developers only (... if the pdf contains data that you don't want the whole world to see)

ciao
a.l.e
Title: Re: can't copy text from generated PDF
Post by: Nermander on March 15, 2012, 08:26:19 am
Well, I think they probably do: we are talking about a fully professional printing shop with the best equipment. And the opinion among the clients is excellent. (That's why I chose them.)

Since they can not tell why their equipment can not print your PDF, they can not have sufficient knowledge of the limitations in their equipment. Since the PDF passed their pre-flight but does not print, their pre-flight must be missing some important aspect of their equipments limitations.

It's as if a mechanic would say "We checked your car and can't find anything wrong, but it still doesn't run".

I would be surprised if high end equipment would just silently refuse to print a document, surely there must be some kind of error message somewhere.

Quote
With a 2-page 680 kB document? I doubt.

In a printer, and a RIP, each page is rasterized. Complex pages will require more memory to be rasterized. It is usually not the size of the document that matters but the complexity of each page. If the document is just text or vectors (no images or embedded fonts) the document size is small, but the rasterized page size can be huge.
Title: Re: can't copy text from generated PDF
Post by: Morda on April 04, 2012, 08:51:19 pm
I tried to avoid it, but finally I decided to change the problematic fonts and, though it cost me some extra work, the result is what I needed: no more objections from my printer. In the meantime I discovered something. Definitely it´s not the explanation of the problems I described earlier, but I think it may be interesting for somebody. Or maybe not... Well, I just did not want to leave this unfinished  :)

Just to remind you the problem: I created a pdf using 5 different fonts; some parts of the text were selectable, some unselectable, and it depended on the font used for a given fragment. My printers told me that this pdf would not print well, although they were not able to tell the reason. I thought that some of the fonts might be faulty - but no, when we checked 5 pdfs, each with just one font, all documents were OK. Then I created 2 pdf documents: one with 3 "selectables", another with 2 "unselectables". They also resulted acceptable for the printer (in 2 versions: with outlines and with embedding). So my conclusion is that there must be some kind of a conflict between different types of fonts (maybe created by the software used by my printers).

Anyway, I learned something for the future, so thanks to all of you.


Greetings,

Morda
Title: Re: can't copy text from generated PDF
Post by: Meho R. on April 05, 2012, 10:18:25 pm
There was a discussion about this issue some time ago, and it seems that only some Microsoft's fonts resist to be correctly embedded and/or subset, at least in Scribus (everything is normal in a PDF generated by Libre Office).

I experimented a little bit with Cambria and Calibri fonts and noticed that, when TTF fonts get converted to OTF, or even saving them again as TTF (I used FontForge to convert Cambria.ttf and Calibri.ttf to OTF and TTF, ignoring bitmap fonts included in TTF files and testing only Cambria, but not Cambria Math), embedding and subsetting work as expected and the resulting PDF is searchable. I did only a simple conversion and a quick testing, so I cannot tell if there are any repercussions. It seems that something in those fonts' design is preventing Scribus to handle them properly. Personally, I'd rather avoid both these fonts (as well as other MS fonts) and use some "safe" professional fonts instead.