Hello,
My dxf drawing has multiple layers eg: (L1, L2, L3…L10).
While printing to pdf I need following
Hide Layer L1 and L3 (means all entityies in Layer L1 and L3 would not be shown)
How can I achieve the same
Thanks Pranav
Hello,
My dxf drawing has multiple layers eg: (L1, L2, L3…L10).
While printing to pdf I need following
Hide Layer L1 and L3 (means all entityies in Layer L1 and L3 would not be shown)
How can I achieve the same
Thanks Pranav
Find attached source dxf file
here while printing to pdf,
I have attached output pdfMISO-GA-BP-CW with hidden layers.pdf (22.3 KB)
MISO-GA-BP-CW for layers.zip (112.9 KB)
I have created an issue with ID CADJAVA-864 in our issue tracking system as investigation to further explore the requirements shared by you. This thread has been linked with the issue so that you may be notified once the issue will be fixed.
You can filter out the layers by selecting the ones that you require to render in PDF. However, you have filter out the layers based on some criteria that you will devise. Please consider following example on your end.
List requiredLayers = new ArrayList();
CadLayersList cadLayersList = cadImage.getLayers();
for (int i = 0; i < cadLayersList.size(); i++)
{
CadLayerTable layer = (CadLayerTable)cadLayersList.get_Item(i);
// negative color id means layer is hidden
// plot flag set up to false means the layer is not for printing
if (layer.getColorId() >= 0 && layer.getName().compareTo("DYNAMIC TEXT") != 0
&& !(layer.getPlotFlag().isSet() && !layer.getPlotFlag().getValue()))
{
requiredLayers.add(layer.getName());
}
}
rasterizationOptions.setLayers(requiredLayers);