Importing PDF files as Vector Graphics: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 15: Line 15:


===Tackling a PDF===
===Tackling a PDF===
A PDF from an imported graphics point of view is a collection groups of vector images. At the finest grain level it will be the vectors for the individual glyphs and other graphic elements. What you quickly find is that it is groups of groups of groups. In Scribus the serial process is to select the PDF, then select Item > Grouping > Ungroup (Ctrl + Shift + G). Now, it is important to click somewhere outside of your selection, then click inside again. Typically you don't see much change, since many PDFs have a series of containers. So Ungroup again, click outside, then click in again. Keep this up until you end up with a selection that only highlights a sentence. You probably don't need to go farther that this, unless you need to edit down to the glyph level.
A PDF from an imported graphics point of view is a collection groups of vector graphics. At the finest grain level it will be the vectors for the individual glyphs and other graphic elements. What you quickly find is that it is groups of groups of groups. In Scribus the serial process is to select the PDF, then select Item > Grouping > Ungroup (Ctrl + Shift + G). Now, it is important to click somewhere outside of your selection, then click inside again. Typically you don't see much change, since many PDFs have a series of containers. So Ungroup again, click outside, then click in again. Keep this up until you end up with a selection that only highlights a sentence. You probably don't need to go farther that this, unless you need to edit down to the glyph level.


[[File:Importpdf1.png]]
[[File:Importpdf1.png]]
Line 27: Line 27:
[[File:Importpdf3.png]]
[[File:Importpdf3.png]]


Once you've trimmed everything away, here is the end result, as you see off the page. You might be tempted to just rubber-band around these and then move and stretch to fit the page. '''DON'T!'''  
Once you've trimmed everything away, here is the end result, as you see running off the page. You might be tempted to just rubber-band around these and then move and stretch to fit the page. '''''DON'T!'''''
 
[[File:Importpdf4.png]]


After you select all of this, then use Item > Grouping > Group to hold this together. What you will find if you don't group is that you cannot effectively move or resize this selection as a whole, and unfortunately, once it's messed up, Undo will not help you. Therefore, another piece of advice then is to make some temporary saves along the way.
After you select all of this, then use Item > Grouping > Group to hold this together. What you will find if you don't group is that you cannot effectively move or resize this selection as a whole, and unfortunately, once it's messed up, Undo will not help you. Therefore, another piece of advice then is to make some temporary saves along the way.
Line 33: Line 35:
===To the Finish===
===To the Finish===
Here you see the result after grouping, moving and resizing, and below it the final final result after adding some headings and a second page showing a diagram of the nonintuitive control buttons for the switch. All of this ended up being much more legible than the original instructions, thanks to Scribus.
Here you see the result after grouping, moving and resizing, and below it the final final result after adding some headings and a second page showing a diagram of the nonintuitive control buttons for the switch. All of this ended up being much more legible than the original instructions, thanks to Scribus.
[[File:Importpdf5.png]]
[[File:Importpdf6.png]]

Latest revision as of 17:28, 2 October 2016


As of 1.5.x versions of Scribus, you can now import PDFs as vector graphics files. Previously, all you could do would have been to rasterize a PDF into an image frame. This leaves you with some limited and in some cases less than ideal ways you can edit the frame. Now with the ability to bring PDFs as vectors, you will be able to use the vector editing abilities already built-in to Scribus. Here I want to go through an example of how this might be useful.

The Scenario

Having installed a digital timer for some lighting which has the ability to have lights automatically come on at dusk, off at dawn, you can also have the switch automatically adjust to the season of the year and even Daylight Savings Time. As you can imagine, the controls are a bit complicated, and since this is a wall switch, very cryptic. Having lost the instructions some time ago, I decided to download them, which happened to be in PDF form. There were two pages, which I tried printing out directly, which reminded me that even with the instructions that came with the device, the print was so small I had to use a magnifying glass to read parts of it.

So let's use Scribus to improve on the original.

Initial Import

Here you see the result after initially importing to a US Letter page in landscape orientation. It spills off the page, but I had already decided that I only needed the bottom section, so the plan was to cut out everything I didn't need, like the parts about installing the switch. All I really need at this point is the instructions on setting the device, which I have highlighted here in magenta.

Importpdf.png

Tackling a PDF

A PDF from an imported graphics point of view is a collection groups of vector graphics. At the finest grain level it will be the vectors for the individual glyphs and other graphic elements. What you quickly find is that it is groups of groups of groups. In Scribus the serial process is to select the PDF, then select Item > Grouping > Ungroup (Ctrl + Shift + G). Now, it is important to click somewhere outside of your selection, then click inside again. Typically you don't see much change, since many PDFs have a series of containers. So Ungroup again, click outside, then click in again. Keep this up until you end up with a selection that only highlights a sentence. You probably don't need to go farther that this, unless you need to edit down to the glyph level.

Importpdf1.png

At this point you might use the Outine dialog to edit or identify elements, but don't expect these to be usefully named.

Importpdf2.png

In this example, my method was to use the rubber-band technique with the mouse to make selections of items I wanted to delete, as you see here.

Importpdf3.png

Once you've trimmed everything away, here is the end result, as you see running off the page. You might be tempted to just rubber-band around these and then move and stretch to fit the page. DON'T!

Importpdf4.png

After you select all of this, then use Item > Grouping > Group to hold this together. What you will find if you don't group is that you cannot effectively move or resize this selection as a whole, and unfortunately, once it's messed up, Undo will not help you. Therefore, another piece of advice then is to make some temporary saves along the way.

To the Finish

Here you see the result after grouping, moving and resizing, and below it the final final result after adding some headings and a second page showing a diagram of the nonintuitive control buttons for the switch. All of this ended up being much more legible than the original instructions, thanks to Scribus.

Importpdf5.png

Importpdf6.png