Bug 248434 - Unusable filenames when printing to file
Summary: Unusable filenames when printing to file
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.10.5
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-19 22:21 UTC by Marcus Mehltau
Modified: 2010-08-27 21:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
a testcase that nicely demonstrates the problem (747.27 KB, application/pdf)
2010-08-19 23:58 UTC, Marcus Mehltau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Mehltau 2010-08-19 22:21:30 UTC
Version:           0.10.5 (using KDE 4.5.0) 
OS:                Linux

In the print dialog there is the option "Print to File". Until now Okular always chose the current filename and added i.e. a ".ps" instead of ".pdf". 
The new behaviour is to slurp a string from some PDF header fields, which in the worst case gives an XML expression as proposed filename. Even if one can hand-edit that, it's a pain. Please revert to the old (and sane) behaviour. 

Reproducible: Always

Steps to Reproduce:
Choose File->Print

Select "Print to File PS"

Now look at the proposed filename. Depending of PDF file there is a PDF header field in the string.
Comment 1 Albert Astals Cid 2010-08-19 22:57:29 UTC
Please attach a pdf that gives you this problem.
Comment 2 Marcus Mehltau 2010-08-19 23:58:17 UTC
Created attachment 50764 [details]
a testcase that nicely demonstrates the problem

This example is the most ridiculous I've encountered yet. It proposes some XML as filename. Have fun.
Comment 3 Albert Astals Cid 2010-08-27 21:15:23 UTC
This is actually not a bug. Okular uses the title of the document (if exists) as name for the file to print, that file you attached claims its title is

"<article-title> <xref ref-type="transliteration" rid="trans51" ptype="t519670" citart="citart1">Quer durchs Grönlandeis, die schweizerische Grönland-Expedition 1912/13. München 1914. -- Ergebnisse der Schweizerischen Grönlandexpedition, Résultats scientifiques de l'Expedition Suisse au Groenland 1912-1913</xref> </article-title> <contrib-group><contrib> <name name-style="western" index="De Quervain, A."> <given-names>A.</given-names> <surname>De Quervain</surname> </name> </contrib></contrib-group>"

and that is what we use.

Thanks for using Okular.
Comment 4 Marcus Mehltau 2010-08-27 21:34:07 UTC
OK, I agree that this is not a BUG, but it's still bugging me every time I want to print to a file (say, convert pdf to ps). Why was this introduced, and is there a way to get rid of that behavior?

The expected behavior, as it was before, is to use the filename and change the suffix (this is what almost every piece of software does). This "bug" really bites me, and I either try to fix it, or use something less annoying. Too bad, since I really like Ocular.

Thanks for all your work!
Comment 5 Albert Astals Cid 2010-08-27 21:41:03 UTC
Yes, get pdf files that are not broken. If it is you generating them bug the maker of the program that generates them.

The feature was introduced because *you* expect the filename to be used, but *other people* thought the file title is a much more sane default. And no there is no way to disable using the file title as default filename when printing. You might want to open a *separate* wish bug report saying you'd like the option of bypassing this. Of course it's still our program so we'll do what we think it's better for all our users.