Addendum.
Vectors, YES.  Searchable text, YES.

(Larry, I don't know how I missed it when we looked at this a few months
ago. )

Vector Layered PDFs:
As previous version except use PDF Creator instead of saving as PNGs.
http://sourceforge.net/projects/pdfcreator/
 Create your layers by redisplaying them through identical layouts  and
printing them off (make sure the Mapview stays still.)  For each layer, have
only 1 maptitude layer be visible.

Browse for them as your watermarks instead of the PNGs.    They should be
transparent by default, so you don't need Paint.NET anymore.  Continue to
use the Javascript OCG hacks as before.
The output maps demonstrate the same clean line unlimited zooming as the
TerraGo output (ie: true vector).

Searchable Text:
You can create an annotations layer by making your labels manual, turning
off the original layer, and printing that.  When you add the PDF to your
layered PDF (using watermarks + javascript renaming), you will be able to
search for that text using PDF's search function.  Not sure if theres a way
to control zooming (right now it only pans).  I will work with other label
use when I get back into the office next week.

Anyone want to write a DK script to cycle through a user selected subset of
layers in a map, use a layout as a template and using Printer=PDFCreator
produce all the component layers?

I will try to clean up and post walkthrough instructions and a new demo map
within a few days.  Meanwhile, let me know if you're having problems with
the method.  I suspect that this will not work well for including image
layers due to limitations with PDFCreator, but will try and test.


Josh Rosenthal
GIS Supervisor
Massachusetts Historical Commission


On Jan 11, 2008 10:18 AM, Josh Rosenthal <[EMAIL PROTECTED]> wrote:

