[FEATURE REQ] Copy selected text into highlight popup
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
grovel
- User
- Posts: 13
- Joined: Thu Mar 27, 2008 1:27 pm
[FEATURE REQ] Copy selected text into highlight popup
Dear developers,
First of all, thanks for this great pdf viewer, it replaced foxit instantly.
One feature I would like to see is to automatically copy selected text into highlight popups.
Acrobat Pro provides the following two options in the Commenting-Settings:
"[ ] Copy encircled text into Drawing comment pop-ups"
"[ ] Copy selected text into Highlight, Cross-Out, and Underline comment pop-ups"
I always annotate and highlight texts as I read. Since it is relatively easy to extract the contents of comments, or print summaries of the comments, this would give me excellent summaries of everything I highlighted.
Thank you very much for considering this,
J. Grovel
First of all, thanks for this great pdf viewer, it replaced foxit instantly.
One feature I would like to see is to automatically copy selected text into highlight popups.
Acrobat Pro provides the following two options in the Commenting-Settings:
"[ ] Copy encircled text into Drawing comment pop-ups"
"[ ] Copy selected text into Highlight, Cross-Out, and Underline comment pop-ups"
I always annotate and highlight texts as I read. Since it is relatively easy to extract the contents of comments, or print summaries of the comments, this would give me excellent summaries of everything I highlighted.
Thank you very much for considering this,
J. Grovel
-
Ivan - Tracker Software
- Site Admin
- Posts: 3603
- Joined: Thu Jul 08, 2004 10:36 pm
-
grovel
- User
- Posts: 13
- Joined: Thu Mar 27, 2008 1:27 pm
-
John - Tracker Supp
- Site Admin
- Posts: 5225
- Joined: Tue Jun 29, 2004 10:34 am
Pleasure 
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
logies
- User
- Posts: 9
- Joined: Sat Apr 26, 2008 3:07 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
I want to do the same: Read a PDF-File, annotate and later extract only the annotations/comments. This would be an excellent way to excerpt (at least) text from larger PDF-Files.grovel wrote: I always annotate and highlight texts as I read. Since it is relatively easy to extract the contents of comments, or print summaries of the comments, this would give me excellent summaries of everything I highlighted.
Is this already possible with PDF Xchange Viewer? Will it be available and when in which version (free/pro)?
Thanks!
Michael
-
grovel
- User
- Posts: 13
- Joined: Thu Mar 27, 2008 1:27 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
Thanks again, this is really very much appreciated. You've just earned yourself a new customer 
-
logies
- User
- Posts: 9
- Joined: Sat Apr 26, 2008 3:07 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
Can you tell me, how you do this?Since it is relatively easy to extract the contents of comments, or print summaries of the comments,
Thanks!
Michael
-
grovel
- User
- Posts: 13
- Joined: Thu Mar 27, 2008 1:27 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
Highly experimental and only works if you have Zotero:
http://forums.zotero.org/discussion/802/
However, you can also install Foxit and export the comments you've made in the PDF-XChangeViewer into an FDF. This is easily parseable by even the most rudimentary script. (Or you can just print it as a txt-file)
http://forums.zotero.org/discussion/802/
However, you can also install Foxit and export the comments you've made in the PDF-XChangeViewer into an FDF. This is easily parseable by even the most rudimentary script. (Or you can just print it as a txt-file)
-
Ivan - Tracker Software
- Site Admin
- Posts: 3603
- Joined: Thu Jul 08, 2004 10:36 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
Exporting Comments to FDF file should be added into build 2.0.38.
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
logies
- User
- Posts: 9
- Joined: Sat Apr 26, 2008 3:07 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
I still had Foxit on my PC and yes, it`s easy to export comments to a fdf. But this doesn`t help, because the fdf only contains references to the comments in the pdf (I think), not the comments itself. And I can`t write any script.
I can see for what fdfs can be used , but at the moment they are useless for being used as a excerpt method (for an end user like me).
Best Regards
Michael
I can see for what fdfs can be used , but at the moment they are useless for being used as a excerpt method (for an end user like me).
Best Regards
Michael
-
logies
- User
- Posts: 9
- Joined: Sat Apr 26, 2008 3:07 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
I found a commercial tool, fdf-converter, which converts fdfs to excel- or word-files:
http://shop.pdf-office.com/index.php?cPath=30
But it`s 94€ which I consider too much. And I don`t need excel or word. *.txt or *.pdf would be enough.
Any plans to include such a feature in PDF-XChange-Viewer?
Thanks
Michael
http://shop.pdf-office.com/index.php?cPath=30
But it`s 94€ which I consider too much. And I don`t need excel or word. *.txt or *.pdf would be enough.
Any plans to include such a feature in PDF-XChange-Viewer?
Thanks
Michael
-
grovel
- User
- Posts: 13
- Joined: Thu Mar 27, 2008 1:27 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
The following script will convert a FDF file with comments into a HTML file.
Please mark that this, too, is experimental, and I've only developed it for my own specific purposes, it is very likely to not do what you want.
Copy the code into a file called parse-fdf.js then drop the fdf-file onto it (or run it from a console window as "parse-fdf.js file.fds") it will then create an html-file in the same folder. This will ONLY work to extract highlights if you marked the highlights in the Viewer with the option to copy the highlighted text into the comment popup. Only then does this content end up in the fdf-file.
You will need to have the Windows Scripting Host installed (This probably is already the case).
Please mark that this, too, is experimental, and I've only developed it for my own specific purposes, it is very likely to not do what you want.
Copy the code into a file called parse-fdf.js then drop the fdf-file onto it (or run it from a console window as "parse-fdf.js file.fds") it will then create an html-file in the same folder. This will ONLY work to extract highlights if you marked the highlights in the Viewer with the option to copy the highlighted text into the comment popup. Only then does this content end up in the fdf-file.
You will need to have the Windows Scripting Host installed (This probably is already the case).
Code: Select all
*
* copy code into a file called "parse-fdf.js"
*
* This script parses an FDF-file (as can be exported by Adobe Acrobat)
* and writes the highlights and annotations it finds into a readable
* HTML-file.
* Just drop the FDF-file onto the script.
* In Adobe Acrobat 8 and the PDF-XChange Viewer you can change the
* comment-settings so that the highlighted text is automatically copied
* into the note which comes with every highlight. Only if activated can
* this small script extract it from the FDF file. It also works with
* FDFs created by Foxit-Reader (mark however, that Foxit cannot
* automatically copy highlighted text into a note).
*
* ! Requires Windows Script Host to be installed.
* ! It will overwrite any previously parsed output without notice.
*
* This Software is licensed under the terms of the GPL.
* Visit http://www.gnu.org/copyleft/gpl.html for further information.
*
* Copyright 2007. Matthias Heim
* Version 0.3 removes escaped sequences (\) better, supports advanced italics et.al.
* Version 0.2 introduces Pagerenumbering. Create Note on page from which
* on you want to renumber. "PageRenumber:(1)", user [1] for
* roman numerals.
* Version 0.1 (works for me, don't expect updates)
*
* Originally published in this thread in the Zotero Forum.
* http://forums.zotero.org/discussion/772/pdf-annotations-import/#Item_5
*
*/
// Test whether only one file passed on command line (or dropped onto js)
if (WScript.Arguments.length!=1) {
WScript.Echo("Drop 1 (only) FDF file onto Program");
WScript.Quit();
}
// Test whether file has FDF extension
var filename=WScript.Arguments.Item(0);
if (filename.search(/fdf$/i)==-1) {
WScript.Echo("No FDF file, Quitting");
WScript.Quit();
}
// Read FDF File into Variable s
var objFSO = new ActiveXObject("Scripting.FileSystemObject");
var objFile = objFSO.OpenTextFile(filename, 1);
// Cut ".fdf"-extension from filename
filename=filename.replace(/\.fdf$/i,"");
// Open HTML-Output File and initialize it
var objOutputFile = objFSO.CreateTextFile(filename+".pdf-Comments.html", true);
objOutputFile.WriteLine("<HTML><HEAD><TITLE>Annotations and Highlights in '"
+filename+".pdf'</TITLE></HEAD><BODY><CENTER><P><H1>« "
+filename.slice(filename.lastIndexOf("\\")+1)
+" »</H1><hr noshade width=60%><H3>Highlights and Annotations</H3></P></CENTER><TABLE width=80%>");
// Read FDF-file into s
var s=""
while (!objFile.AtEndOfStream) s += objFile.ReadLine();
objFile.Close();
// Create Storage Pool
var StoreIndex=0;
var StorePgNr = new Array();
var StoreCType = new Array();
var StoreText = new Array();
// Page renumbering String
var PgRenumber = "0:0,";
// Loop through fdf (in s) and extract notes and highlights
// Check for the first Pagenumber (that comes with any comment)
var pos=s.search(/R\s*\/Page/i);
while (pos!=-1) {
var firstpart=s.slice(0,pos);
s=s.slice(pos+4);
//Get Pagenumber from String akin to "ge 12>>"
var pgnr=parseInt(s.slice(s.search(/\d/),s.search(">")))+1;
//Get Comment-Type
var ctype=0;
var dummy=firstpart.search(/Subtype\s*\/Text/i);
if (dummy!=-1) {
ctype=1;
} else {
dummy=firstpart.search(/Subtype\s*\/Highlight/i);
if (dummy!=-1) {
ctype=2
} // else append new comment types here
}
//Get Comment (if of known type) from String as in "Contents (This is the comment)/"
if (ctype!=0) {
firstpart=firstpart.slice(dummy);
var dummy=firstpart.search(/Contents\s*\(/i);
if (dummy!=-1) {
firstpart=firstpart.slice(dummy);
firstpart=firstpart.slice(firstpart.search(/\(/)+1,firstpart.search(/\)\//));
firstpart=firstpart.replace(/\\r/ig," "); // cleaning up linebreaks
firstpart=firstpart.replace(/\\\)/ig,")");
firstpart=firstpart.replace(/\\\(/ig,"(");
firstpart=firstpart.replace(/\\\s/ig,"");
var formatpos=firstpart.search(/\B\/\b/);
while (formatpos!=-1) {
if ((firstpart.slice(formatpos+2).search(/\b\/\B/))!=-1) {
firstpart=firstpart.slice(0,formatpos)+"<i>"+firstpart.slice(formatpos+1).replace(/\b\/\B/,"</i>");
formatpos=firstpart.indexOf("</i>",formatpos)+4;
formatpos=firstpart.slice(formatpos).search(/\B\/\b/);
if (formatpos!=-1) formatpos+=firstpart.indexOf("</i>")+4;
} else formatpos=-1;
}
if (firstpart.search(/^PageRenumber/i)!=-1) { // Page renumbering found
PgRenumber+=pgnr.toString()+":"+firstpart.replace(/[^\d\[\(]/g, "").replace(/^[^\d\[\(]/g,"")+",";
} else {
if (firstpart!="") { // store comment in pool if not empty
StorePgNr[StoreIndex]=pgnr;
StoreCType[StoreIndex]=ctype;
StoreText[StoreIndex]=firstpart;
StoreIndex++;
}
}
} //else no comment found
}
pos=s.search(/R\s*\/Page/i);
}
if (StoreIndex>0) {
// Sort Entries
for (var i=0; i<StoreIndex; i++) {
for (var j=StoreIndex-1; j>i; j--) {
if (StorePgNr[i]>StorePgNr[j]) {
var pgnr=StorePgNr[j];
var ctype=StoreCType[j];
var cText=StoreText[j];
StorePgNr[j]=StorePgNr[i];
StoreCType[j]=StoreCType[i];
StoreText[j]=StoreText[i];
StorePgNr[i]=pgnr;
StoreCType[i]=ctype;
StoreText[i]=cText;
}
}
}
// List Entries
var page=0;
var newpage="";
var pagernnumdiff=0;
var pagernnum="";
var pagernnumtype=0; // 0:normal, 1:roman
var dummy2=0;
for (var i=0; i<StoreIndex; i++) {
if (StorePgNr[i]>page) { // new Page
page=StorePgNr[i];
// Page Renumbering
dummy2=parseInt(PgRenumber.slice(0,PgRenumber.search(/\:/)));
while (page>=dummy2) {
PgRenumber=PgRenumber.slice(PgRenumber.search(/\:/)+1);
switch(PgRenumber.charAt(0)) {
case "(":
pagernnumtype=0;
PgRenumber=PgRenumber.slice(1);
break;
case "[":
pagernnumtype=1;
PgRenumber=PgRenumber.slice(1);
break;
default:
pagernnumtype=0;
}
pagernnumdiff=dummy2-parseInt(PgRenumber.slice(0,PgRenumber.search(/,/)));
PgRenumber=PgRenumber.slice(PgRenumber.search(/,/)+1);
dummy2=parseInt(PgRenumber.slice(0,PgRenumber.search(/\:/)));
}
pagernnum=(page-pagernnumdiff).toString();
if (pagernnumtype==1) pagernnum="["+pagernnum+"]";
objOutputFile.WriteLine("<TR><TD width=25%> </TD><TD><HR noshade width=30% size=1></TD></TR>");
newpage='<A href="file:///'+filename.replace("/\\/","/")+".pdf#page="+page.toString()+'">\nPage '+pagernnum+"</A>";
} else {
newpage="";
}
switch (StoreCType[i]) {
case 1:
objOutputFile.WriteLine("<TR valign=middle><TD width=25% align=center><small>"+newpage+"</small></TD><TD><TABLE align=center frame=vsides cellpadding=10 cellspacing=10 width=95% bgcolor=cornsilk><TD>\n"+StoreText[i]+"\n</TD></TABLE></TD></TR>");
break;
case 2:
objOutputFile.WriteLine("<TR valign=middle><TD width=25% align=center><small>"+newpage+"</small></TD><TD><TABLE frame=box cellpadding=10 cellspacing=10 width=100%><TD>\n"+StoreText[i]+"\n</TD></TABLE></TD></TR>");
break;
}
}
}
//WScript.Echo("Conversion finished");
objOutputFile.WriteLine("</TABLE></BODY></HTML>");
objOutputFile.Close();-
critStock
- User
- Posts: 24
- Joined: Sat Jun 28, 2008 1:33 am
Re: [FEATURE REQ] Copy selected text into highlight popup
In Acrobat, one does this through "Comments and Markup" > "Summarize comments...". As I use it, together with the option to include selected text in comment (Thanks for adding that!), I end up with a nice list of the text I have highlighted plus my comments, organized by page number. (Although there are other options.) This results in a pdf, but I've happily been using the xChange rtf converter to turn these files into editable text.logies wrote:Can you tell me, how you do this?Since it is relatively easy to extract the contents of comments, or print summaries of the comments,
Thanks!
Michael
It's this "Summarize comments" feature that I would love to see in xChange. It's really the only I miss and the only reason I still have Acrobat installed! FoxIt doesn't have it either, btw. A way to get an(other) edge!
Thanks!
-
quant
- User
- Posts: 151
- Joined: Fri Jan 18, 2008 2:48 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
"[ ] Copy encircled text into Drawing comment pop-ups"
I tried this feature but it doesn't seem to work (build 38.1), I draw a rectangle around some text, but it's not copied into pop-up note. Can someone please confirm that it's working for them?
Thank you
I tried this feature but it doesn't seem to work (build 38.1), I draw a rectangle around some text, but it's not copied into pop-up note. Can someone please confirm that it's working for them?
Thank you
-
Ivan - Tracker Software
- Site Admin
- Posts: 3603
- Joined: Thu Jul 08, 2004 10:36 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
Just check, and it works here.
Can you select the text under this drawings using text selection tool ?
Can you select the text under this drawings using text selection tool ?
PDF-XChange Co Ltd. (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
Podhorny
- User
- Posts: 88
- Joined: Tue Oct 09, 2007 8:03 am
[BUG] Copy selected text into highlight popup
It works but it have some problems with non English characters.
Please see attached file "test.pdf"
Best Regards
Jiri
Please see attached file "test.pdf"
Best Regards
Jiri
You do not have the required permissions to view the files attached to this post.
-
Lzcat - Tracker Supp
- Site Admin
- Posts: 677
- Joined: Thu Jun 28, 2007 8:42 am
Re: [FEATURE REQ] Copy selected text into highlight popup
Problem is because text contain non-ascii characters and embedded font used to display it do not contain information how to translate pdf-specific codes into unicode (ToUnicode table). I'm affraid that nothing can be done with this.
Victor
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
Podhorny
- User
- Posts: 88
- Joined: Tue Oct 09, 2007 8:03 am
Re: [FEATURE REQ] Copy selected text into highlight popup
Any idea how to include this information to PDF file (during creation time)?
Test file was created using PDF-XChange Driver build 149.
I need sometimes copy text out of PDF. It works for English texts, programs etc,
but not for Czech and Russian texts.
Thanks, Jiri
Test file was created using PDF-XChange Driver build 149.
I need sometimes copy text out of PDF. It works for English texts, programs etc,
but not for Czech and Russian texts.
Thanks, Jiri
-
quant
- User
- Posts: 151
- Joined: Fri Jan 18, 2008 2:48 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
yes, no problem. And it also works in Adobe Prof. I will do a "report problem", maybe it's something with my setting ...Can you select the text under this drawings using text selection tool ?
Thank you
-
Lzcat - Tracker Supp
- Site Admin
- Posts: 677
- Joined: Thu Jun 28, 2007 8:42 am
Re: [FEATURE REQ] Copy selected text into highlight popup
Open Fonts tab, check option Embed Extended Font/Character Info. PDF file will be a bit larger.Podhorny wrote:Any idea how to include this information to PDF file (during creation time)?
Last edited by Lzcat - Tracker Supp on Thu Jul 03, 2008 9:23 am, edited 1 time in total.
Victor
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Tracker Software
Project manager
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
Podhorny
- User
- Posts: 88
- Joined: Tue Oct 09, 2007 8:03 am
-
MKC
- User
- Posts: 17
- Joined: Fri Jul 04, 2008 7:43 pm
Re: [FEATURE REQ] Copy selected text into highlight popup
I would also much like to see a "summarize comments"-feature added to X-Change viever!critStock wrote:In Acrobat, one does this through "Comments and Markup" > "Summarize comments...". As I use it, together with the option to include selected text in comment (Thanks for adding that!), I end up with a nice list of the text I have highlighted plus my comments, organized by page number. (Although there are other options.) This results in a pdf, but I've happily been using the xChange rtf converter to turn these files into editable text.logies wrote:Can you tell me, how you do this?Since it is relatively easy to extract the contents of comments, or print summaries of the comments,
Thanks!
Michael
It's this "Summarize comments" feature that I would love to see in xChange. It's really the only I miss and the only reason I still have Acrobat installed! FoxIt doesn't have it either, btw. A way to get an(other) edge!
Thanks!
Can you already state whether this is going to be introduced in the next release?
Thank you for a wonderful programm btw