Dear All
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
Thanks in advance,
Paul
On Sun, 9 Apr 2006, Paul Smith wrote:
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
Does this work with a really trivial web page?
What does "pdffonts file.pdf" show?
If the pdf file uses strings, then you stand a better chance of being able to cut and paste from a pdf viewer to the editor, but you may run into encoding issues, so the pasted text is gibberish.
I get:
$ cat t.html abc
Print to ps from Firefox, convert to pdf, load in Adobe Reader, and cut and paste gives: "^Y^Z^[", so the encoding is a problem. Xpdf would not let me copy the text. The t.html.ps file has:
8 dict begin /FontName /Nimbus_Roman_No9_L.Regular.0.0.Set0 def /FontType 1 def /FontMatrix [ 0.001 0 0 0.001 0 0 ]readonly def /PaintType 0 def /FontBBox [-168 -281 1031 1098]readonly def /Encoding [ /.notdef /uni0066/uni0069/uni006C/uni0065/uni003A/uni002F/uni0068/uni006F /uni006D/uni0067/uni0077/uni0074/uni0057/uni0073/uni002E/uni0031 /uni0020/uni0030/uni0034/uni0039/uni0032/uni0036/uni0041/uni004D /uni0061/uni0062/uni0063/
This is the 'abc' --> '^Y^Z^[' encoding.
$ pdffonts t.html.pdf name type emb sub uni object ID ---------------------------- ------------ --- --- --- --------- YNAHAD+Nimbus_Roman_No9_L.Regular.0.0.Set0 Type 1C yes yes no 9 0
If the pdf file uses images, you need to use an OCR tool to get the text. I have seen cases where printing docs to PS on Win32 results in the text being rasterized in the driver so the PS file has images. This may happen with screen fonts and/or certain effects (transparency, text outlines filled with colored patterns).
On 4/9/06, George N. White III aa056@chebucto.ns.ca wrote:
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
Does this work with a really trivial web page?
What does "pdffonts file.pdf" show?
If the pdf file uses strings, then you stand a better chance of being able to cut and paste from a pdf viewer to the editor, but you may run into encoding issues, so the pasted text is gibberish.
I get:
$ cat t.html abc
Print to ps from Firefox, convert to pdf, load in Adobe Reader, and cut and paste gives: "^Y^Z^[", so the encoding is a problem. Xpdf would not let me copy the text. The t.html.ps file has:
8 dict begin /FontName /Nimbus_Roman_No9_L.Regular.0.0.Set0 def /FontType 1 def /FontMatrix [ 0.001 0 0 0.001 0 0 ]readonly def /PaintType 0 def /FontBBox [-168 -281 1031 1098]readonly def /Encoding [ /.notdef /uni0066/uni0069/uni006C/uni0065/uni003A/uni002F/uni0068/uni006F /uni006D/uni0067/uni0077/uni0074/uni0057/uni0073/uni002E/uni0031 /uni0020/uni0030/uni0034/uni0039/uni0032/uni0036/uni0041/uni004D /uni0061/uni0062/uni0063/
This is the 'abc' --> '^Y^Z^[' encoding.
$ pdffonts t.html.pdf name type emb sub uni object ID
YNAHAD+Nimbus_Roman_No9_L.Regular.0.0.Set0 Type 1C yes yes no 9 0
If the pdf file uses images, you need to use an OCR tool to get the text. I have seen cases where printing docs to PS on Win32 results in the text being rasterized in the driver so the PS file has images. This may happen with screen fonts and/or certain effects (transparency, text outlines filled with colored patterns).
Thanks, George and Mike. After pstill, I get
$ pdffonts file.pdf name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- Nimbus_Roman_No9_L.Regular.0.0.Set0 Type 1 yes no no 33 0 Verdana.Bold.0.0.Set0 Type 1 yes no no 37 0 Verdana.Regular.0.0.Set0 Type 1 yes no no 41 0 Lucida_Sans.Regular.0.0.Set0 Type 1 yes no no 45 0 Arial.Regular.0.0.Set0 Type 1 yes no no 49 0 Arial.Bold.0.0.Set0 Type 1 yes no no 53 0 Verdana.Italic.0.0.Set0 Type 1 yes no no 57 0 [1]- Done acroread anselmo.pdf [2]+ Done kwrite $
After ps2pdf, I get
$ pdffonts file.pdf name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- EOZSTF+Verdana.Regular.0.0.Set0 Type 1C yes yes no 13 0 MQEXGW+Arial.Regular.0.0.Set0 Type 1C yes yes no 19 0 DMCZLT+Lucida_Sans.Regular.0.0.Set0 Type 1C yes yes no 17 0 YTBXNU+Nimbus_Roman_No9_L.Regular.0.0.Set0 Type 1C yes yes no 8 0 GBGOAU+Verdana.Bold.0.0.Set0 Type 1C yes yes no 10 0 GMTXSU+Arial.Bold.0.0.Set0 Type 1C yes yes no 23 0 AJKQFS+Verdana.Italic.0.0.Set0 Type 1C yes yes no 26 0 $
Paul
Paul Smith wrote:
Dear All
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
Thanks in advance,
Paul
AIUI, PDF uses an internal font map, and when you copy/paste you get the internal font codes.
Mike
On 4/9/06, Paul Smith phhs80@gmail.com wrote:
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
The reported problem does not occur with Ghostscript 8.54. Fedora Core 5 uses the version 8.15 of Ghostscript, a version of 2004! Why is that?
Paul
The reported problem does not occur with Ghostscript 8.54. Fedora Core 5 uses the version 8.15 of Ghostscript, a version of 2004! Why is that?
Just a wild guess - I bet it has to do with the strange 'AFPL' license GS used to have.
Recently, I read somewhere that all future releases will be GPL, which might help to keep it current in FC....
Chris
On 9/10/06, Chris Mohler cr33dog@gmail.com wrote:
The reported problem does not occur with Ghostscript 8.54. Fedora Core 5 uses the version 8.15 of Ghostscript, a version of 2004! Why is that?
Just a wild guess - I bet it has to do with the strange 'AFPL' license GS used to have.
Recently, I read somewhere that all future releases will be GPL, which might help to keep it current in FC....
I suppose that you are right, Chris, but according to
http://lxer.com/module/newswire/view/63031/index.html
Ghostscript 8.54 is already GPL.
Paul
Yep.
Is this a good time to file a bug?
Nevermind: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=203369
Chris
On 4/9/06, Paul Smith phhs80@gmail.com wrote:
Dear All
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
Thanks in advance,
Paul
If you are simply looking to get the web page's displayed content to a text file, can't you simply save to a text file (save as, and select text files for the type, then give it a .txt extention for convenience).
Jacques B.
On 9/11/06, Jacques B. jjrboucher@gmail.com wrote:
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
If you are simply looking to get the web page's displayed content to a text file, can't you simply save to a text file (save as, and select text files for the type, then give it a .txt extention for convenience).
Thanks, Jacques, but what I really want is to be able of producing a pdf file (from a web-page) with the possibility of copying text to a text editor. Hopefully, Fedora Core will soon make available for users the version 8.54 of Ghostscript, which does not display the reported problem.
Paul
Thanks, Jacques, but what I really want is to be able of producing a pdf file (from a web-page) with the possibility of copying text to a text editor. Hopefully, Fedora Core will soon make available for users the version 8.54 of Ghostscript, which does not display the reported problem.
Paul
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
I figured it couldn't be that simple. But just in case...
Jacques B.
On Mon, 2006-09-11 at 10:21 +0100, Paul Smith wrote:
On 9/11/06, Jacques B. jjrboucher@gmail.com wrote:
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
If you are simply looking to get the web page's displayed content to a text file, can't you simply save to a text file (save as, and select text files for the type, then give it a .txt extention for convenience).
Thanks, Jacques, but what I really want is to be able of producing a pdf file (from a web-page) with the possibility of copying text to a text editor. Hopefully, Fedora Core will soon make available for users the version 8.54 of Ghostscript, which does not display the reported problem.
Paul
I am not sure but pdftk may have a function that does what you want.
On 9/11/06, Aaron Konstam akonstam@sbcglobal.net wrote:
I print to a file, file.ps, a web-page with text. Then, I apply ps2pdf and I get file.pdf. However, I cannot copy (from file.pdf) the text to a text editor. Can one get a pdf file with copyable text?
If you are simply looking to get the web page's displayed content to a text file, can't you simply save to a text file (save as, and select text files for the type, then give it a .txt extention for convenience).
Thanks, Jacques, but what I really want is to be able of producing a pdf file (from a web-page) with the possibility of copying text to a text editor. Hopefully, Fedora Core will soon make available for users the version 8.54 of Ghostscript, which does not display the reported problem.
I am not sure but pdftk may have a function that does what you want.
Thanks, Aaron, but, apparently, it does not.
Paul