You are not logged in.

#1 2015-03-20 03:35:39

mssun
Member
Registered: 2013-04-06
Posts: 33

[SOLVED] How to export a selection in a PDF file as PDF ?

I tried a lot of PDF readers, but none of them supports exporting a selection as PDF. Okular have a similar function, but it can only save selections as JPEG or PNG. Alternatively, I can take a screenshot of a selection in one PDF reader, but still JPEG. I want to use this function to crop a selection such as formulas, vector graphics inside a PDF file. I know Preview.app in OS X works great for me. I am wondering if there is any alternatives for Linux. Thank you so much.

Last edited by mssun (2015-03-20 08:34:20)

Offline

#2 2015-03-20 04:31:08

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

Libreoffice Draw, pdftk (AUR) or possibly mupdf's mutool for command line. There's also gimp, inkscape, and quite a few more.

Offline

#3 2015-03-20 07:39:02

mssun
Member
Registered: 2013-04-06
Posts: 33

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

Thanks, thisoldman. I tried some of your recommendations. But I still cannot find an efficient way to accomplish my tasks. Say, I want to crop some paragraph from PDF book as PDF snippets and plugin into my LaTeX-based document.

Offline

#4 2015-03-20 07:45:14

nullified
Member
From: Massachusetts, USA
Registered: 2013-12-09
Posts: 468

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

mssun, gimp seems to work well for this purpose. you just draw a box around want you want, crop, and save. What's not efficient about that? Granted, it's not as easy as doing it in a normal pdf reader, but it's pretty simple nonetheless.


"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace

Offline

#5 2015-03-20 08:00:36

pb
Member
From: Krakow, PL
Registered: 2014-12-26
Posts: 336
Website

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

Maybe take a look at: https://aur.archlinux.org/packages/gpdfx/ or maybe one of PDF's editors like MasterPDFEditor (free for non-commercial use), pdfeditor etc. Or one of converters like pdf2html and after conversion plug html (or the other format) into LaTeX document. Or... make OCR on PDF and then plug document saved in even plain txt format. Also, there is this utility: http://www.ctan.org/tex-archive/macros/ … b/pdfpages (and in AUR: https://aur.archlinux.org/packages/latex-pdfpages/) - maybe it will be helpful for you (I don't use LaTeX).

Offline

#6 2015-03-20 08:11:36

nullified
Member
From: Massachusetts, USA
Registered: 2013-12-09
Posts: 468

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

If you want to import selections of a pdf into another pdf via LaTeX, you might as well crop the pdf and export a png or pdf and use the graphicx package: https://en.wikibooks.org/wiki/LaTeX/Imp … _PDF_pages

I don't think pdfpages is what you're looking for. Use graphicx and \includegraphics{}. If what you're trying to import from the other pdf is a formula or table you can always code it as well.

Edit: gpdfx in the previous comment looks good, extract using it then include using the graphicx package.

Last edited by nullified (2015-03-20 08:13:45)


"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace

Offline

#7 2015-03-20 08:20:29

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

If you want to include pdf snippets in latex, you could use the viewport attribute for includepdf (pdfpages). That should help to keep text selectable.
http://rainnic.altervista.org/content/h … sing-latex
Edit: I forgot that you will get it as a new full page and not as part of your normal document page, so includegraphics may be better.
Edit: includepdf  probably works if you want to create a new intermediate pdf file, e.g. book.pdf + selection.tex -> selection.pdf, then document.tex + selection.pdf -> document.pdf (I think that is the hidden magic behind gpdfx)

Last edited by progandy (2015-03-20 08:35:07)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#8 2015-03-20 08:33:38

mssun
Member
Registered: 2013-04-06
Posts: 33

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

Thanks so much. I think pb provides a good solution. gpdfx solves my problem to crop PDF. The function is quite simple and straightforward.

For others' alternative solutions, thank you all. I may use them later if possible.

Offline

#9 2016-06-11 17:45:30

cphyc
Member
Registered: 2015-01-06
Posts: 19

Re: [SOLVED] How to export a selection in a PDF file as PDF ?

For the record, you might as well try the solution proposed here, that uses xpdf.

Offline

Board footer

Powered by FluxBB