Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Thu May 30, 2019 7:03 am

Hello Sir,

I am working with layered pdf files using Spire.pdf(version 5.5.1.2040). When I convert the files into svg ,all the layers are visible in the converted svg file even if they are hidden in the Pdf file.
How to add layers information in the svg file ?

Thank you
Kind Regards,
Susmita Sikder

nilarya
 
Posts: 20
Joined: Mon Mar 19, 2018 7:23 am

Thu May 30, 2019 8:02 am

Hello,

Thanks for your inquiry.
I did notice that the hidden layers are visible in the converted SVG file. Our Dev team will further investigate this issue, we will keep you informed if there is any update. However, do you want to keep hiding the layer in SVG as original PDF? Sorry I am a little confused about the mean of "How to add layers information in the svg file".

Sincerely,
Lisa
E-icbelue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu May 30, 2019 12:17 pm

Hello,

I have hidden layers 2 and 3 from the attached file using Spire.pdf. Now when I convert the file to svg the hidden layers visible.
I want to add the layer information in the resulting svg file. So that I can hide or show the elements in the svg like we do in a pdf viewer.
For example: I want to change the svg file to something like :
Code: Select all
<g>
            <g clip-path="url(#clip5)" LayerName="3">
               <g transform="matrix(3.307327 0 0 3.307327 257.9719 680.3523)">
                  <image  x="0" y="0" xlink:href="data:image/png;base64,iVBORw0K...Jggg==" width="24" height="24" preserveAspectRatio="none"/>
               </g>
            </g>
         </g>

nilarya
 
Posts: 20
Joined: Mon Mar 19, 2018 7:23 am

Fri May 31, 2019 5:49 am

Hello,

Thanks for your more information.
About adding layer information in the resulting SVG file, after more investigations by our Dev team, they informed that this can't be implemented when converting the PDF to SVG. Since the concept of PDF layer is different from that of SVG layer, the PDF layer can be controlled by the left menu bar in PDF viewer, but the SVG layer is rendered by the sequence of tags. It is infeasible to see the same layer structure in SVG like in PDF. Hope you can understand! However, they have fixed the previous reported issue, now the hidden layers could keep hiding in the converted SVG file. Once the hotfix is available, I will let you know.

Sincerely,
Lisa
E-icblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Fri Jun 21, 2019 8:21 am

Hello,

Glad to inform you that we just released Spire.PDF Pack(Hot Fix) Version:5.6.27 in which the hidden layers could keep hiding in the converted SVG file. Welcome to download it from the following links and test.
Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Mon Jul 01, 2019 2:05 pm

Hello Lisa,

I have downloaded Spire.pdf version(spire.pdf_5.6.27) from the link which you had suggested , but after use this new Spire.Pdf.dll , and Spire.License I got an following error. I have also added our license.elic.xml file. Please suggest me how I solve this error.

Thank you,
Kind Regards,
Susmita

nilarya
 
Posts: 20
Joined: Mon Mar 19, 2018 7:23 am

Tue Jul 02, 2019 2:32 am

Hello Susmita,

Thank you for contacting.
I suggest that you remove all dlls related to our product in your project and re-add the corresponding dlls (Spire.Pdf.dll, Spire.License.dll ) from Spire.PDF 5.6.27 package. Please make sure that you have referred all the dlls from the same folder. If the issue still troubles you, just feel free to write back.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Tue Jul 02, 2019 11:29 am

Hello Lisa,

Thank you, for your suggestion. There is no error now. program is running fine, but still the hidden layers are visible in converted svg in this version(5.6.27) .I have attached the layered file.

Thank you,
Kind regards,
Susmita

nilarya
 
Posts: 20
Joined: Mon Mar 19, 2018 7:23 am

Wed Jul 03, 2019 2:24 am

Hello Susmita,

Thanks for your feedback.
I did notice the hidden layers are still visible in converted SVG when testing your sample PDF file, our Dev team is working on this issue now. Once I get any update from them, I will keep you informed immediately. Sorry for the inconvenience caused.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Jul 31, 2019 9:06 am

Hello,

Greetings from E-iceblue.
Kindly note that we just released Spire.PDF Pack(Hot Fix) Version:5.7.20 which fixed your issue. Welcome to download it from the following links and test.
Website link: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link: https://www.nuget.org/packages/Spire.PDF/

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Fri Aug 02, 2019 8:16 am

Hello Susmita,

Greetings from E-iceblue.
Did the latest hotfix version work for you? Thanks in advance for your feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF