Is it possible to use .desktop files to open local pdf files on specific pages with a browser? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How Do I Export Pages from Browser with Embedded Hyperlinks?How do I get Adobe Reader to print more than one page in 13.10 Saucy?Okular opens large pdfs with blank pagesTranslate the page numbers of internal links in a pdf link to?How do I get Chromium browser to always ask where to save PDF files instead of automatically displaying it within the browser?Calling document viewer from an html viewerUsing the Adobe browser plugin to view pdf files (or alternatives) on Ubuntu 14.04How to open a link in a PDF with the error: “Unable to open external link. Failed to execute child process “sh” (Permission denied)”?Open PDF file with Krusader on Ubunti 18.04how to open PDF file at specific page in the terminal?
Pointing to problems without suggesting solutions
How to leave only the following strings?
Why did Israel vote against lifting the American embargo on Cuba?
Short story about an alien named Ushtu(?) coming from a future Earth, when ours was destroyed by a nuclear explosion
Should man-made satellites feature an intelligent inverted "cow catcher"?
Will I be more secure with my own router behind my ISP's router?
What could prevent concentrated local exploration?
“Since the train was delayed for more than an hour, passengers were given a full refund.” – Why is there no article before “passengers”?
Assertions In A Mock Callout Test
What is the ongoing value of the Kanban board to the developers as opposed to management
Why do people think Winterfell crypts is the safest place for women, children & old people?
Has a Nobel Peace laureate ever been accused of war crimes?
What is the difference between 准时 and 按时?
Protagonist's race is hidden - should I reveal it?
Why not use the yoke to control yaw, as well as pitch and roll?
How to charge percentage of transaction cost?
Weaponising the Grasp-at-a-Distance spell
Is it OK if I do not take the receipt in Germany?
Married in secret, can marital status in passport be changed at a later date?
Determine the generator of an ideal of ring of integers
"Destructive force" carried by a B-52?
Like totally amazing interchangeable sister outfit accessory swapping or whatever
Raising a bilingual kid. When should we introduce the majority language?
Compiling and throwing simple dynamic exceptions at runtime for JVM
Is it possible to use .desktop files to open local pdf files on specific pages with a browser?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How Do I Export Pages from Browser with Embedded Hyperlinks?How do I get Adobe Reader to print more than one page in 13.10 Saucy?Okular opens large pdfs with blank pagesTranslate the page numbers of internal links in a pdf link to?How do I get Chromium browser to always ask where to save PDF files instead of automatically displaying it within the browser?Calling document viewer from an html viewerUsing the Adobe browser plugin to view pdf files (or alternatives) on Ubuntu 14.04How to open a link in a PDF with the error: “Unable to open external link. Failed to execute child process “sh” (Permission denied)”?Open PDF file with Krusader on Ubunti 18.04how to open PDF file at specific page in the terminal?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'd like to use desktop files
to open pdf files on specific pages, I've tried creating a file with the following syntax:
[Desktop Entry]
Encoding=UTF-8
Name=mypdf.pdf
Type=Link
URL=file:///home/myhomefolder/mypdf.pdf#page=45
Icon=application-pdf
When I open this file the default browser opens my pdf file on page 1, it's like it considers #page=45
as a comment, even though if I paste the address file:///home/myhomefolder/mypdf.pdf#page=45
directly on the browser I get the expected result (the pdf opens on page 45)...
I realized that if I use this syntax for pdf files on the internet it works as expected and it opens the pdf on the page that I've predetermined, the problem is only with local files. Is it possible to use desktop files to open local pdf files on specific pages? Or is it a limitation of desktop files
?
pdf .desktop
add a comment |
I'd like to use desktop files
to open pdf files on specific pages, I've tried creating a file with the following syntax:
[Desktop Entry]
Encoding=UTF-8
Name=mypdf.pdf
Type=Link
URL=file:///home/myhomefolder/mypdf.pdf#page=45
Icon=application-pdf
When I open this file the default browser opens my pdf file on page 1, it's like it considers #page=45
as a comment, even though if I paste the address file:///home/myhomefolder/mypdf.pdf#page=45
directly on the browser I get the expected result (the pdf opens on page 45)...
I realized that if I use this syntax for pdf files on the internet it works as expected and it opens the pdf on the page that I've predetermined, the problem is only with local files. Is it possible to use desktop files to open local pdf files on specific pages? Or is it a limitation of desktop files
?
pdf .desktop
add a comment |
I'd like to use desktop files
to open pdf files on specific pages, I've tried creating a file with the following syntax:
[Desktop Entry]
Encoding=UTF-8
Name=mypdf.pdf
Type=Link
URL=file:///home/myhomefolder/mypdf.pdf#page=45
Icon=application-pdf
When I open this file the default browser opens my pdf file on page 1, it's like it considers #page=45
as a comment, even though if I paste the address file:///home/myhomefolder/mypdf.pdf#page=45
directly on the browser I get the expected result (the pdf opens on page 45)...
I realized that if I use this syntax for pdf files on the internet it works as expected and it opens the pdf on the page that I've predetermined, the problem is only with local files. Is it possible to use desktop files to open local pdf files on specific pages? Or is it a limitation of desktop files
?
pdf .desktop
I'd like to use desktop files
to open pdf files on specific pages, I've tried creating a file with the following syntax:
[Desktop Entry]
Encoding=UTF-8
Name=mypdf.pdf
Type=Link
URL=file:///home/myhomefolder/mypdf.pdf#page=45
Icon=application-pdf
When I open this file the default browser opens my pdf file on page 1, it's like it considers #page=45
as a comment, even though if I paste the address file:///home/myhomefolder/mypdf.pdf#page=45
directly on the browser I get the expected result (the pdf opens on page 45)...
I realized that if I use this syntax for pdf files on the internet it works as expected and it opens the pdf on the page that I've predetermined, the problem is only with local files. Is it possible to use desktop files to open local pdf files on specific pages? Or is it a limitation of desktop files
?
pdf .desktop
pdf .desktop
edited Mar 24 at 17:58
Rafael Muynarsk
asked Mar 24 at 17:50
Rafael MuynarskRafael Muynarsk
604620
604620
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Use url?
I need to look it up, but I seem to remember Type Link
is deprecated in a .desktop file. Anyway, it won't work here as you found out. Encoding
is deprecated for sure, but that isn't the issue. Furthermore, xdg-open
won't work; it will open your default application for pdf files.
Then what to use?
Create a .desktop file, calling your preferred browser with the pdf file + page as argument. In your example:
[Desktop Entry]
Type=Application
Name=Open pdf on page 45
Exec=firefox 'file:///home/myhomefolder/mypdf.pdf#page=45'
Icon=application-pdf
Then make it executable and double-click. If you are using another browser, you need to change the Exec=
-line to reflect that.
add a comment |
Some document viewers allow you to start them with an argument pointing to the desired page.
From evince --help
:
-i, --page-index=NUMBER The page number of the document to display.
Therefore, your .desktop file could look like this:
[Desktop Entry]
Name=mypdf.pdf page 45
Type=Link
Exec=evince --page-index=45 /home/myhomefolder/mypdf.pdf
Icon=application-pdf
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128328%2fis-it-possible-to-use-desktop-files-to-open-local-pdf-files-on-specific-pages-w%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use url?
I need to look it up, but I seem to remember Type Link
is deprecated in a .desktop file. Anyway, it won't work here as you found out. Encoding
is deprecated for sure, but that isn't the issue. Furthermore, xdg-open
won't work; it will open your default application for pdf files.
Then what to use?
Create a .desktop file, calling your preferred browser with the pdf file + page as argument. In your example:
[Desktop Entry]
Type=Application
Name=Open pdf on page 45
Exec=firefox 'file:///home/myhomefolder/mypdf.pdf#page=45'
Icon=application-pdf
Then make it executable and double-click. If you are using another browser, you need to change the Exec=
-line to reflect that.
add a comment |
Use url?
I need to look it up, but I seem to remember Type Link
is deprecated in a .desktop file. Anyway, it won't work here as you found out. Encoding
is deprecated for sure, but that isn't the issue. Furthermore, xdg-open
won't work; it will open your default application for pdf files.
Then what to use?
Create a .desktop file, calling your preferred browser with the pdf file + page as argument. In your example:
[Desktop Entry]
Type=Application
Name=Open pdf on page 45
Exec=firefox 'file:///home/myhomefolder/mypdf.pdf#page=45'
Icon=application-pdf
Then make it executable and double-click. If you are using another browser, you need to change the Exec=
-line to reflect that.
add a comment |
Use url?
I need to look it up, but I seem to remember Type Link
is deprecated in a .desktop file. Anyway, it won't work here as you found out. Encoding
is deprecated for sure, but that isn't the issue. Furthermore, xdg-open
won't work; it will open your default application for pdf files.
Then what to use?
Create a .desktop file, calling your preferred browser with the pdf file + page as argument. In your example:
[Desktop Entry]
Type=Application
Name=Open pdf on page 45
Exec=firefox 'file:///home/myhomefolder/mypdf.pdf#page=45'
Icon=application-pdf
Then make it executable and double-click. If you are using another browser, you need to change the Exec=
-line to reflect that.
Use url?
I need to look it up, but I seem to remember Type Link
is deprecated in a .desktop file. Anyway, it won't work here as you found out. Encoding
is deprecated for sure, but that isn't the issue. Furthermore, xdg-open
won't work; it will open your default application for pdf files.
Then what to use?
Create a .desktop file, calling your preferred browser with the pdf file + page as argument. In your example:
[Desktop Entry]
Type=Application
Name=Open pdf on page 45
Exec=firefox 'file:///home/myhomefolder/mypdf.pdf#page=45'
Icon=application-pdf
Then make it executable and double-click. If you are using another browser, you need to change the Exec=
-line to reflect that.
edited Mar 24 at 19:04
answered Mar 24 at 18:43
Jacob VlijmJacob Vlijm
66.8k9137234
66.8k9137234
add a comment |
add a comment |
Some document viewers allow you to start them with an argument pointing to the desired page.
From evince --help
:
-i, --page-index=NUMBER The page number of the document to display.
Therefore, your .desktop file could look like this:
[Desktop Entry]
Name=mypdf.pdf page 45
Type=Link
Exec=evince --page-index=45 /home/myhomefolder/mypdf.pdf
Icon=application-pdf
add a comment |
Some document viewers allow you to start them with an argument pointing to the desired page.
From evince --help
:
-i, --page-index=NUMBER The page number of the document to display.
Therefore, your .desktop file could look like this:
[Desktop Entry]
Name=mypdf.pdf page 45
Type=Link
Exec=evince --page-index=45 /home/myhomefolder/mypdf.pdf
Icon=application-pdf
add a comment |
Some document viewers allow you to start them with an argument pointing to the desired page.
From evince --help
:
-i, --page-index=NUMBER The page number of the document to display.
Therefore, your .desktop file could look like this:
[Desktop Entry]
Name=mypdf.pdf page 45
Type=Link
Exec=evince --page-index=45 /home/myhomefolder/mypdf.pdf
Icon=application-pdf
Some document viewers allow you to start them with an argument pointing to the desired page.
From evince --help
:
-i, --page-index=NUMBER The page number of the document to display.
Therefore, your .desktop file could look like this:
[Desktop Entry]
Name=mypdf.pdf page 45
Type=Link
Exec=evince --page-index=45 /home/myhomefolder/mypdf.pdf
Icon=application-pdf
answered Mar 24 at 22:50
Nonny MooseNonny Moose
1,022722
1,022722
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128328%2fis-it-possible-to-use-desktop-files-to-open-local-pdf-files-on-specific-pages-w%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown