Accented letters in Acrobat document name giving unexpected results

HI

I have a simple piece of script:

tell application "Adobe Acrobat Pro"
	activate
	set activeDoc to the active doc
end tell

Works fine EXCEPT when the active document contains accented characters in its name. Thus a document named “Document 1” will return result of 'document “Document 1.pdf”. All is well and good. But a document named “Préjudice” will return result ‘document “”’ - ie a nil result. It is throwing my script into haywire! I cannot get the name of documents that have accented characters.

Can anyone suggest an explication/solution for this behaviour. Nothing I could find in other posts.

Thanks

Probably not a very useful solution for you, but has done wonders for me:

skim-app.sourceforge.net

While in the heydays of OS9 Acrobat was a good piece of indispensable software, nowadays…

Thanks for response.

The script I am working on is targeted on Acrobat, so I am hoping I can stay with it.

For now, I am running all PDFs through a renaming program to remove French accents, before running my script.

But, of course, you then lose all the accents!!! Not ideal when it comes to using the resulting PDF…Rather ugly in fact:(

We’ll see if anyone has answer/solution. Stefan usually does!

Hello!

I can’t understand why Acrobat Pro balks at utf8 names of documents.

I tried to make a similiar script with skim.

tell application "Skim"
	activate
	set activeDoc to the document 1
end tell

(The document was named ærender, ører og årer, worked fine).

Skim is quite versatile with both regards to PDF Viewing and Editing (Notes, bookmarks), and as a viewer of Latex and AppleScriptIf your usage doesn’t exceed those limits, I’d recommend having a look at Skim right away. It doesn’t bite, and it is fast and pleasant to use! :slight_smile:

Sigh!!

I have just completed script for Acrobat which does what I want, bar the accents problem.

I have also had incompatibility issues with PDFs from time to time, where Preview will open them (for example) but Acrobat will not, throwing an error. For that reason alone, I would prefer to stay with Acrobat for best guarantee of cross platform compatibility (Wondows/Mac/Linux). Just had this experience for many many PDFs created by printing PDFs from Chrome… Preview was fine with them, but not Acrobat which would tell me that the “bbox” was wrong!!

Cheers

Where do you actually need to use the name? If it’s just for saving a new version, for example, you can save using a dummy name and then rename the file.

Try:


tell application "Adobe Acrobat Pro"
	activate
	set activeDoc to name of PDF Window 1
end tell

Thanks for both helpful suggestions above. Great thoughts. I will revisit my script and see what can be done.

Cheers