V6 Goal: True PDF Export

Hmm… I may be beginning to understand. Do you want the size of the page to be the same number of dots in the width and height as there are pixels in a viewport?

  • Not the viewport, no. The aspect ratio of the viewport will most likely be wrong. I am not pulling the borders of a viewport to get the export I need. I get the aspect ratio from the bounding box.

  • I tend to use the same number as the units in the model but I guess that pixels might do the job. If the dimensions of the model are either ridiculously high or low I just go down or up one order of magnitude. Most often, the result will be used to insert into a word document or a powerpoint presentation. Sizes that “make sense” in relation to this is what I aim for…

Steve’s probably already got it, but I’m having a tough time visualizing what you’re saying. Would it be a big deal to prepare some screen shots and pseudo-paper layouts to show what you mean? Tying together what you are trying to accomplish with respect to paper size in inches (mm), printer resolution, viewport pixels, model extent and aspect ratio, screen resolution, etc? And, of course, what you’d like to see in a GUI to make it easy.

I’m still confused too and this is probably a case where a mock up would really help. I’ve got the feeling that implementing this request wouldn’t be too hard once I understand it.

Very nice addition, I will be happy to make my SVG exporter UI quite the same as yours. It’s cool that you have feedbacks, I was not so lucky :frowning:
Some questions
How is done UI and folding panel. I used Windows Forms in Visual Studio 2015
How to get geometry of annotations ?

Some comments
When there is a point it appears as a circle in the viewer and a rectangle in Acrobad Reader DC 2015.
I understand you wanted a true WYSIWYG, also for selected curves ! but when there are surfaces they are not (yet?) exported but they are visible in Viewer. Visible on artistic and copied as curves with isocurve on pdf. On SVG I choose to export the border and fill the interior, and also add transparency.
Arrow of dimension visible on Viewer not on PDF

Keep the good work

1 Like

Just as an FYI; I also implemented an SVG exporter at the same time as when I wrote this PDF exporter. This should be showing up soon in the V6 WIP. The SVG export will be available in the next WIP’s RhinoCommon SDK. I’ll write a separate post once this feature becomes available.

Technical and artistic modes are actually raster operations and will be supported in the PDF exporter once I have rastet output supported.

Thanks for the note on points. I’ll get that added to the bugtracking system


Thanks for the information, so I will not work more on my SVG exported and keep it for Rhino 5.0. It was useful for me to get some lasercut from Sculpteo.

To come back on PDF do you plan to output surface flattened made with filled path ?

Another loosely related issue that should be considered is the matter of printing a model at a scale that requires multiple sheets with registration marks for proper alignment. The way the GUI for this is implemented in normal printing could use some serious additional love and, of course, should be carried over to pdf. Probably not needed in SVG.

You may still find it useful to customize. RhinoCommon will have a function that creates an SVG from ViewCaptureSettings. This function will return an XmlDocument instance that you could further adjust before saving.

Solid hatches are exported as filled paths. Surfaces will either be wires in vector output or a bitmap image in raster output

The way the PDF exporter is designed, you could write a display conduit to do just this very thing if you get sick of waiting around for me to add the feature😄

Hi Steve, solids are playing up on V5 generated file (Layout and MSpace), the PDF from layout looks good when solid hatching is turned off.

Can you send me a sample file that exhibits this bug?

I’ll send it through to Tech

1 Like

Hi Steve
Attached an example of some very large thicknesses of lines with True PDF Export
Ciao Vittorio
Test_Print_Pdf_Wip.pdf (84.7 KB)
Test_Print_Pdf_Wip.3dm (3.8 MB)

Let me turn that around and ask you how you export to WMF.

I have a simple illustration that I need to get into a Word document:

I select all and call Export. The WMF Export Options box comes up like this:

Side note: I’ve asked for this several time before but perhaps in RH6 the units in the Destination and Margins settings won’t default to inches no matter what? Inches make no sense, yet I have to change this every - single - time.