> Hi Mike,
> Short answer, vectors... no.  I'm not sure thats possible without
> Arc/TerraGo.  A layered image PDF *is *possible (Proof of Concept
> attached), and not too difficult, especially given the workflow you've
> described.  Of course, this results in one having to work with image files,
> and that makes export quality and issue.  It sounds like you've found a way
> to beat that.  How are you getting the maps out of Maptitude as a TIF?
>  Currently, the only straightforward layered PDF solution I have requires
> working with PNGs, but in theory TIF *might *work, and it might work to
> harvest the layers as a TIF and then convert to PNG.  As to how most (non
> maptitude) folks do this... its built into Arc 9.2+ as part of the PDF
> export when you raise the PDF version to one that supports layers.
>
> So... there are two basic ways to do this in Maptitude.
>
> One involves Illustrator and Acrobat.  After working on it awhile, I could
> never got the conversion time under a couple of hours for a medium
> complexity map and even then didn't like the output.  I don't recommend this
> solution, so I'll describe it afterwards in vague terms.  The advantage of
> this method is that it preserves text as text, which means the search
> function in Acrobat can be used to locate an annotation and allow a
> Search/Zoom functionality, such as we're used to with the products of Arc's
> layered PDFs.  The disadvantage is the sheer complexity and inability to go
> back and make corrections if errors occur at any stage.
>
> The second, far simpler solution,  involves Acrobat and a photo editting
> software of choice that supports a Magic Wand tool and transparency and a
> little bit of Javascript magic courtesy of our friends at acrobatusers.com.
>  I used Paint.NET (free .NET based Graphics program, rather nice).
>
>
>    - First though, lets discuss PDF Layers, or OCGs (Optional Content
>    Groups), or rather, lets just read about them.
>    -
>       
> http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/create_use_layers/
>
>
>    - Basically, the article explains that we can programmatically alter
>    how Layers are referenced using Javascript, and that the Watermark is
>    actually a very particular form of Layer.  Try out the demo in the article.
>    In order to do so, you'll need to activate the Javascript console.  An
>    article on the Javascript console can be found here:
>       -
>       
> http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/javascript_console/index.php
>
>
>    - So... back to Maptitude.  Create and export each layout/layer as a
>    PNG file.  If it gives you better quality, you might export as TIFFs and
>    convert to PNGs.  Make sure the scope stays the same, etc.
>
>
>    - Open all layers (except a base layer that will always be on), in
>    your graphics program.
>    - Using the magic wand tool, select all white space.  Make sure the
>    tolerance is set real low, and the range is global.
>    - Delete the white space.  Hopefully, you should now have a
>    transparent version of the layer.  Save it as a new PNG, which we'll called
>    PNG-T.
>
>
>    - In Acrobat, make sure the javascript console is activated, as per
>    the second article above.
>    - Create a PDF from your base layer that you will want always on,
>    etc.
>    - Create a watermark.  Acrobat will not list your PNGs as acceptable
>    choices, but type in the file names anyway.  It will read them.
>    - Cntrl-J to open your Java Console.
>    - type:    this.setOCGOrder(this.getOCGs());  and hit cntrl-enter
>    - Open the view->layers.  You'll see the watermark there, and... its
>    a layer.  You can turn it on and off. Now we just need to rename it.
>    - Edit->Javascript->Document Javascripts
>    - Create a function called FindOCG.
>    - When you are prompted to enter the code, overwrite the start of
>    the function's code with the function from the layer creation article
>
> function FindOCG(cName)
> >         {
> >            var aOCGs = this.getOCGs();
> >            for(var i=0; aOCGs && i<aOCGs.length;i++)
> >            {
> >               if(aOCGs[i].name == cName)
> >                  return aOCGs[i];
> >            }
> >            return null;
> >         }
> >
>
>
>    - Back to the Javascript Console
>    - Type    FindOCG("Watermark").name = "WhateverYouWant";  and hit
>    cntrl-enter
>    - Rinse, wash, repeat.
>
> A couple noteworthy points:
>
>    - File-Document Properties allows you to set an Initial View of
>    Page+Layers Tab.  This will help your users recognize the presence of
>    layers.
>    - Right clicking on a layer and looking at the properties allows you
>    to set certain Printing, Initial visibility, export, etc.  I suspect you
>    want visible when on and prints and exports when visible.
>    - I've seen a number of times the use of a top layer of a shaded
>    text box that explains that the user is working in a layered document and
>    how to turn layers on and off.  While a bit awkward, this can be very 
> useful
>    if you're finding that people aren't realizing that this new PDF map is
>    different from the old ones.
>    - In theory, TIFFs support transparency.  In practice, I couldn't
>    get the use of transparent TIFF watermarks to preserve that Transparency
>    into Acrobat.   Let me know if anyone figures this out.
>    - I don't know how to delete layers from the PDF.  As evidenced my
>    the typo in my boilerplate sample.
>
> Enjoy!
>
> ----------------------------------------
>
> Lastly, a summary of the first method.  Not fresh in my mind, and not
> something I can recreate as I no longer have Illustrator.  Print to a PDF
> Printer that installs with Acrobat.  Open the result in Illustrator, look at
> the objects, find and group them.  Each letter and line segment can be its
> own object, so this gets very ugly.  You will also need to compress the
> illustrator layers which removes your ability to edit them later.  Text here
> will be semi searchable.
>
> -----------------------------------------
>
> Hope that helps.  Vectors, rather than images are still a ways off, but
> this may provide layered functionality if we can either clean up the
> quality, or live with it.  I suspect vector support needs to occur on
> Caliper's end, although one could also probably write it using some
> combination of the DK and the iText Java PDF library, but this is far beyond
> me.  Hopefully Caliper will decide this would be a useful feature.  One note
> on TerraGo's solution.  One of the great potentials of their product is that
> you can include attribute data in the PDF and then use the object data tool
> to let users access it.  However, they have a functional limit of 5000
> attributes (attributes = fields * elements), which is a limit caused by the
> PDF format.
>
> Josh Rosenthal
> GIS Supervisor
> Massachusetts Historical Commission
>
>
>
>
>
>
>
> On Jan 10, 2008 5:24 PM,  <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> >
> > Hello - I'm wondering how to accomplish layered PDF vector maps with
> >  maptitude 4.7.
> >
> >  I normally create single layer maps by saving as TIF and then opening
> >  the TIF in Adobe Acrobat. Going to TIF first gives better results
> >  than printing the map directly to Acrobat.
> >
> >  BUT I don't have a clue how folks make maps that have selectable
> >  multiple layers in a PDF.
> >
> >  Any help appreciated.
> >
> >  Mike Meuser
> >  http://www.learn2map.com
> >   http://www.mapcruzin.com
> >
> >  
>
>

Reply via email to