Sunday, March 20, 2011

[OpenOffice] How to print (export) a PDF in a different paper size?

Update: 4 March 2012M / 11 Rabiulakhir 1433H, Ah.
2 April 2011 / 28 Rabiulakhir 1432H, Sa.
21 March 2011 / 16 Rabiulakhir 1432H, Is.

11 Rabiulakhir 1432H

Here i am creating a document the size of an A5 in portrait orientation. That's the size when you take an A4 paper, hold it in landscape orientation, then fold it vertically in the middle; only now you've got two pieces of A5 in portrait. Is that twisting your brains?

See here about the A4, and A5 paper:

See here about the portrait, and landscape orientation:

Then here i am again, without success trying to print two portrait-A5 pages on a single landscape-A4 paper. The solution came with a little googling around. Here's how...

First you need to setup a virtual printer. If you've already have this setup then go to Part C.

Part A: Checking for a virtual printer

1. A much shorter + simpler way of checking for a printer is from the panel, System > Administration > Printing. See Pic 1.

Pic 1 - Refer Step 1. Checking the presence of printer(s).

A new window similar to Pic 2 will appear. In it are shown the printers connected to your laptop, be it virtual or physical printers.

Pic 2 - Refer Step 1. No printers yet.

As you can see in Pic 2, no printer is connected to my laptop yet. You can see what it will look like in Pic 15 when a printer is connected; in this case it will be our virtual printer as will be explained in Part B.

2. Since we're going to use Writer, here's how to check from within Writer itself. To run Writer, from the panel, Applications > Office > Word Processor. See Pic 3.

Pic 3 - Refer Step 1. Running Writer.

3. To check for the printer, from the toolbar click File > Printer Settings.... See Pic 4.

Pic 4 - Refer Step 3. Running the pop-up for printer settings.

4. In the Printer Setup pop-up window similar to Pic 5, in the Name drop-down list you can see the name(s) of the printer(s). Currently mine's Generic Printer *i don't exactly know what it means :p*.

Pic 5 - Refer Step 4. Printer Setup pop-up window. Before installing the virtual printer.

What Pic 5 will look like with the presence of our virtual printer can be seen in Pic 16.

Close the Printer Setup pop-up window and quit Writer before proceeding to Part B.

Part B: Setting-up a virtual printer

The virtual printer i'm going to use is named CUPS-PDF. The steps explained in Part B of this post is simply the elaborated version of what is explained here, Installing a PDF Printer on Ubuntu. Tohir (the author in the previous link) explains how to use the Terminal as well as Synaptic Package Manager to install CUPS-PDF. i choose to use the Synaptic Package Manager. Another option is to use Ubuntu Software Center.

5. From the panel, System > Administration > Synaptic Package Manager. See Pic 6.

Pic 6 - Refer Step 5. Running the Synaptic Package Manager.

6. Depending on your user privileges, you might need to enter an administrative password similar to Pic 7. Type in the password in the Password field, then click the OK button.

Pic 7 - Refer Step 6. Enter the administrative password to proceed with Synaptic Package Manager.

Once that is done, you'll see the Synaptic Package Manager window similar to Pic 8.

Pic 8 - Refer Step 6. The Synaptic Package Manager window.

7. In the Synaptic Package Manager window, type this:
in the Quick Search field. You'll see the filtered results similar to Pic 9.

Pic 9 - Refer Step 7. Filtered results for the term cups-pdf.

8. Referring to Pic 9, in the filtered results, there is a package named cups-pdf. To its leftmost will be a white box in the S column.

Click that white box. A pop-up menu similar to Pic 10 appears. Select the option Mark for Installation.

Pic 10 - Refer Step 8. Marking CUPS-PDF for installation.

The previously-white box will now have a tick inside it, as seen in Pic 11.

Pic 11 - Refer Step 8 and 9.

9. Referring to Pic 11, click the button in the toolbar labeled Apply.

A Summary pop-up window similar to Pic 12 appears. To see the list of item(s) to be installed, click the triangle next to To be installed. Click the Apply button to proceed with the installation.

If for some reasons there are other packages required for installation along with CUPS-PDF, my suggestion is to accept them. However if you're unsure, the safe step is to cancel the installation and look for information about those packages :). Better safe than sorry!

Pic 12 - Refer Step 9. Summarising packages to be installed.

Pic 13 shows the installation progress taking place. Once the installation process is done, the previously empty white box (Pic 9) is now a green-filled box, see Pic 14.

Pic 13 - Refer Step 9. Installation in progress.

Pic 14 - Refer Step 9. CUPS-PDF is now in the system!

A little note here. From online reads about CUPS-PDF, it is mentioned that you need to create a folder named PDF in your Home Folder before proceeding to create your PDF file. The latest news is: you don't have to do that any more! Because that folder-creating step has been eliminated. The folder will be auto-created along with your PDF file in it! i've created a PDF file without having a folder named PDF in my Home Folder :)

10. Now to check for our virtual printer. Refer to Step 1, Pic 1 and Pic 15.

Pic 15 - Refer Step 10. Our virtual printer is present. Compare Pic 15 to Pic 2.

Repeat Step 2-4 to check for the printer in Writer. See Pic 16.

Pic 16 - Refer Step 10. Printer Setup pop-up window. After installing the virtual printer. Compare Pic 16 to Pic 5.

Part C: Different paper-size printing (exporting)

11. Run OpenOffice Writer as shown in Step 2. Open the document you want to print in a different paper size.

12. Go to File > Page Preview. See Pic 17.

Pic 17 - Refer Step 12. Going to Page Preview view.

13. In the Page Preview view, click the Print options page view button (in the Page Preview toolbar) similar to Pic 18.

Pic 18 - Refer Step 13. Print options page view button to setup the current document.

The current document is the document you currently have in Writer.

The resulting document is the document that will be produced using CUPS-PDF.

A Print Option pop-up window similar to Pic 19 appears. Setup how you want your current document to align in the resulting document, then click OK. i use the default values.

Pic 19 - Refer Step 13. Preparing the layout of the current document on the resulting document.

14. Then click the Print page view button (in the Page Preview toolbar) similar to Pic 20.

Pic 20 - Refer Step 14. Print page view button to setup the resulting document then print (in this case, export) the current document.

The Print pop-up window similar to Pic 21 appears. Click the button Properties....

Pic 21 - Refer Step 14. Prior to printing.

The Properties of PDF pop-up window similar to Pic 22 appears. Set the Paper size to be the size of the resulting PDF document. Set the Orientation as well. Then click OK. i want mine to be an A4 in landscape.

Pic 22 - Refer Step 14. Setting-up the resulting document prior to printing.

When you come back to the Print pop-up window in Pic 21, click OK. Another pop-up similar to Pic 23 will appear, probably a few seconds depending on your document complexity.

Pic 23 - Refer Step 14. Printing in progress.

15. When the Printing... pop-up (Pic 23) disappears, check for your PDF file. From the panel, go to Places > Home Folder, as shown in Pic 24. Inside your Home Folder will be a PDF folder as shown in Pic 25. Inside the PDF folder will be your PDF file.

Pic 24 - Refer Step 15. Locating the Home Folder.

Pic 25 - Refer Step 15. Your PDF file is in the PDF folder.

You can see my results here:

Catatan Haid

Initially, the document came out right, only it was rotated to be portrait (all the writings were on their side). Simply using PDF-Shuffler to rotate them to be in landscape (all writings were right-side up).

Tuesday, March 15, 2011

How to unprotect a Master document to be able to edit it directly

10 Rabiulakhir 1432H

For those who have written a thesis or a novel, they're pretty familiar or at least have and idea of what a Master document is. Previously I've had the experience of writing a thesis using Microsoft Word (Word), and am currently using OpenOffice Writer (Writer).

Personally, i think Writer isn't as user-friendly as Word. Changes made in Writer's Master document freezes when applying changes such as updating links or scrolling. But then again it could be because my file is loaded with pictures, links, texts, pages, graphs, etc.

One thing i like about Word's Master document is that, you can straight away edit the document there and then. As for Writers's Master document, you'd have to open the sub-document in another window, edit there, probably save it, then update the Master document -- you can't simply edit the Master document directly. That's what i thought until i found out the reason why it is so wickedly complex... my Writer's Master document is write-protected! And there was no clue what was going on or what to do!

I know it's protected because the Formatting toolbar is grayed-out (Pic 1) and no matter how furiously you click *and lash-out*, nothing happens. Also when you try to type something, you get a warning (Pic 2).

Pic 1 - Formatting toolbar is locked.

Pic 2 - Write-protect warning. Readonly content cannot be changed. No modifications will be accepted.

Here's how to remove the protection on your sub-documents so that you can directly edit them in the Master document.

1. From the toolbar, click Format > Sections.... See Pic 3.

Pic 3 - Refer Step 1.

2. A pop-up window appears. In the Edit Sections pop-up window, under the Section section, select the document you want to unprotect. See Pic 4.

My document is named 22. Appendices.odt.

Pic 4 - Refer Step 2, 3, and 4. Edit Sections pop-up window.

3. Still in the Edit Sections pop-up window, under the Write Protection section, there is a Protected option with a tick-box next to it. Untick this box. Then click the OK button. See Pic 4.

4. You will notice that the Formatting toolbar is no longer grayed-out (Pic 5), which means you can now edit straight from the Master document.

Pic 5 - Refer Step 4. The Formatting toolbar is now accessible!