Apply to selected pages guides of the specified page

Forum for the PDF-XChange Editor - Free and Licensed Versions

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

User avatar
Jensen Head
User
Posts: 872
Joined: Mon Sep 13, 2021 8:12 am

Apply to selected pages guides of the specified page

Post by Jensen Head »

Is it possible to manually set guides for several pages in PDF-XChange Editor, using one page as a template?

I understand that in general pages can be of different sizes. But in my case, most often the documents consist of pages of the same size. It would be convenient for me to select the page with the largest filling, drag the guides from the rulers to the document so as to outline the area with data, and distribute these guides to all selected pages of the document or the entire document. This is necessary for the final formatting of documents saved in PDF without preparing the layout at a sufficiently high level, and when the original document is not available.

I tried exporting and importing guides, but when importing, you cannot specify pages, they are rigidly tied to the original ones. That is, the .xcgls file is like a document from which all data has been removed, except for the guides themselves.

It would be convenient for me to select the pages in the thumbnails panel before dragging the guides from the rulers.

Or the page in the thumbnails panel would have a "Copy guides" action, which could then be pasted into the selected pages. Some kind of analog of copying formatting styles when editing text.

If the page sizes are different, you can focus on the percentage of the page length. Or the linear distance from the origin of the page coordinates. Probably, the user should be given a choice between these two options.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12653
Joined: Wed Jan 03, 2018 6:52 pm

Re: Apply to selected pages guides of the specified page

Post by Daniel - PDF-XChange »

Hello, Jensen Head

Thank you for the post. I do not believe there is a way to do this currently, but I have passed it along to the Dev team for consideration.

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
User avatar
rakunavi
User
Posts: 2117
Joined: Sat Sep 11, 2021 5:04 am

Re: Apply to selected pages guides of the specified page

Post by rakunavi »

Hello Jensen Head,

Since PDF-XChange Guide Lines files (*.xcgls) are in text format, you can edit them as much as you like. For example, if you create an autohotkey (v1) script that creates a guideline for a specified number of pages from a one-page guideline file, it would look something like this.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

FileSelectFile, SelectedFile, 3, , Open File, PDF-XChange Guides Lines (*.xcgls)
if ErrorLevel
	ExitApp
FileSelectFile, OutputFile, 2, , Save File As, PDF-XChange Guides Lines (*.xcgls)
if ErrorLevel
	ExitApp
InputBox, TotalPages, Total Pages
if ErrorLevel
	ExitApp
FileRead, input, %SelectedFile%
RegExMatch(input, """\d+"" : {(.+])\n", match, 1)
Output := "{`n"
Loop, % TotalPages
{
	Output .= "`t""" . (A_Index-1) . """ : {" . match1 . "`n`t}"
	if (A_Index!=TotalPages)
		Output .= ",`n"
	else
		Output .= "`n}"	
}
FileAppend, %Output%, %OutputFile%.xcgls
  • Animation.gif
  • SampleFiles.zip
Best regards,
rakunavi
You do not have the required permissions to view the files attached to this post.
Top needs 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 FullScrnMultiMon
forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
User avatar
Jensen Head
User
Posts: 872
Joined: Mon Sep 13, 2021 8:12 am

Re: Apply to selected pages guides of the specified page

Post by Jensen Head »

@rakunavi, thank you, this is too similar to magic not to be magic.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19930
Joined: Mon Jan 12, 2009 8:07 am

Apply to selected pages guides of the specified page

Post by Stefan - PDF-XChange »

:)
User avatar
Jensen Head
User
Posts: 872
Joined: Mon Sep 13, 2021 8:12 am

Re: Apply to selected pages guides of the specified page

Post by Jensen Head »

Daniel - PDF-XChange wrote: Fri Nov 22, 2024 12:28 amI have passed it along to the Dev team for consideration.
What was her verdict?
mCHSNUg5Pz8cPap
User
Posts: 248
Joined: Wed Aug 04, 2021 6:36 pm

Re: Apply to selected pages guides of the specified page

Post by mCHSNUg5Pz8cPap »

Jensen Head wrote: Thu Jan 22, 2026 9:57 am
Daniel - PDF-XChange wrote: Fri Nov 22, 2024 12:28 amI have passed it along to the Dev team for consideration.
What was her verdict?
Wasn't this enabled with the addition of the duplicate guides option?
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Ability to draw curved lines: https://forum.pdf-xchange.com/viewtopic.php?p=178335
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12653
Joined: Wed Jan 03, 2018 6:52 pm

Re: Apply to selected pages guides of the specified page

Post by Daniel - PDF-XChange »

Hello, mCHSNUg5Pz8cPap

Indeed it was - you beat me by a few minutes:
image.png
Kind regards,
You do not have the required permissions to view the files attached to this post.
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
User avatar
Jensen Head
User
Posts: 872
Joined: Mon Sep 13, 2021 8:12 am

Re: Apply to selected pages guides of the specified page

Post by Jensen Head »

mCHSNUg5Pz8cPap wrote: Thu Jan 22, 2026 7:24 pmWasn't this enabled with the addition of the duplicate guides option?
Thank you for letting me know about adding the suggested feature! And to the Tracker Software team, for their excellent work!
User avatar
Sean - PDF-XChange
Site Admin
Posts: 892
Joined: Wed Sep 14, 2016 5:42 pm

Re: Apply to selected pages guides of the specified page

Post by Sean - PDF-XChange »

:)
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623