Printing or Exporting Only Visible Pages to PDF Format

Started by AlexHP, December 22, 2015, 09:23:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AlexHP

I have a document template (.vst) that is a wiring diagram and has 13 pages. I have created programming that allows me to save the document as a .vsd and then either export or print the document as a PDF. Here's the kicker... In the process of setting up the wiring diagram, my programming will hide some of the pages (i.e. those not needed for the particular drawing). So even though the document has 13 pages I may only need to print 8 and they might not be in order (i.e. print pages 1, 2, 3, 4, 6, 7, 8, and 9 - hid pages 5, and 10-13). How do I get Visio to either print or export ONLY the pages I want to PDF format? Please help!!! Thank you.

Alex...


AlexHP

Yacine, you're funny...  ;D

I told you about this when I was trying to figure out something else. I had found this and told you about it in a post after you asked "How do you hide a page?"

Anyway, I'm still stuck on how I can print ONLY the visible pages and how I can export ONLY the visible pages to PDF. Even when you hide a page using the UIVisibility property, it appears that the page is still available for printing. So I need help trying to figure out how to print and/or export ONLY the visible pages. Thank you.

Alex...

Surrogate


Yacine

Quote from: AlexHP on December 23, 2015, 01:12:52 PM
Yacine, you're funny...  ;D

I told you about this when I was trying to figure out something else. I had found this and told you about it in a post after you asked "How do you hide a page?"

Anyway, I'm still stuck on how I can print ONLY the visible pages and how I can export ONLY the visible pages to PDF. Even when you hide a page using the UIVisibility property, it appears that the page is still available for printing. So I need help trying to figure out how to print and/or export ONLY the visible pages. Thank you.

Alex...
This happens when you get older. The nice thing is: I will have forgotten this embarrassing topic in ... have you seen my hat?
Yacine


wapperdude

Visio 2019 Pro

AlexHP

While all this jocularity has been enjoyable, I still have an issue which needs a solution...

Since it appears that the print command relies upon the indexing system rather than the page names, is it possible that I can use the indexing system of the pages to print them? Any other idea would be most appreciated as well. Thank you.

Alex...

wapperdude

As you have undoubtedly discovered, there appears to be no built-in mechanism to do what you need.  It would take some custom code.  Don't know if the "indexing" system is accessible, but, you ought to be able to generate a custom form that makes an index of pages, and based upon what's selected, either print or save to PDF.   Yeah.  Seems like re-inventing the wheel.  In my V2007 standard, under print and Save as PDF, there is a grayed out option for "Selection".  It appears that there may have been  some thought to provide this.  Perhaps in the professional or more recent versions this is enabled?

wapperdude
Visio 2019 Pro

AlexHP

I have 2010 Professional and also have that option. By 'Selection" I think it means that you have something on the page selected. As soon as you select something and try the print routine, the "Selection" option will be available.

I think what I am going to do is to set the hidden pages to be background pages. That way the print routine will ignore them. Then when I reset the document those pages will be rest to their original page names, locations, and foreground properties. Thank you.

Alex...

wapperdude

That sounds painful.  Perhaps automate with a macro...change pages to background, save as, then either reset pages or close without saving changes to original doc, or something similar.

Visio 2019 Pro

AlexHP

Well, I already have a routine which changes the name of the pages and hides those that I don't need. So all I should need to do is add in a line that changes those to background pages. Then I also have a routine which resets the pages back to their original state. So all I should have to do is add in the line which changes them to foreground pages. And I have a user field which saves the original page name so I should be able to use that to change the page name back to the original as well. I'll give it a try and let you know...

Alex...