• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Highlighted interactive links incompatibility

New Here ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

I have a pdf with an interactive toc.

I need to highlight some titles within the toc so that I know the paragraphs that are useful to me.

However upon opening the resulting pdf on iPhone's Files app, I have two issues:

the first one is merely aesthetical, being that the highlights lose their opacity (which I set at 40%), not a huge deal;

the second issue is very problematic, being that Apples seems to give precedence to the highlights over the interactive links, and this means that the toc becomes useless on my device (when I click on a highlighted title in the toc, the iPhone shows me the highlight/comment options instead of launching the linked page).

I tried flattening but this only solves the aesthetical issue, as it completely removes all interactive links.

Is there any workaround? I am sure there must be an option that moves the highlightings to the background or even better stops treating them as comments, while preserving the links from the toc to the pages.

Thank you in advance to whomever will help!

TOPICS
Edit and convert PDFs , How to , PDF , Standards and accessibility

Views

113

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

In what application are you opening it on the iPhone?

 

> I am sure there must be an option that moves the highlightings to the background 

-Not really.

> or even better stops treating them as comments, while preserving the links from the toc to the pages.

-That is possible, but tricky. To do that you would need to flatten the pages, which will convert all comments to static contents, but it will also do that for fields and links... To avoid that from happening you must make the links invisible, and then run this script:

 

this.flattenPages({nNonPrint: 1});

 

Then, once the comments are flattened, you can change the links back to being visible, if you wish.

Just make sure to save the flattened file under a new name, as this command is NOT reversible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

Thank you for your reply!

 

On iPhone I view my pdfs via the in-built viewer of the Files app.

 

Can you please explain the process to make links invisible and back to visible please? And where am I supposed to run that script? I believe that using the Process Print tool to flatten would be the same though(?)

 

Thank you for your help and time!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 19, 2024 Jun 19, 2024

Copy link to clipboard

Copied

LATEST

You need to do it when creating the file, using Adobe Acrobat, on a regular PC.

This code will first hide the links, then flatten the file, then "un-hide" them:

 

for (var p=0; p<this.numPages; p++) {
	var box = this.getPageBox("Crop", p);
	var links = this.getLinks(p, box);
	if (links==null || links.length==0) continue;
	for (var i in links) {
		links[i].borderWidth = 0;
	}
}

this.flattenPages({nNonPrint: 1});

for (var p=0; p<this.numPages; p++) {
	var box = this.getPageBox("Crop", p);
	var links = this.getLinks(p, box);
	if (links==null || links.length==0) continue;
	for (var i in links) {
		links[i].borderWidth = 1;
	}
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines