Friday, 20 October 2023 02:53

C#/VB.NET: PDF를 SVG로 변환

SVG(Scalable Vector Graphics)는 웹에서 2차원 이미지를 렌더링하는 데 사용되는 이미지 파일 형식입니다. 다른 이미지 파일 형식과 비교하여 SVG는 대화형 기능 및 애니메이션 지원과 같은 많은 장점을 가지고 있어 사용자가 품질 저하 없이 이미지를 검색, 색인화, 스크립팅 및 압축/확대할 수 있습니다. 때로는 다음을 수행해야 할 수도 있습니다 PDF 파일을 SVG 파일 형식으로 변환합니다. 이 기사에서는 Spire.PDF for .NET 사용하여 이 작업을 수행하는 방법을 보여줍니다.

Spire.PDF for .NET 설치

먼저 Spire.PDF for.NET 패키지에 포함된 DLL 파일을 .NET 프로젝트의 참조로 추가해야 합니다. DLL 파일은 이 링크에서 다운로드하거나 NuGet을 통해 설치할 수 있습니다.

PM> Install-Package Spire.PDF

C#/VB.NET에서 PDF 파일을 SVG로 변환

Spire.PDF for.NET PDF 파일의 각 페이지를 단일 SVG 파일로 변환하는 PdfDocument.SaveToFile(String, FileFormat) 메서드를 제공합니다. 자세한 단계는 다음과 같습니다.

  • PdfDocument 개체를 만듭니다.
  • PdfDocument.LoadFromFile() 메서드를 사용하여 샘플 PDF 파일을 로드합니다.
  • PdfDocument.SaveToFile(String, FileFormat) 메서드를 사용하여 PDF 파일을 SVG로 변환합니다.
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace ConvertPDFtoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument document = new PdfDocument();
    
                //Load a sample PDF file
                document.LoadFromFile("input.pdf");
    
                //Convert PDF to SVG
                document.SaveToFile("PDFtoSVG.svg", FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

C#/VB.NET에서 선택한 PDF 페이지를 SVG로 변환

PdfDocument.SaveToFile(String, Int32, Int32, FileFormat) 메서드를 사용하면 PDF 파일의 지정된 페이지를 SVG 파일로 변환할 수 있습니다. 자세한 단계는 다음과 같습니다.

  • PdfDocument 개체를 만듭니다.
  • PdfDocument.LoadFromFile() 메서드를 사용하여 샘플 PDF 파일을 로드합니다.
  • PdfDocument.SaveToFile(String, Int32, Int32, FileFormat) 메서드를 사용하여 선택한 PDF 페이지를 SVG로 변환합니다.
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace PDFPagetoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument doc = new PdfDocument();
    
                //Load a sample PDF file
                doc.LoadFromFile("input.pdf");
    
                //Convert selected PDF pages to SVG
                doc.SaveToFile("PDFPagetoSVG.svg", 1, 2, FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

C#/VB.NET에서 사용자 정의 너비 및 높이를 사용하여 PDF 파일을 SVG로 변환

Spire.PDF for .NET에서 제공하는 PdfConvertOptions.SetPdfToSvgOptions() 메서드를 사용하면 출력 SVG 파일의 너비와 높이를 지정할 수 있습니다. 자세한 단계는 다음과 같습니다.

  • PdfDocument 개체를 만듭니다.
  • PdfDocument.LoadFromFile() 메서드를 사용하여 샘플 PDF 파일을 로드합니다.
  • PdfDocument.ConvertOptions 속성을 사용하여 PDF 변환 옵션을 설정합니다.
  • PdfConvertOptions.SetPdfToSvgOptions() 메서드를 사용하여 출력 SVG 파일의 너비와 높이를 지정합니다.
  • PdfDocument.SaveToFile() 메서드를 사용하여 PDF 파일을 SVG로 변환합니다.
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace PDFtoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument document = new PdfDocument();
    
                //Load a sample PDF file
                document.LoadFromFile("input.pdf");
    
                //Specify the width and height of output SVG file
                document.ConvertOptions.SetPdfToSvgOptions(800f, 1200f);
    
                //Convert PDF to SVG
                document.SaveToFile("result.svg", FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

임시 라이센스 신청

생성된 문서에서 평가 메시지를 제거하고 싶거나, 기능 제한을 없애고 싶다면 30일 평가판 라이센스 요청 자신을 위해.

또한보십시오

Friday, 20 October 2023 02:52

C#/VB.NET: converti PDF in SVG

SVG (Scalable Vector Graphics) è un formato di file immagine utilizzato per il rendering di immagini bidimensionali sul Web. Rispetto ad altri formati di file immagine, SVG presenta molti vantaggi come il supporto dell'interattività e dell'animazione, consentendo agli utenti di cercare, indicizzare, creare script e comprimere/ingrandire le immagini senza perdere la qualità. Occasionalmente potrebbe essere necessario convertire i file PDF nel formato file SVG e questo articolo dimostrerà come eseguire questa attività utilizzando Spire.PDF for .NET.

Installa Spire.PDF for .NET

Per cominciare, devi aggiungere i file DLL inclusi nel pacchetto Spire.PDF for.NET come riferimenti nel tuo progetto .NET. I file DLL possono essere scaricati da questo link o installato tramite NuGet.

PM> Install-Package Spire.PDF

Converti un file PDF in SVG in C#/VB.NET

Spire.PDF for .NET offre il metodo PdfDocument.SaveToFile(String, FileFormat) per convertire ogni pagina in un file PDF in un singolo file SVG. I passaggi dettagliati sono i seguenti.

  • Crea un oggetto PdfDocument.
  • Carica un file PDF di esempio utilizzando il metodo PdfDocument.LoadFromFile().
  • Converti il file PDF in SVG utilizzando il metodo PdfDocument.SaveToFile(String, FileFormat).
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace ConvertPDFtoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument document = new PdfDocument();
    
                //Load a sample PDF file
                document.LoadFromFile("input.pdf");
    
                //Convert PDF to SVG
                document.SaveToFile("PDFtoSVG.svg", FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

Converti le pagine PDF selezionate in SVG in C#/VB.NET

Il metodo PdfDocument.SaveToFile(String, Int32, Int32, FileFormat) consente di convertire le pagine specificate in un file PDF in file SVG. I passaggi dettagliati sono i seguenti.

  • Crea un oggetto PdfDocument.
  • Carica un file PDF di esempio utilizzando il metodo PdfDocument.LoadFromFile().
  • Converti le pagine PDF selezionate in SVG utilizzando il metodo PdfDocument.SaveToFile(String, Int32, Int32, FileFormat).
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace PDFPagetoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument doc = new PdfDocument();
    
                //Load a sample PDF file
                doc.LoadFromFile("input.pdf");
    
                //Convert selected PDF pages to SVG
                doc.SaveToFile("PDFPagetoSVG.svg", 1, 2, FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

Converti un file PDF in SVG con larghezza e altezza personalizzate in C#/VB.NET

Il metodo PdfConvertOptions.SetPdfToSvgOptions() offerto da Spire.PDF for .NET consente di specificare la larghezza e l'altezza del file SVG di output. I passaggi dettagliati sono i seguenti.

  • Crea un oggetto PdfDocument.
  • Carica un file PDF di esempio utilizzando il metodo PdfDocument.LoadFromFile().
  • Imposta le opzioni di conversione PDF utilizzando la proprietà PdfDocument.ConvertOptions.
  • Specificare la larghezza e l'altezza del file SVG di output utilizzando il metodo PdfConvertOptions.SetPdfToSvgOptions().
  • Converti il file PDF in SVG utilizzando il metodo PdfDocument.SaveToFile().
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace PDFtoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument document = new PdfDocument();
    
                //Load a sample PDF file
                document.LoadFromFile("input.pdf");
    
                //Specify the width and height of output SVG file
                document.ConvertOptions.SetPdfToSvgOptions(800f, 1200f);
    
                //Convert PDF to SVG
                document.SaveToFile("result.svg", FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

Richiedi una licenza temporanea

Se desideri rimuovere il messaggio di valutazione dai documenti generati o eliminare le limitazioni della funzione, per favore richiedere una licenza di prova di 30 giorni per te.

Guarda anche

Friday, 20 October 2023 02:52

C#/VB.NET : convertir un PDF en SVG

SVG (Scalable Vector Graphics) est un format de fichier image utilisé pour le rendu d'images bidimensionnelles sur le Web. Par rapport à d'autres formats de fichiers image, SVG présente de nombreux avantages, tels que la prise en charge de l'interactivité et de l'animation, permettant aux utilisateurs de rechercher, d'indexer, de créer des scripts et de compresser/agrandir des images sans perte de qualité. Parfois, vous devrez peut-être convertissez des fichiers PDF au format de fichier SVG et cet article montrera comment accomplir cette tâche à l'aide de Spire.PDF for .NET.

Installer Spire.PDF for .NET

Pour commencer, vous devez ajouter les fichiers DLL inclus dans le package Spire.PDF for.NET comme références dans votre projet .NET. Les fichiers DLL peuvent être téléchargés à partir de ce lien ou installés via NuGet.

PM> Install-Package Spire.PDF

Convertir un fichier PDF en SVG en C#/VB.NET

Spire.PDF for .NET propose la méthode PdfDocument.SaveToFile(String, FileFormat) pour convertir chaque page d'un fichier PDF en un seul fichier SVG. Les étapes détaillées sont les suivantes.

  • Créez un objet PdfDocument.
  • Chargez un exemple de fichier PDF à l'aide de la méthode PdfDocument.LoadFromFile().
  • Convertissez le fichier PDF en SVG à l'aide de la méthode PdfDocument.SaveToFile(String, FileFormat).
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace ConvertPDFtoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument document = new PdfDocument();
    
                //Load a sample PDF file
                document.LoadFromFile("input.pdf");
    
                //Convert PDF to SVG
                document.SaveToFile("PDFtoSVG.svg", FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

Convertir les pages PDF sélectionnées en SVG en C#/VB.NET

La méthode PdfDocument.SaveToFile(String, Int32, Int32, FileFormat) vous permet de convertir les pages spécifiées d'un fichier PDF en fichiers SVG. Les étapes détaillées sont les suivantes.

  • Créez un objet PdfDocument.
  • Chargez un exemple de fichier PDF à l'aide de la méthode PdfDocument.LoadFromFile().
  • Convertissez les pages PDF sélectionnées en SVG à l'aide de la méthode PdfDocument.SaveToFile(String, Int32, Int32, FileFormat).
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace PDFPagetoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument doc = new PdfDocument();
    
                //Load a sample PDF file
                doc.LoadFromFile("input.pdf");
    
                //Convert selected PDF pages to SVG
                doc.SaveToFile("PDFPagetoSVG.svg", 1, 2, FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

Convertir un fichier PDF en SVG avec une largeur et une hauteur personnalisées en C#/VB.NET

La méthode dfConvertOptions.SetPdfToSvgOptions()P proposée par Spire.PDF for .NET vous permet de spécifier la largeur et la hauteur du fichier SVG de sortie. Les étapes détaillées sont les suivantes.

  • Créez un objet PdfDocument.
  • Chargez un exemple de fichier PDF à l'aide de la méthode PdfDocument.LoadFromFile().
  • Définissez les options de conversion PDF à l’aide de la propriété PdfDocument.ConvertOptions.
  • Spécifiez la largeur et la hauteur du fichier SVG de sortie à l'aide de la méthode PdfConvertOptions.SetPdfToSvgOptions().
  • Convertissez le fichier PDF en SVG à l'aide de la méthode PdfDocument.SaveToFile().
  • C#
  • VB.NET
using Spire.Pdf;
    
    namespace PDFtoSVG
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Create a PdfDocument object
                PdfDocument document = new PdfDocument();
    
                //Load a sample PDF file
                document.LoadFromFile("input.pdf");
    
                //Specify the width and height of output SVG file
                document.ConvertOptions.SetPdfToSvgOptions(800f, 1200f);
    
                //Convert PDF to SVG
                document.SaveToFile("result.svg", FileFormat.SVG);
            }
        }
    }

C#/VB.NET: Convert PDF to SVG

Demander une licence temporaire

Si vous souhaitez supprimer le message d'évaluation des documents générés ou vous débarrasser des limitations fonctionnelles, veuillez demander une licence d'essai de 30 jours pour toi.

Voir également

NuGet을 통해 설치됨

PM> Install-Package Spire.PDF

관련된 링크들

"빠른 웹 보기"라고도 알려진 PDF 선형화는 PDF 파일을 최적화하는 방법입니다. 일반적으로 사용자는 웹 브라우저가 서버에서 모든 페이지를 다운로드한 경우에만 온라인으로 여러 페이지로 구성된 PDF 파일을 볼 수 있습니다. 그러나 PDF 파일이 선형화되면 전체 다운로드가 완료되지 않은 경우에도 브라우저가 첫 번째 페이지를 매우 빠르게 표시할 수 있습니다. 이 문서에서는 다음 방법을 보여줍니다 Spire.PDF for .NET사용하여 C# 및 VB.NET에서 선형화된 PDF로 변환합니다.

Spire.PDF for .NET 설치

먼저 Spire.PDF for.NET 패키지에 포함된 DLL 파일을 .NET 프로젝트의 참조로 추가해야 합니다. DLL 파일은 이 링크 에서 다운로드하거나 NuGet을 통해 설치할 수 있습니다.

  • Package Manager
PM> Install-Package Spire.PDF

PDF를 선형화로 변환

다음은 PDF 파일을 선형화된 파일로 변환하는 단계입니다.

  • PdfToLinearizedPdfConverter 클래스를 사용하여 PDF 파일을 로드합니다.
  • PdfToLinearizedPdfConverter.ToLinearizedPdf() 메서드를 사용하여 파일을 선형화되도록 변환합니다.
  • C#
  • VB.NET
using Spire.Pdf.Conversion;
    
    namespace ConvertPdfToLinearized
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Load a PDF file
                PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("Sample.pdf");
                //Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf");
            }
        }
    }
Imports Spire.Pdf.Conversion
    
    Namespace ConvertPdfToLinearized
        Friend Class Program
            Private Shared Sub Main(ByVal args As String())
                'Load a PDF file
                Dim converter As PdfToLinearizedPdfConverter = New PdfToLinearizedPdfConverter("Sample.pdf")
                'Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf")
            End Sub
        End Class
    End Namespace

Adobe Acrobat에서 결과 파일을 열고 문서 속성을 살펴보면 "빠른 웹 보기" 값이 예인 것을 볼 수 있습니다. 이는 파일이 선형화되었음을 의미합니다.

C#/VB.NET: Convert PDF to Linearized

임시 라이센스 신청

생성된 문서에서 평가 메시지를 제거하고 싶거나, 기능 제한을 없애고 싶다면 30일 평가판 라이센스 요청 자신을 위해.

또한보십시오

Friday, 20 October 2023 02:46

C#/VB.NET: Convert PDF to Linearized

Installed via NuGet

PM> Install-Package Spire.PDF

Related Links

PDF linearization, also known as "Fast Web View", is a way of optimizing PDF files. Ordinarily, users can view a multipage PDF file online only when their web browsers have downloaded all pages from the server. However, if the PDF file is linearized, the browsers can display the first page very quickly even if the full download has not been completed. This article will demonstrate how to convert a PDF to linearized in C# and VB.NET using Spire.PDF for .NET.

Install Spire.PDF for .NET

To begin with, you need to add the DLL files included in the Spire.PDF for.NET package as references in your .NET project. The DLLs files can be either downloaded from this link or installed via NuGet.

  • Package Manager
PM> Install-Package Spire.PDF

Convert PDF to Linearized

The following are the steps to convert a PDF file to linearized:

  • Load a PDF file using PdfToLinearizedPdfConverter class.
  • Convert the file to linearized using PdfToLinearizedPdfConverter.ToLinearizedPdf() method.
  • C#
  • VB.NET
using Spire.Pdf.Conversion;
    
    namespace ConvertPdfToLinearized
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Load a PDF file
                PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("Sample.pdf");
                //Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf");
            }
        }
    }
Imports Spire.Pdf.Conversion
    
    Namespace ConvertPdfToLinearized
        Friend Class Program
            Private Shared Sub Main(ByVal args As String())
                'Load a PDF file
                Dim converter As PdfToLinearizedPdfConverter = New PdfToLinearizedPdfConverter("Sample.pdf")
                'Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf")
            End Sub
        End Class
    End Namespace

Open the result file in Adobe Acrobat and take a look at the document properties, you can see the value of “Fast Web View” is Yes which means the file is linearized.

C#/VB.NET: Convert PDF to Linearized

Apply for a Temporary License

If you'd like to remove the evaluation message from the generated documents, or to get rid of the function limitations, please request a 30-day trial license for yourself.

See Also

Friday, 20 October 2023 02:45

C#/VB.NET: Converter PDF em Linearizado

Instalado via NuGet

PM> Install-Package Spire.PDF

Links Relacionados

A linearização de PDF, também conhecida como "Fast Web View", é uma forma de otimizar arquivos PDF. Normalmente, os usuários podem visualizar um arquivo PDF de várias páginas on-line somente quando seus navegadores tiverem baixado todas as páginas do servidor. Porém, se o arquivo PDF for linearizado, os navegadores poderão exibir a primeira página muito rapidamente, mesmo que o download completo não tenha sido concluído. Este artigo demonstrará como converta um PDF em linearizado em C# e VB.NET usando Spire.PDF for .NET.

Instale o Spire.PDF for .NET

Para começar, você precisa adicionar os arquivos DLL incluídos no pacote Spire.PDF for.NET como referências em seu projeto .NET. Os arquivos DLLs podem ser baixados deste link ou instalados via NuGet.

  • Package Manager
PM> Install-Package Spire.PDF

Converter PDF em Linearizado

A seguir estão as etapas para converter um arquivo PDF em linearizado:

  • Carregue um arquivo PDF usando a classe PdfToLinearizedPdfConverter.
  • Converta o arquivo em linearizado usando o método PdfToLinearizedPdfConverter.ToLinearizedPdf().
  • C#
  • VB.NET
using Spire.Pdf.Conversion;
    
    namespace ConvertPdfToLinearized
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Load a PDF file
                PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("Sample.pdf");
                //Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf");
            }
        }
    }
Imports Spire.Pdf.Conversion
    
    Namespace ConvertPdfToLinearized
        Friend Class Program
            Private Shared Sub Main(ByVal args As String())
                'Load a PDF file
                Dim converter As PdfToLinearizedPdfConverter = New PdfToLinearizedPdfConverter("Sample.pdf")
                'Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf")
            End Sub
        End Class
    End Namespace

Abra o arquivo de resultado no Adobe Acrobat e dê uma olhada nas propriedades do documento, você pode ver que o valor de “Fast Web View” é Sim, o que significa que o arquivo está linearizado.

C#/VB.NET: Convert PDF to Linearized

Solicite uma licença temporária

Se desejar remover a mensagem de avaliação dos documentos gerados ou se livrar das limitações de função, por favor solicite uma licença de teste de 30 dias para você mesmo.

Veja também

Установлено через NuGet

PM> Install-Package Spire.PDF

Ссылки по теме

Линеаризация PDF, также известная как «Быстрый веб-просмотр», — это способ оптимизации PDF-файлов. Обычно пользователи могут просматривать многостраничный PDF-файл онлайн только тогда, когда их веб-браузеры загрузили все страницы с сервера. Однако если PDF-файл линеаризован, браузеры могут очень быстро отобразить первую страницу, даже если полная загрузка не была завершена. В этой статье будет показано, как конвертировать PDF в линеаризованный в C# и VB.NET используя Spire.PDF for .NET.

Установите Spire.PDF for .NET

Для начала вам необходимо добавить файлы DLL, включенные в пакет Spire.PDF for.NET, в качестве ссылок в ваш проект .NET. Файлы DLL можно загрузить по этой ссылке или установить через NuGet.

  • Package Manager
PM> Install-Package Spire.PDF

Конвертировать PDF в линеаризованный

Ниже приведены шаги для преобразования PDF-файла в линеаризованный:

  • Загрузите PDF-файл, используя класс PdfToLinearizedPdfConverter.
  • Преобразуйте файл в линеаризованный вид с помощью метода PdfToLinearizedPdfConverter.ToLinearizedPdf().
  • C#
  • VB.NET
using Spire.Pdf.Conversion;
    
    namespace ConvertPdfToLinearized
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Load a PDF file
                PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("Sample.pdf");
                //Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf");
            }
        }
    }
Imports Spire.Pdf.Conversion
    
    Namespace ConvertPdfToLinearized
        Friend Class Program
            Private Shared Sub Main(ByVal args As String())
                'Load a PDF file
                Dim converter As PdfToLinearizedPdfConverter = New PdfToLinearizedPdfConverter("Sample.pdf")
                'Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf")
            End Sub
        End Class
    End Namespace

Откройте файл результатов в Adobe Acrobat и посмотрите на свойства документа. Вы увидите, что значение «Быстрый веб-просмотр» равно «Да», что означает, что файл линеаризован.

C#/VB.NET: Convert PDF to Linearized

Подать заявку на временную лицензию

Если вы хотите удалить сообщение об оценке из сгенерированных документов или избавиться от ограничений функции, пожалуйста запросите 30-дневную пробную лицензию для себя.

Смотрите также

Über NuGet installiert

PM> Install-Package Spire.PDF

verwandte Links

Die PDF-Linearisierung, auch „Fast Web View“ genannt, ist eine Möglichkeit zur Optimierung von PDF-Dateien. Normalerweise können Benutzer eine mehrseitige PDF-Datei nur dann online anzeigen, wenn ihr Webbrowser alle Seiten vom Server heruntergeladen hat. Wenn die PDF-Datei jedoch linearisiert ist, können die Browser die erste Seite sehr schnell anzeigen, auch wenn der vollständige Download noch nicht abgeschlossen ist. Dieser Artikel zeigt, wie das geht Konvertieren Sie ein PDF in ein linearisiertes PDF in C# und VB.NET Verwendung von Spire.PDF for .NET.

Installieren Sie Spire.PDF for .NET

Zunächst müssen Sie die im Spire.PDF for.NET-Paket enthaltenen DLL-Dateien als Referenzen in Ihrem .NET-Projekt hinzufügen. Die DLLs-Dateien können entweder über diesen Link heruntergeladen oder über NuGet installiert werden.

  • Package Manager
PM> Install-Package Spire.PDF

Konvertieren Sie PDF in linearisiertes PDF

Im Folgenden sind die Schritte zum Konvertieren einer PDF-Datei in eine linearisierte Datei aufgeführt:

  • Laden Sie eine PDF-Datei mit der PdfToLinearizedPdfConverter-Klasse.
  • Konvertieren Sie die Datei mit der Methode PdfToLinearizedPdfConverter.ToLinearizedPdf() in eine linearisierte Datei.
  • C#
  • VB.NET
using Spire.Pdf.Conversion;
    
    namespace ConvertPdfToLinearized
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Load a PDF file
                PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("Sample.pdf");
                //Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf");
            }
        }
    }
Imports Spire.Pdf.Conversion
    
    Namespace ConvertPdfToLinearized
        Friend Class Program
            Private Shared Sub Main(ByVal args As String())
                'Load a PDF file
                Dim converter As PdfToLinearizedPdfConverter = New PdfToLinearizedPdfConverter("Sample.pdf")
                'Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf")
            End Sub
        End Class
    End Namespace

Öffnen Sie die Ergebnisdatei in Adobe Acrobat und werfen Sie einen Blick auf die Dokumenteigenschaften. Sie können sehen, dass der Wert für „Fast Web View“ „Ja“ ist, was bedeutet, dass die Datei linearisiert ist.

C#/VB.NET: Convert PDF to Linearized

Beantragen Sie eine temporäre Lizenz

Wenn Sie die Bewertungsmeldung aus den generierten Dokumenten entfernen oder die Funktionseinschränkungen beseitigen möchten, wenden Sie sich bitte an uns Fordern Sie eine 30-Tage-Testlizenz an für sich selbst.

Siehe auch

Friday, 20 October 2023 02:42

C#/VB.NET: Convertir PDF a Linealizado

Instalado a través de NuGet

PM> Install-Package Spire.PDF

enlaces relacionados

La linealización de PDF, también conocida como "Vista web rápida", es una forma de optimizar archivos PDF. Normalmente, los usuarios pueden ver un archivo PDF de varias páginas en línea sólo cuando sus navegadores web han descargado todas las páginas del servidor. Sin embargo, si el archivo PDF está linealizado, los navegadores pueden mostrar la primera página muy rápidamente incluso si no se ha completado la descarga completa. Este artículo demostrará cómo convierta un PDF a linealizado en C# y VB.NET usando Spire.PDF for .NET.

Instalar Spire.PDF for .NET

Para empezar, debe agregar los archivos DLL incluidos en el paquete Spire.PDF for .NET como referencias en su proyecto .NET. Los archivos DLL se pueden descargar desde este enlace o instalar a través de NuGet.

  • Package Manager
PM> Install-Package Spire.PDF

Convertir PDF a Linealizado

Los siguientes son los pasos para convertir un archivo PDF a linealizado:

  • Cargue un archivo PDF usando la clase PdfToLinearizedPdfConverter.
  • Convierta el archivo a linealizado utilizando el método PdfToLinearizedPdfConverter.ToLinearizedPdf().
  • C#
  • VB.NET
using Spire.Pdf.Conversion;
    
    namespace ConvertPdfToLinearized
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Load a PDF file
                PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("Sample.pdf");
                //Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf");
            }
        }
    }
Imports Spire.Pdf.Conversion
    
    Namespace ConvertPdfToLinearized
        Friend Class Program
            Private Shared Sub Main(ByVal args As String())
                'Load a PDF file
                Dim converter As PdfToLinearizedPdfConverter = New PdfToLinearizedPdfConverter("Sample.pdf")
                'Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf")
            End Sub
        End Class
    End Namespace

Abra el archivo de resultados en Adobe Acrobat y observe las propiedades del documento; puede ver que el valor de “Fast Web View” es Sí, lo que significa que el archivo está linealizado.

C#/VB.NET: Convert PDF to Linearized

Solicite una licencia temporal

Si desea eliminar el mensaje de evaluación de los documentos generados o deshacerse de las limitaciones de la función, por favor solicitar una licencia de prueba de 30 días para ti.

Ver también

Friday, 20 October 2023 02:40

C#/VB.NET: converti PDF in linearizzato

Installato tramite NuGet

PM> Install-Package Spire.PDF

Link correlati

La linearizzazione PDF, nota anche come "Fast Web View", è un modo per ottimizzare i file PDF. Di solito, gli utenti possono visualizzare un file PDF multipagina online solo quando i loro browser web hanno scaricato tutte le pagine dal server. Tuttavia, se il file PDF è linearizzato, i browser possono visualizzare la prima pagina molto rapidamente anche se il download completo non è stato completato. Questo articolo mostrerà come farlo convertire un PDF in linearizzato in C# e VB.NET utilizzando Spire.PDF for .NET.

Installa Spire.PDF for .NET

Per cominciare, devi aggiungere i file DLL inclusi nel pacchetto Spire.PDF for .NET come riferimenti nel tuo progetto .NET. I file DLL possono essere scaricati da questo link o installato tramite NuGet.

  • Package Manager
PM> Install-Package Spire.PDF

Converti PDF in linearizzato

Di seguito sono riportati i passaggi per convertire un file PDF in linearizzato:

  • Carica un file PDF utilizzando la classe PdfToLinearizedPdfConverter.
  • Convertire il file in linearizzato utilizzando il metodo PdfToLinearizedPdfConverter.ToLinearizedPdf().
  • C#
  • VB.NET
using Spire.Pdf.Conversion;
    
    namespace ConvertPdfToLinearized
    {
        class Program
        {
            static void Main(string[] args)
            {
                //Load a PDF file
                PdfToLinearizedPdfConverter converter = new PdfToLinearizedPdfConverter("Sample.pdf");
                //Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf");
            }
        }
    }
Imports Spire.Pdf.Conversion
    
    Namespace ConvertPdfToLinearized
        Friend Class Program
            Private Shared Sub Main(ByVal args As String())
                'Load a PDF file
                Dim converter As PdfToLinearizedPdfConverter = New PdfToLinearizedPdfConverter("Sample.pdf")
                'Convert the file to a linearized PDF
                converter.ToLinearizedPdf("Linearized.pdf")
            End Sub
        End Class
    End Namespace

Apri il file dei risultati in Adobe Acrobat e dai un'occhiata alle proprietà del documento, puoi vedere che il valore di "Fast Web View" è Sì, il che significa che il file è linearizzato.

C#/VB.NET: Convert PDF to Linearized

Richiedi una licenza temporanea

Se desideri rimuovere il messaggio di valutazione dai documenti generati o eliminare le limitazioni della funzione, per favore richiedere una licenza di prova di 30 giorni per te.

Guarda anche