Rotativa 1.7.4 ActionAsPDF, Remove Navbar and Print buttonHow do you handle multiple submit buttons in ASP.NET MVC Framework?Remove Header and Footer using C#Prevent back buttonwkhtmltopdf Custom header and footers with ASP.NET MVCAutomatically Printing Page, then directing to next pageRemove header and footer when printing from WebBrowser controlUsing Rotativa results in a 'Could not load file or assembly' errorRotativa Issue printing RAW HTMLPrint Function using RotativaOpen Rotativa print dialog automatically

Does the Crossbow Expert feat's extra crossbow attack work with the reaction attack from a Hunter ranger's Giant Killer feature?

Can I say "fingers" when referring to toes?

Given this phrasing in the lease, when should I pay my rent?

How to leave product feedback on macOS?

Identifying "long and narrow" polygons in with PostGIS

How to make money from a browser who sees 5 seconds into the future of any web page?

Why is participating in the European Parliamentary elections used as a threat?

Animation: customize bounce interpolation

Would this string work as string?

What is this high flying aircraft over Pennsylvania?

Anime with legendary swords made from talismans and a man who could change them with a shattered body

Showing mass murder in a kid's book

Possible Eco thriller, man invents a device to remove rain from glass

Quoting Keynes in a lecture

Personal or impersonal in a technical resume

Isometric embedding of a genus g surface

Can I cause damage to electrical appliances by unplugging them when they are turned on?

Why the various definitions of the thin space ,?

I'm just a whisper. Who am I?

Can you identify this lizard-like creature I observed in the UK?

Limit max CPU usage SQL SERVER with WSRM

How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?

How to test the sharpness of a knife?

Do you waste sorcery points if you try to apply metamagic to a spell from a scroll but fail to cast it?



Rotativa 1.7.4 ActionAsPDF, Remove Navbar and Print button


How do you handle multiple submit buttons in ASP.NET MVC Framework?Remove Header and Footer using C#Prevent back buttonwkhtmltopdf Custom header and footers with ASP.NET MVCAutomatically Printing Page, then directing to next pageRemove header and footer when printing from WebBrowser controlUsing Rotativa results in a 'Could not load file or assembly' errorRotativa Issue printing RAW HTMLPrint Function using RotativaOpen Rotativa print dialog automatically













0















I am trying to remove the navbar and print button from the page that I am trying to print. I attempted to use CustomSwitches but Rotativa does not appear to like them.



string customSwitches = "--disable-smart-shrinking --header-html 0 --footer-html 1";
var printForm = new ActionAsPdf("Receipt", new id = id ) PageSize = Rotativa.Options.Size.Legal, CustomSwitches = customSwitches ;
return printForm;


My view for reference: Print view.



What are some thoughts?










share|improve this question




























    0















    I am trying to remove the navbar and print button from the page that I am trying to print. I attempted to use CustomSwitches but Rotativa does not appear to like them.



    string customSwitches = "--disable-smart-shrinking --header-html 0 --footer-html 1";
    var printForm = new ActionAsPdf("Receipt", new id = id ) PageSize = Rotativa.Options.Size.Legal, CustomSwitches = customSwitches ;
    return printForm;


    My view for reference: Print view.



    What are some thoughts?










    share|improve this question


























      0












      0








      0








      I am trying to remove the navbar and print button from the page that I am trying to print. I attempted to use CustomSwitches but Rotativa does not appear to like them.



      string customSwitches = "--disable-smart-shrinking --header-html 0 --footer-html 1";
      var printForm = new ActionAsPdf("Receipt", new id = id ) PageSize = Rotativa.Options.Size.Legal, CustomSwitches = customSwitches ;
      return printForm;


      My view for reference: Print view.



      What are some thoughts?










      share|improve this question
















      I am trying to remove the navbar and print button from the page that I am trying to print. I attempted to use CustomSwitches but Rotativa does not appear to like them.



      string customSwitches = "--disable-smart-shrinking --header-html 0 --footer-html 1";
      var printForm = new ActionAsPdf("Receipt", new id = id ) PageSize = Rotativa.Options.Size.Legal, CustomSwitches = customSwitches ;
      return printForm;


      My view for reference: Print view.



      What are some thoughts?







      c# asp.net-mvc rotativa






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 8:06









      ArunPratap

      2,1312928




      2,1312928










      asked Mar 7 at 3:03









      AdrianAdrian

      52




      52






















          1 Answer
          1






          active

          oldest

          votes


















          1














          1. You can use --print-media-type custom switch.

          2. Apply the class no-print for your navbar div and button

          Then write your CSS like this



          @media print

          .no-print, .no-print *

          display: none !important;







          share|improve this answer























          • This worked like a charm, thank you!

            – Adrian
            Mar 7 at 16:03










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          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%2fstackoverflow.com%2fquestions%2f55035405%2frotativa-1-7-4-actionaspdf-remove-navbar-and-print-button%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          1. You can use --print-media-type custom switch.

          2. Apply the class no-print for your navbar div and button

          Then write your CSS like this



          @media print

          .no-print, .no-print *

          display: none !important;







          share|improve this answer























          • This worked like a charm, thank you!

            – Adrian
            Mar 7 at 16:03















          1














          1. You can use --print-media-type custom switch.

          2. Apply the class no-print for your navbar div and button

          Then write your CSS like this



          @media print

          .no-print, .no-print *

          display: none !important;







          share|improve this answer























          • This worked like a charm, thank you!

            – Adrian
            Mar 7 at 16:03













          1












          1








          1







          1. You can use --print-media-type custom switch.

          2. Apply the class no-print for your navbar div and button

          Then write your CSS like this



          @media print

          .no-print, .no-print *

          display: none !important;







          share|improve this answer













          1. You can use --print-media-type custom switch.

          2. Apply the class no-print for your navbar div and button

          Then write your CSS like this



          @media print

          .no-print, .no-print *

          display: none !important;








          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 7 at 3:23









          Priyank PanchalPriyank Panchal

          519614




          519614












          • This worked like a charm, thank you!

            – Adrian
            Mar 7 at 16:03

















          • This worked like a charm, thank you!

            – Adrian
            Mar 7 at 16:03
















          This worked like a charm, thank you!

          – Adrian
          Mar 7 at 16:03





          This worked like a charm, thank you!

          – Adrian
          Mar 7 at 16:03



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • 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%2fstackoverflow.com%2fquestions%2f55035405%2frotativa-1-7-4-actionaspdf-remove-navbar-and-print-button%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

          Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

          Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

          Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved