Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

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

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
User avatar
WiseFix
User
Posts: 4
Joined: Wed Aug 05, 2020 5:22 am

Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by WiseFix »

Hi Folks,

I am having a problem with a few documents, for which I want to change the background color, but the main section/body of the page won't reflect the change. :x Only the margins (around the main section/body of the page) will take on the new color. :cry: The documents for which I want to change the background color are not image-type pdf files. Instead, they are fully editable unprotected/unsecured pdf files with editable text that can be selected and highlighted. To accomplish what I want I am going to the "Organize" tab, clicking on the "Background" icon and choosing "Add". Once in the "Add Background" interface, I am choosing a color from the basic choices available in the "From Color" option.

I want to change the actual color of the document's background, not how it is displayed. So, please, bear in mind that I am NOT talking about going to the "Preferences" area, under the "Accessibility" category, to "Override the Document Colors". That does not change the document itself, but how it is displayed. All that does is to suppress the document's colors and over-impose/overlay the colors chosen on the Preferences (under the Accessibility category) on top of the document's colors only for display purposes. That's not what I want. I want the document's background to be the color I choose, regardless of what preferences' accessibility color overrides individual users choose, and I want that background to be printed accordingly.

Please, see the attached sample document. If you try to change the background, you will run into the aforementioned problem.


Thank you in anticipation for your forthcoming help. :)

SampleDoc.pdf
(193.29 KiB) Downloaded 28 times
Willy Van Nuffel
User
Posts: 2392
Joined: Wed Jan 18, 2006 12:10 pm

Re: Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by Willy Van Nuffel »

Hello,

In PDF-XChange Editor you can check the content of each page by activating the Content pane via:
- View > Other panes > Content (Classic Toolbars), or
- View > Panes > Content (Ribbon UI)

In that Content pane (at the left of your window), you will see the different pages of your PDF preceded by a white triangle.
By clicking the white triangle, you can see the different elements of the page.

In your SampleDoc.pdf, you will see several 'Path' elements in each page. When you click on such an element in the Content pane you will see what it stands for in the page itself. The concerning element will be selected. In this way, you will see that each first element in the pages represents a white rectangle behind the text. That is why the background color is covered. When you remove that first element ('Path') in each page, your problem will be solved. Take note that the other 'Path's are representing bullets in your document. Do not remove these.

Unfortunately, I do not see a way to remove all non-required elements in one step.
I am afraid that this will have to be done manually.

Best regards.
Attachments
Invisible elements.png
User avatar
WiseFix
User
Posts: 4
Joined: Wed Aug 05, 2020 5:22 am

Re: Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by WiseFix »

Yes!!!!! :D Yes!!!!! :D Yes!!!!!!
A million thanks to Willy Van Nuffel.
This is certainly an EXPERT answer. Exactly what I was hoping for.


:?: FOLLOW-UP QUESTION :?: :
In your much-appreciated answer, you stated that you "do not see a way to remove all non-required elements in one step".
:idea: I have noticed that several PDF editors use Java-Script (JS) in the way Visual-Basic-for-Applications (VBA) is used in Microsoft's Office applications to automate certain tasks or add extra functionality.
Would it be possible to accomplish the removal of the undesired Path element in every page where it is present by creating a JS routine?
If this is possible, this would be a great excuse for me to finally learn JS.
If the answer is "Yes", would you be able to refer me to a good source (book, document, web-based material, etc.) to acquaint myself with using JS within the context of dealing with PDF documents? I am aware of good sources to learn JS but only in context of web-development. I have had little exposure to JS, so for me it would be like learning it anew. Furthermore, I find the process of learning a programming language works better for me when the subject is taught withing a domain-specific (in this case dealing with PDF documents) context in which I am interested. Any suggestions, if the aforementioned task can be accomplished in such a way?

Thanks again for your great answer.
Willy Van Nuffel
User
Posts: 2392
Joined: Wed Jan 18, 2006 12:10 pm

Re: Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by Willy Van Nuffel »

Honestly, I have no or little experience in creating JavaScripts in PDF-documents.

In this specific case you will have to find a way to make the distinction between the different "Path" elements, because you can NOT remove them all. Hopefully there is a possibility to apply some selection criteria when deleting such elements.

I leave it up to other people, if they have an idea to offer you a solution to automatically delete the non-required elements in your PDF's.

If it might help, you can also use the CTRL-key to select elements randomly in the Content pane, and then press or click Delete.

Some information about the JavaScript Development Kit available from Tracker Software, and references to Adobe JS material are available here:
https://www.pdf-xchange.com/knowle ... fied-pages

Regards.
User avatar
WiseFix
User
Posts: 4
Joined: Wed Aug 05, 2020 5:22 am

Re: Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by WiseFix »

A million thanks again.
My best wishes to you.

Hopefully somebody will know the exact answer to the follow up question.

Cheers
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8579
Joined: Wed Jan 03, 2018 6:52 pm

Re: Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by TrackerSupp-Daniel »

Hi, WiseFix

Unfortunately JS is only able to directly affect comments, not base content like these path objects, so that would not be a viable course of action.
The only way I can think of to try and automate this, would be to try using one of our SDK products. That would of course require extensive programming knowledge and experience. It would almost certainly be simpler and much more cost effective to manually remove these items by selecting them within the Content pane and pressing Delete.

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
User avatar
WiseFix
User
Posts: 4
Joined: Wed Aug 05, 2020 5:22 am

Re: Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by WiseFix »

Another well-informed answer!!!! :D
Many many thanks to Daniel McIntyre (TrackerSupp-Daniel) for his expertise.
That's is good info to know.
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8579
Joined: Wed Jan 03, 2018 6:52 pm

Background color change reflects only on margin area, not on page's main body. Please, help! Thanks

Post by TrackerSupp-Daniel »

:)
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
Post Reply