Working with glyphs from multiple documents to rearrange a PDF












1















I am doing some editing on an old PDF comprising vector text and math formulae. Precisely I am extracting one of the problems of an exam paper, so after extracting the corresponding pages, I still need to remove some content before the problem on the first page and after it on the last page.



This leads me to shift content up, and from a page to another. Currently I am doing this shifting with Inkscape. Inkscape lets me open the different pages in as many documents. I use the Poppler/Cairo import because the internal import system does not render the text correctly.



With this, everything works nicely as long as I remain on one single document (page). But when moving contents from a page to another, the pasted content is unusable, it seems because of broken glyph references.



So I resorted to converting all text to curves in my original PDF with gs -dNoOutputFonts -sDEVICE=pdfwrite in.pdf out.pdf, then doing the above. This works but gives understandably large PDF files in the end, after reassembling the SVG files with rsvg-convert -f pdf -o final.pdf page*.svg.



The nicest thing I think would be not to destroy the glyphs but to have Inkscape convert glyph tables on copy and paste or use a common glyph table for all the pages extracted from the same PDF file.



How can I achieve this ? Or maybe there is a better workflow ? I would like not to rasterize the document.










share|improve this question



























    1















    I am doing some editing on an old PDF comprising vector text and math formulae. Precisely I am extracting one of the problems of an exam paper, so after extracting the corresponding pages, I still need to remove some content before the problem on the first page and after it on the last page.



    This leads me to shift content up, and from a page to another. Currently I am doing this shifting with Inkscape. Inkscape lets me open the different pages in as many documents. I use the Poppler/Cairo import because the internal import system does not render the text correctly.



    With this, everything works nicely as long as I remain on one single document (page). But when moving contents from a page to another, the pasted content is unusable, it seems because of broken glyph references.



    So I resorted to converting all text to curves in my original PDF with gs -dNoOutputFonts -sDEVICE=pdfwrite in.pdf out.pdf, then doing the above. This works but gives understandably large PDF files in the end, after reassembling the SVG files with rsvg-convert -f pdf -o final.pdf page*.svg.



    The nicest thing I think would be not to destroy the glyphs but to have Inkscape convert glyph tables on copy and paste or use a common glyph table for all the pages extracted from the same PDF file.



    How can I achieve this ? Or maybe there is a better workflow ? I would like not to rasterize the document.










    share|improve this question

























      1












      1








      1








      I am doing some editing on an old PDF comprising vector text and math formulae. Precisely I am extracting one of the problems of an exam paper, so after extracting the corresponding pages, I still need to remove some content before the problem on the first page and after it on the last page.



      This leads me to shift content up, and from a page to another. Currently I am doing this shifting with Inkscape. Inkscape lets me open the different pages in as many documents. I use the Poppler/Cairo import because the internal import system does not render the text correctly.



      With this, everything works nicely as long as I remain on one single document (page). But when moving contents from a page to another, the pasted content is unusable, it seems because of broken glyph references.



      So I resorted to converting all text to curves in my original PDF with gs -dNoOutputFonts -sDEVICE=pdfwrite in.pdf out.pdf, then doing the above. This works but gives understandably large PDF files in the end, after reassembling the SVG files with rsvg-convert -f pdf -o final.pdf page*.svg.



      The nicest thing I think would be not to destroy the glyphs but to have Inkscape convert glyph tables on copy and paste or use a common glyph table for all the pages extracted from the same PDF file.



      How can I achieve this ? Or maybe there is a better workflow ? I would like not to rasterize the document.










      share|improve this question














      I am doing some editing on an old PDF comprising vector text and math formulae. Precisely I am extracting one of the problems of an exam paper, so after extracting the corresponding pages, I still need to remove some content before the problem on the first page and after it on the last page.



      This leads me to shift content up, and from a page to another. Currently I am doing this shifting with Inkscape. Inkscape lets me open the different pages in as many documents. I use the Poppler/Cairo import because the internal import system does not render the text correctly.



      With this, everything works nicely as long as I remain on one single document (page). But when moving contents from a page to another, the pasted content is unusable, it seems because of broken glyph references.



      So I resorted to converting all text to curves in my original PDF with gs -dNoOutputFonts -sDEVICE=pdfwrite in.pdf out.pdf, then doing the above. This works but gives understandably large PDF files in the end, after reassembling the SVG files with rsvg-convert -f pdf -o final.pdf page*.svg.



      The nicest thing I think would be not to destroy the glyphs but to have Inkscape convert glyph tables on copy and paste or use a common glyph table for all the pages extracted from the same PDF file.



      How can I achieve this ? Or maybe there is a better workflow ? I would like not to rasterize the document.







      linux pdf inkscape ghostscript embedded-fonts






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 24 at 8:08









      ysalmonysalmon

      1083




      1083






















          1 Answer
          1






          active

          oldest

          votes


















          0














          If I understand correclty,




          1. you're opening each page of the original PDF in a separate Inkscape
            window,


          2. the problem is a bug when copy-pasting imported content from one Inkscape window to another.



          You can remove the 2nd step by changing the 1st. Import both (or more if needed?) consecutive pages of the original PDF into a single Inkscape window, and rearrange using click-and-drag, group and align, or editing the coordinates that appear in the toolbar.



          PS: You may also consider using latex with pdfpages package to include trimmed/clipped parts of the original PDF into a latex document. See http://ctan.tetaneutral.net/macros/latex/contrib/pdfpages/pdfpages.pdf






          share|improve this answer
























          • Thanks, I was not aware of the PDF Import feature. To my dismay preserving the glyphs does not significantly reduce the size of the final document : my 3-page extract still weighs 1.3Mo when the original 24-page document is 460 ko…

            – ysalmon
            Jan 24 at 22:07











          • Have you tried pdfpages ? Of course it does involve a little more of guesswork to get the clipping values right at first.

            – Joce
            Jan 26 at 19:58











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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%2fsuperuser.com%2fquestions%2f1397813%2fworking-with-glyphs-from-multiple-documents-to-rearrange-a-pdf%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









          0














          If I understand correclty,




          1. you're opening each page of the original PDF in a separate Inkscape
            window,


          2. the problem is a bug when copy-pasting imported content from one Inkscape window to another.



          You can remove the 2nd step by changing the 1st. Import both (or more if needed?) consecutive pages of the original PDF into a single Inkscape window, and rearrange using click-and-drag, group and align, or editing the coordinates that appear in the toolbar.



          PS: You may also consider using latex with pdfpages package to include trimmed/clipped parts of the original PDF into a latex document. See http://ctan.tetaneutral.net/macros/latex/contrib/pdfpages/pdfpages.pdf






          share|improve this answer
























          • Thanks, I was not aware of the PDF Import feature. To my dismay preserving the glyphs does not significantly reduce the size of the final document : my 3-page extract still weighs 1.3Mo when the original 24-page document is 460 ko…

            – ysalmon
            Jan 24 at 22:07











          • Have you tried pdfpages ? Of course it does involve a little more of guesswork to get the clipping values right at first.

            – Joce
            Jan 26 at 19:58
















          0














          If I understand correclty,




          1. you're opening each page of the original PDF in a separate Inkscape
            window,


          2. the problem is a bug when copy-pasting imported content from one Inkscape window to another.



          You can remove the 2nd step by changing the 1st. Import both (or more if needed?) consecutive pages of the original PDF into a single Inkscape window, and rearrange using click-and-drag, group and align, or editing the coordinates that appear in the toolbar.



          PS: You may also consider using latex with pdfpages package to include trimmed/clipped parts of the original PDF into a latex document. See http://ctan.tetaneutral.net/macros/latex/contrib/pdfpages/pdfpages.pdf






          share|improve this answer
























          • Thanks, I was not aware of the PDF Import feature. To my dismay preserving the glyphs does not significantly reduce the size of the final document : my 3-page extract still weighs 1.3Mo when the original 24-page document is 460 ko…

            – ysalmon
            Jan 24 at 22:07











          • Have you tried pdfpages ? Of course it does involve a little more of guesswork to get the clipping values right at first.

            – Joce
            Jan 26 at 19:58














          0












          0








          0







          If I understand correclty,




          1. you're opening each page of the original PDF in a separate Inkscape
            window,


          2. the problem is a bug when copy-pasting imported content from one Inkscape window to another.



          You can remove the 2nd step by changing the 1st. Import both (or more if needed?) consecutive pages of the original PDF into a single Inkscape window, and rearrange using click-and-drag, group and align, or editing the coordinates that appear in the toolbar.



          PS: You may also consider using latex with pdfpages package to include trimmed/clipped parts of the original PDF into a latex document. See http://ctan.tetaneutral.net/macros/latex/contrib/pdfpages/pdfpages.pdf






          share|improve this answer













          If I understand correclty,




          1. you're opening each page of the original PDF in a separate Inkscape
            window,


          2. the problem is a bug when copy-pasting imported content from one Inkscape window to another.



          You can remove the 2nd step by changing the 1st. Import both (or more if needed?) consecutive pages of the original PDF into a single Inkscape window, and rearrange using click-and-drag, group and align, or editing the coordinates that appear in the toolbar.



          PS: You may also consider using latex with pdfpages package to include trimmed/clipped parts of the original PDF into a latex document. See http://ctan.tetaneutral.net/macros/latex/contrib/pdfpages/pdfpages.pdf







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 24 at 20:54









          JoceJoce

          4851318




          4851318













          • Thanks, I was not aware of the PDF Import feature. To my dismay preserving the glyphs does not significantly reduce the size of the final document : my 3-page extract still weighs 1.3Mo when the original 24-page document is 460 ko…

            – ysalmon
            Jan 24 at 22:07











          • Have you tried pdfpages ? Of course it does involve a little more of guesswork to get the clipping values right at first.

            – Joce
            Jan 26 at 19:58



















          • Thanks, I was not aware of the PDF Import feature. To my dismay preserving the glyphs does not significantly reduce the size of the final document : my 3-page extract still weighs 1.3Mo when the original 24-page document is 460 ko…

            – ysalmon
            Jan 24 at 22:07











          • Have you tried pdfpages ? Of course it does involve a little more of guesswork to get the clipping values right at first.

            – Joce
            Jan 26 at 19:58

















          Thanks, I was not aware of the PDF Import feature. To my dismay preserving the glyphs does not significantly reduce the size of the final document : my 3-page extract still weighs 1.3Mo when the original 24-page document is 460 ko…

          – ysalmon
          Jan 24 at 22:07





          Thanks, I was not aware of the PDF Import feature. To my dismay preserving the glyphs does not significantly reduce the size of the final document : my 3-page extract still weighs 1.3Mo when the original 24-page document is 460 ko…

          – ysalmon
          Jan 24 at 22:07













          Have you tried pdfpages ? Of course it does involve a little more of guesswork to get the clipping values right at first.

          – Joce
          Jan 26 at 19:58





          Have you tried pdfpages ? Of course it does involve a little more of guesswork to get the clipping values right at first.

          – Joce
          Jan 26 at 19:58


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • 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%2fsuperuser.com%2fquestions%2f1397813%2fworking-with-glyphs-from-multiple-documents-to-rearrange-a-pdf%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

          How to make a Squid Proxy server?

          Is this a new Fibonacci Identity?

          19世紀