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: Daniel - PDF-XChange, PDF-XChange Support, Vasyl - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, John - Tracker Supp, Ivan - Tracker Software, Stefan - PDF-XChange, Tracker - Clarion Support, Support Staff, moderators

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 - PDF-XChange
Site Admin
Posts: 2169
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - PDF-XChange »

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: 1546
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
Daniel - PDF-XChange
Site Admin
Posts: 10586
Joined: Wed Jan 03, 2018 6:52 pm

Re: Group or ungroup from elements

Post by Daniel - PDF-XChange »

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
PDF-XChange Co. 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: 510
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
Daniel - PDF-XChange
Site Admin
Posts: 10586
Joined: Wed Jan 03, 2018 6:52 pm

Re: Group or ungroup from elements

Post by Daniel - PDF-XChange »

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
PDF-XChange Co. 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 - PDF-XChange
Site Admin
Posts: 2169
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - PDF-XChange »

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 - PDF-XChange
Site Admin
Posts: 2169
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - PDF-XChange »

Hello jake_se,

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

Regards.
Eldereld
User
Posts: 4
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 - PDF-XChange
Site Admin
Posts: 2169
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - PDF-XChange »

Thanks for the input, Eldereld.

We will. That is why we have these place holders. :-)
Mathew
User
Posts: 510
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 - PDF-XChange
Site Admin
Posts: 2169
Joined: Mon Jan 15, 2018 9:01 am

Re: Group or ungroup from elements

Post by Dimitar - PDF-XChange »

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: 510
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 - PDF-XChange
Site Admin
Posts: 7348
Joined: Wed Mar 25, 2009 10:37 pm
Contact:

Re: Group or ungroup from elements

Post by Paul - PDF-XChange »

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
PDF-XChange Support
http://www.pdf-xchange.com
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7348
Joined: Wed Mar 25, 2009 10:37 pm
Contact:

Re: Group or ungroup from elements

Post by Paul - PDF-XChange »

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
PDF-XChange Support
http://www.pdf-xchange.com
Tajin2310
User
Posts: 3
Joined: Mon Oct 07, 2024 11:42 am

Re: Group or ungroup from elements

Post by Tajin2310 »

I need to group/ungroup objects I added to my PDF drawings as comments, I that way I can copy the whole group, it could be locked or unlocked.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 10586
Joined: Wed Jan 03, 2018 6:52 pm

Re: Group or ungroup from elements

Post by Daniel - PDF-XChange »

Hello, Tajin2310

Thank you for the interest, Comment grouping is particularly complex to perform properly, and many PDF applications do not support it, so ensuring we offer it in a way that is stable is a priority. As such, this is taking a much longer time to develop than originally planned, but it is on its way. I cannot offer a timeline, but rest assured, we have seen the large user demand for such a feature, and it is in development.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
eddablin
User
Posts: 24
Joined: Wed Jun 29, 2016 4:02 pm

Re: Group or ungroup from elements

Post by eddablin »

Look forward to this feature.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19673
Joined: Mon Jan 12, 2009 8:07 am
Contact:

Group or ungroup from elements

Post by Stefan - PDF-XChange »

:)
delano84
User
Posts: 9
Joined: Wed Mar 05, 2025 3:37 pm

Re: Group or ungroup from elements

Post by delano84 »

I was going crazy trying to figure why the two commands ("group"/"ungroup") were not working. Glad I found this thread. Any news on the development of them?

Thanks.
User avatar
rakunavi
User
Posts: 1546
Joined: Sat Sep 11, 2021 5:04 am

Re: Group or ungroup from elements

Post by rakunavi »

Hello delano84,

The following most recent response in this topic may be helpful.
Stefan - PDF-XChange wrote: Wed Mar 12, 2025 10:22 am Unfortunately the answer is still that there are no changes in that respect and there's no permanent grouping possible for PDF objects, sorry!
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
Stefan - PDF-XChange
Site Admin
Posts: 19673
Joined: Mon Jan 12, 2009 8:07 am
Contact:

Group or ungroup from elements

Post by Stefan - PDF-XChange »

:)
Post Reply