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.

Tue Oct 10, 2023 8:49 pm

The conversion from PDF file to SVG files works Ok, but going from SVG to PDF issued an error inside Adobe Acrobat
"An error exists on this page. Acrobat may not display the page correctly."

1. Added TestPdf1
2. Code used for testing:

using Spire.Pdf;

namespace SpirePdf1
{
internal class Program
{
static void Main(string[] args)
{
PdfDocument document1 = new PdfDocument();
// Load a sample PDF file
document1.LoadFromFile("TestPdf1.pdf");
// Convert PDF to SVG
document1.SaveToFile("TestPdf1.svg", FileFormat.SVG);

PdfDocument document2 = new PdfDocument();
// Load a SVG files
foreach (var file in Directory.EnumerateFiles(".", "*.svg"))
document2.LoadFromSvg(file);
// Save result document
document2.SaveToFile("TestPdf1-1.pdf", FileFormat.PDF);
document2.Dispose();
}
}
}

3. Spire.Pdf 9.9.9
4. Windows 10, 64-bit, US-English
5. Console app (.NET 7.0)

mpaine23
 
Posts: 1
Joined: Tue Oct 10, 2023 8:26 pm

Wed Oct 11, 2023 3:27 am

Hi,

Thank you for your inquiry.
I have tested the document you provided and reproduced your question. I have recorded this issue in our bug tracking system with the number "SPIREPDF-6331". Our development will investigate and fix it in the future. If this issue is resolved, we will notify you as soon as possible. We deeply apologize for the inconvenience caused.

Sincerely
Ula
E-iceblue support team
User avatar

Ula.wang
 
Posts: 282
Joined: Mon Aug 07, 2023 1:38 am

Fri Dec 08, 2023 1:41 am

Hi,

Thank you for your patience.
I'm glad to inform you that we just released Spire.PDF for .Net 9.12 has resolved your issue with number SPIREPDF-6331. Welcome to download the test.
In addition, we have made adjustments to the product code, and I put the adjusted code below for your reference.
Code: Select all
// Create a new PdfDocument object
PdfDocument document1 = new PdfDocument();

// Load the input file into the PdfDocument object
document1.LoadFromFile(inputFile);

// Save the PdfDocument object as an SVG file
document1.SaveToFile(outputFile_Svg, FileFormat.SVG);

// Create another new PdfDocument object
PdfDocument document2 = new PdfDocument();

// Load the previously saved SVG file into the new PdfDocument object
document2.LoadFromSvg(outputFile_Svg);

// Save the PdfDocument object as a PDF file
document2.SaveToFile(outputFile_Pdf, FileFormat.PDF);


Website download link: https://www.e-iceblue.com/Download/down ... t-now.html

Sincerely,
Ula
E-iceblue support team
User avatar

Ula.wang
 
Posts: 282
Joined: Mon Aug 07, 2023 1:38 am

Return to Spire.PDF