On with the export.
Destination width and height. I really don’t know. Something like 150 mm to 300 mm in width sounds good so I type 200 mm in width. That leaves me with 200 by 1700 mm.

Hmmm… Are you now expecting me to change the height value a bit and see what happens? Sure, I can do that a few times and will end up where I need. I have found that a faster way is to create the bounding box and get the dimensions. But is that really necessary?

Also, as you can see from the first picture (and also the second), the illustration is not necessarily centered (or even present at all) on the canvas that is being exported. So reducing the height to something that looks to fit is hard at this point.

In the View and Output Scale settings I can position the canvas around the illustration using one of the 3 options. I use the Set - Window option to draw the area that I want to export. This is the ideal tool to determine what is to be exported. The only problem is, that it doesn’t allow me to do anything with the white space above and below.

To me it would make more sense if the order of things were changed:

  1. You set the view. Viewport and Extents will use the viewport ratio, using a window to set the canvas always the user to change the ratio.
  2. The scale defaults to 1:1 and this automatically sets the Destination Width & Height. If these get too small in relation to where the output is going to be used, the user can easily change the scale an order of magnitude.

By the way, as reported before, I still have to turn to RH5 to actually export WMF because the WMF format that RH6 produces doesn’t get into Word / PowerPoint.

Hi Vittorio,
This looks correct (I actually think it looks really nice :slight_smile: ). Your “SceneSilhouetteCurves” Layer has a print width of 0.5. The PDF exporter uses the print width for objects/layers to calculate the resulting width. You can adjust how the widths are interpreted in the “Linetypes and Line Widths” section of the PDF export dialog.

First of all, thanks for taking the time to write down all of these comments.

I can see your point with WMF since WMF is typically a somewhat “unit-less” format where it is usually placed in another document for illustrative purposes (Word, Excel, …). In this case, a redesign of the WMF export dialog may be the best solution. Of course, I’m being lazy and trying to reuse as much as possible which is why the WMF export dialog looks just like the print dialog which happens to look just like the PDF export dialog… For WMF, it may be best to just ask for a window area or bounding box and then I can make up all of the other internally needed values.

Yep, it’s been on my list for quite a while. I haven’t focused much on the printing system during V6 development until now (I’ve had my head buried in display rewrite for a long time.)

I’m still not convinced that your WMF workflow would be the best for PDF. It seems like the WMF dialog could definitely be simplified with respect to just selecting a print area and I can make up a true width/height combination that works. PDF seems like it needs to have a drop-down with a large set of pre-canned paper sizes as well as a custom size that you can just set since PDF really is targeted at creating pages of given sizes.

I moved this back to my 6.0 list. Somehow this slipped by me and I didn’t realize it was a regression.

Thanks, Steve, for looking into this!

I agree with you up to a point.
Yes, in 99.9% of the cases, printing to PDF will be to (one of a long list of) known paper sizes with fixed ratios.

As such, WMF might be special.

But consider the odd case where one wants to produce a PDF that either won’t be for print or printed on a perhaps a 36" plotter (I’ve tracked organizational changes at our company for 10+ years and those charts are probably best viewed on screen…).

The same goes for printing to an image file, by the way. (Does anybody actually use that interface to get a PNG out of Rhino??)

In those cases, the user will have a general idea (or very much fixed like in the 36" plotter case) about only ONE of the two dimensions (width and height). With the system that is currently in place, the user either has to resort to some form of trial and error to get to the missing dimension or get dimensions from the model.

So perhaps apart from the pre-canned paper sizes, the custom size could use a system whereby the user draws a rectangle in the model and that rectangle sets the ratio of the output size?

My hope is that the SDK becomes rich enough in this area that ‘unusual’ cases can be dealt with through relatively simple scripts. I’ll keep this case that you are describing in mind while putting the SDK together. It is also a nice way to prototype functionality that can later be integrated into the user interface.

1 Like