Is it possible to use .desktop files to open local pdf files on specific pages with a browser?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?

Organic chemistry Iodoform Reaction

Why is delta-v is the most useful quantity for planning space travel?

Is there an wasy way to program in Tikz something like the one in the image?

Can a malicious addon access internet history and such in chrome/firefox?

What was required to accept "troll"?

What is the oldest known work of fiction?

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

Can a Gentile theist be saved?

Can I rely on these GitHub repository files?

Visiting the UK as unmarried couple

Partial sums of primes

Science Fiction story where a man invents a machine that can help him watch history unfold

The most efficient algorithm to find all possible integer pairs which sum to a given integer

How do I rename a LINUX host without needing to reboot for the rename to take effect?

Calculating the number of days between 2 dates in Excel

Why does this part of the Space Shuttle launch pad seem to be floating in air?

Female=gender counterpart?

Could solar power be utilized and substitute coal in the 19th century?

Can the electrostatic force be infinite in magnitude?

Freedom of speech and where it applies

How to deal with or prevent idle in the test team?

Why are on-board computers allowed to change controls without notifying the pilots?

Can somebody explain Brexit in a few child-proof sentences?

Is exact Kanji stroke length important?



Is it possible to use .desktop files to open local pdf files on specific pages with a browser?


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?













7















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?










share|improve this question




























    7















    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?










    share|improve this question


























      7












      7








      7


      2






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday







      Rafael Muynarsk

















      asked yesterday









      Rafael MuynarskRafael Muynarsk

      584520




      584520




















          2 Answers
          2






          active

          oldest

          votes


















          9














          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


          enter image description here



          Then make it executable and double-click. If you are using another browser, you need to change the Exec= -line to reflect that.






          share|improve this answer
































            5














            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





            share|improve this answer






















              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
              );



              );













              draft saved

              draft discarded


















              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









              9














              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


              enter image description here



              Then make it executable and double-click. If you are using another browser, you need to change the Exec= -line to reflect that.






              share|improve this answer





























                9














                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


                enter image description here



                Then make it executable and double-click. If you are using another browser, you need to change the Exec= -line to reflect that.






                share|improve this answer



























                  9












                  9








                  9







                  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


                  enter image description here



                  Then make it executable and double-click. If you are using another browser, you need to change the Exec= -line to reflect that.






                  share|improve this answer















                  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


                  enter image description here



                  Then make it executable and double-click. If you are using another browser, you need to change the Exec= -line to reflect that.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited yesterday

























                  answered yesterday









                  Jacob VlijmJacob Vlijm

                  65.5k9130226




                  65.5k9130226























                      5














                      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





                      share|improve this answer



























                        5














                        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





                        share|improve this answer

























                          5












                          5








                          5







                          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





                          share|improve this answer













                          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






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered yesterday









                          Nonny MooseNonny Moose

                          982622




                          982622



























                              draft saved

                              draft discarded
















































                              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.




                              draft saved


                              draft discarded














                              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





















































                              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







                              Popular posts from this blog

                              Sum ergo cogito? 1 nng

                              419 nièngy_Soadمي 19bal1.5o_g

                              Queiggey Chernihivv 9NnOo i Zw X QqKk LpB