Group or ungroup from elements

Please post any ideas or requests for new features here for the End User Version of PDF-XChange (printer Drivers)

Moderators: Tracker Support, TrackerSupp-Daniel, Sean - Tracker, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Tracker - Clarion Support, John - Tracker Supp, Ivan - Tracker Software, Tracker Supp-Stefan, moderators, Support Staff

Post Reply
Hausi
User
Posts: 1
Joined: Wed Sep 06, 2023 9:34 am

Group or ungroup from elements

Post by Hausi »

It would be helpful if there was a way (shortcut or function) to group selected areas, such as two set stamps, so that their position relative to each other in the document could be moved. An example would be a stamp with an overlying image of a signature. Two elements that belong together. There is definitely no group or ungroup function. Will such a feature be possible in the future?
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1880
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - Tracker Supp »

Hello Hausi,

Welcome to our Forum.


You can group the аnotations by several criteria:

image.png

...and while they are selected you can move them all.


Regards.
User avatar
rakunavi
User
Posts: 1080
Joined: Sat Sep 11, 2021 5:04 am

Re: Group or ungroup from elements

Post by rakunavi »

Hello Hausi,

It seems to me that the "group" and "ungroup" you are referring to are not the "group" Dimitar is referring to. The "group" and "ungroup" functions you are talking about have been requested in the past in the following topic.

While they exist as commands in the Customize toolbar, they do not work at this time.

  • Are "cmd.group" and "cmd.ungroup" not yet implemented?
    Are "cmd.group" and "cmd.ungroup" not yet implemented?
Best regards,
rakunavi
TOP desires for PDFXCE
forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9104
Joined: Wed Jan 03, 2018 6:52 pm

Re: Group or ungroup from elements

Post by TrackerSupp-Daniel »

Hello, rakunavi

That seems to be the case, yes, and to answer the question captioned on your image, yes, these are not yet complete and do not yet server any purpose. In time that will change, but right now, there is no manual Content grouping option in the Editor.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Mathew
User
Posts: 292
Joined: Thu Jun 19, 2014 7:30 pm

Re: Group or ungroup from elements

Post by Mathew »

I'd just like to add my vote for the ability to group markups. Would be very useful for making groups of elements -- a bit like a stamp -- except it could have color/text/etc changed.

I see in the specification that it's there:
From the PDF reference v1.7:
In PDF 1.6, a set of annotations can be grouped so that they function as a single unit when a user interacts with them. The group consists of a primary annotation, which must not have an IRT entry, and one or more subordinate annotations, which must have an IRT entry that refers to the primary annotation and an RT en-try whose value is Group.

Some entries in the primary annotation are treated as “group attributes” that should apply to the group as a whole; the corresponding entries in the subordinate annotations should be ignored. These entries are Contents (or RC and DS), M, C, T, Popup, CreationDate, Subj, and Open. Operations that manipulate any annotation in a group, such as movement, cut, and copy, should be treated by viewer applications as acting on the entire group.
I even tried setting the .refType and .inReplyTo properties with the following script, but it's not implemented in PXE yet...

Code: Select all

{
let a = this.selectedAnnots;

// doesn't check if already in a group
if (a.length > 1) {
	let primary;
	for (let i in a) {
		let RT = {};
		if (primary) {
			RT.refType = "Group";
			RT.inReplyTo = primary;
			a[i].setProps( RT );
		} else {
			// first one is primary
			primary = a[i].name;
			console.println(primary)
			if ( a[i].inReplyTo ) a[i].inReplyTo = "";
		}
		
	}
}}
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 9104
Joined: Wed Jan 03, 2018 6:52 pm

Re: Group or ungroup from elements

Post by TrackerSupp-Daniel »

Hello, Mathew

Thank you for the added support, it is on its way thankfully, but it will likely still be a few releases before it is ready.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
Ralf_Reddings
User
Posts: 5
Joined: Sun Apr 09, 2023 4:25 pm

Re: Group or ungroup from elements

Post by Ralf_Reddings »

Hello, I really need this feature as well. I too discovered the commands and even gave them hotkeys but alas they are not working, as confirmed here.

Its really hard to do anything complex without being able to group objects together and move them as one in the future. Any chance we will see this feature in early 2024??

Thanks.
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1880
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - Tracker Supp »

Hello Ralf_Reddings,

We can't make any promises but our developers are working on adding this feature to the PDF Editor.

We will ask them to prioritize this task.

Regards.
jake_se
User
Posts: 5
Joined: Wed Feb 28, 2024 12:40 am

Re: Group or ungroup from elements

Post by jake_se »

Also looking forward to this functionality being implemented. Hopefully soon...
I'm also curious why the Commands were made available prior to the feature, is this by accident?
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1880
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - Tracker Supp »

Hello jake_se,

These are place holders that are not visible in the main menu.

Regards.
Eldereld
User
Posts: 2
Joined: Mon Dec 17, 2018 9:20 pm

Re: Group or ungroup from elements

Post by Eldereld »

Hi,
there ist still an Use for it.
Please implement it
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1880
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - Tracker Supp »

Thanks for the input, Eldereld.

We will. That is why we have these place holders. :-)
Mathew
User
Posts: 292
Joined: Thu Jun 19, 2014 7:30 pm

Re: Group or ungroup from elements

Post by Mathew »

Not in build 387 yet - actually this script attempting to group annotations with javascript will crash the application: viewtopic.php?p=173066#p173066
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1880
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - Tracker Supp »

Hello Mathew,

Please generate a full crash report:

https://www.pdf-xchange.com/knowledgeba ... estigation


...and send it to us for investigation, to support@pdf-xchange.com

Regards.
Mathew
User
Posts: 292
Joined: Thu Jun 19, 2014 7:30 pm

Re: Group or ungroup from elements

Post by Mathew »

It crashes every time. Paste this script into the javascript console, select two annotations, and run the script:

Code: Select all

{
let a = this.selectedAnnots;

// doesn't check if already in a group
if (a.length > 1) {
	let primary;
	for (let i in a) {
		let RT = {};
		if (primary) {
			RT.refType = "Group";
			RT.inReplyTo = primary;
			a[i].setProps( RT );
		} else {
			// first one is primary
			primary = a[i].name;
			console.println(primary)
			if ( a[i].inReplyTo ) a[i].inReplyTo = "";
		}
		
	}
}}
User avatar
Paul - Tracker Supp
Site Admin
Posts: 7016
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Group or ungroup from elements

Post by Paul - Tracker Supp »

Hi, Mathew

the devs have found the cause of this and it will be corrected for the next build.

While there is more to be donme on our side to make the script work propoer;ly, it was pointed oout to tme that if you reverse the order of these two lines, it won't crash:

make

Code: Select all

			RT.refType = "Group";
			RT.inReplyTo = primary;
into

Code: Select all

			RT.inReplyTo = primary;
			RT.refType = "Group";
so it exists before using it. We should catch that exception, and we will do so in future, but this will at least prevent a crash unbtil the next build.

I hope that helps.


Thanks for bringing it to our attention.
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
User avatar
Paul - Tracker Supp
Site Admin
Posts: 7016
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: Group or ungroup from elements

Post by Paul - Tracker Supp »

Hi again Mathew

until the next build is released with the (now) fixed setProps() function you can avoid using it this way and it should work:

Code: Select all

{
let a = this.selectedAnnots;

// doesn't check if already in a group
if (a.length > 1) {
	let primary;
	for (let i in a) {
		let RT = {};
		if (primary) {
			a[i].inReplyTo = primary;
			a[i].refType = "Group";
		} else {
			// first one is primary
			primary = a[i].name;
			console.println(primary)
			if ( a[i].inReplyTo ) a[i].inReplyTo = "";
		}
		
	}
}}
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply