Skip to content

Commit 8fb61d7

Browse files
committed
Merge branch 'master' into develop
2 parents d72a730 + dac4cb0 commit 8fb61d7

File tree

6 files changed

+170
-8
lines changed

6 files changed

+170
-8
lines changed

javascript-cpp/overview/installation/_index.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@ sitemap:
1313

1414
# Installation
1515

16-
**Aspose.PDF for JavaScript via C++** is a easy and secure toolkit used to work with PDF directly in the web browser.
16+
**Aspose.PDF for JavaScript via C++** is a easy and secure toolkit used to work with PDF directly in the web browser.
1717

1818
To install and use Aspose.PDF for JavaScript via C++ from a -*ZIP archive, follow the following instructions:
19+
1920
- extract the files from the ZIP archive
2021
- encrypt your *.lic file using 'encrypt_lic.html'
2122
- edit 'settings.json' and setup your settings.
2223

2324
Follow the link for [Direct Download](https://releases.aspose.com/pdf/javascriptcpp/)
2425

26+
To install and use Aspose.PDF for JavaScript via C++ from NPMJS, follow the following instructions:
27+
28+
- `npm i aspose-pdf-js`
29+
30+
To install and use Aspose.PDF for JavaScript via C++ from GITHUB, follow the following instructions:
31+
32+
- `npm install git+https://github.com/aspose-pdf/Aspose.PDF-for-JavaScript-via-CPP`
33+
2534
If there is no web server installed you can run the examples locally, using Python. So, if you are using Linux or Mac OS X, everything is ready on your system. If you are a Windows user, you can download the installation file from the Python home page:
2635

2736
- go to [python.org](https://www.python.org/)

net/advanced-operations/annotations/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ You are able to do the following:
9393
- [Overview of Annotations](/pdf/net/overview-of-annotations/) - learn which types of annotations are defined by the PDF specification, and what Aspose.PDF supports.
9494
- [Add, Delete and Get Annotation](/pdf/net/add-delete-and-get-annotation/) - this section explains how to work with all types of allowed annotations.
9595
- [Import and export annotation with XFDF format](/pdf/net/import-export-xfdf/) - Aspose.PDF library provided methods to import and export annotations data to XFDF files.
96+
- [Import FDF format annotations to PDF](/pdf/net/import-fdf/) - Aspose.PDF library provided method to import FDF format annotations to PDF files.
9697

9798
<script type="application/ld+json">
9899
{
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Import FDF format annotations to PDF via C#
3+
linktitle: Import FDF format annotations to PDF
4+
type: docs
5+
weight: 50
6+
url: /net/import-fdf/
7+
description: Use existing Form.ImportFdf() or add PdfAnnotationEditor.ImportAnnotationsFromFdf() methods for import FDF format annotations to PDF with Aspose.PDF for .NET.
8+
lastmod: "2024-09-17"
9+
sitemap:
10+
changefreq: "monthly"
11+
priority: 0.7
12+
---
13+
14+
{{% alert color="primary" %}}
15+
16+
FDF (Forms Data Format) is a file format that stores and transmits form data and annotations in PDF documents. It is a lightweight PDF version that contains only the form field values or comments, without the full content of the original PDF file. FDF files are often used when submitting form data to a server, or when exchanging annotations without needing to send the entire PDF file. They can be imported back into a PDF to fill in form fields or apply comments.
17+
18+
{{% /alert %}}
19+
20+
[PDFAnnotationEditor](https://reference.aspose.com/pdf/net/aspose.pdf.facades/pdfannotationeditor/) class contains method to work with import of annotations from FDF file. [PdfAnnotationEditor.ImportAnnotationsFromFdf](https://reference.aspose.com/pdf/net/aspose.pdf.facades/pdfannotationeditor/importannotationsfromfdf/) method provides the functionality to import annotations from a FDF document to PDF file.
21+
22+
Also, [Class Form](https://reference.aspose.com/pdf/net/aspose.pdf.facades/form/) include the [Form.ImportFdf](https://reference.aspose.com/pdf/net/aspose.pdf.facades/form/importfdf/) method - imports the content of the fields from the FDF file and put them into the new PDF.
23+
24+
The following code snippet shows you how to Import FDF format annotations to PDF with Form.ImportFdf() method:
25+
26+
```csharp
27+
28+
var fdfPath = Params.InputPath + "test.fdf";
29+
var templatePath = Params.InputPath + "Empty.pdf";
30+
var outputPath = Params.OutputPath + "test_form.pdf";
31+
32+
using (var form = new Aspose.Pdf.Facades.Form(templatePath))
33+
{
34+
using (var fdfInputStream = new FileStream(fdfPath, FileMode.Open))
35+
{
36+
form.ImportFdf(fdfInputStream);
37+
}
38+
39+
form.Save(outputPath);
40+
}
41+
```
42+
43+
The next code snippet shows how to import FDF format annotations to PDF with PdfAnnotationEditor.ImportAnnotationsFromFdf() method:
44+
45+
```csharp
46+
47+
var fdfPath = Params.InputPath + "test.fdf";
48+
var templatePath = Params.InputPath + "Empty.pdf";
49+
var outputPath = Params.OutputPath + "test_annEditor.pdf";
50+
51+
var editor = new PdfAnnotationEditor();
52+
editor.BindPdf(new Document(templatePath));
53+
editor.ImportAnnotationsFromFdf(fdfPath);
54+
editor.Save(outputPath);
55+
```

net/get-started/licensing/_index.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ sitemap:
1515

1616
We want our customers to test our components thoroughly before buying so the evaluation version allows you to use it as you would normally.
1717

18-
- **PDF created with an evaluation watermark.** The evaluation version of Aspose.PDF for .NET provides full product functionality, but all the pages in the generated PDF documents are watermarked with "Evaluation Only. Created with Aspose.PDF. Copyright 2002-2020 Aspose Pty Ltd" at the top.
18+
- **PDF created with an evaluation watermark.** The evaluation version of Aspose.PDF for .NET provides full product functionality, but all pages in the generated PDF documents are watermarked with the text "Evaluation Only. Created with Aspose.PDF. Copyright 2002-2024 Aspose Pty Ltd." at the top.
1919

20-
- **The limit of the number of collection items that can be processed.**
21-
In the evaluation version from any collection, you can process only four elements (for example, only 4 pages, 4 form fields, etc.).
20+
- **Limit the number of pages that can be processed.**
21+
In the evaluation version, you can only process the first four pages of a document.
2222

23-
>If you want to test Aspose.HTML for .NET without the evaluation version limitations, you can also request a 30-day Temporary License. Please refer to [How to get a Temporary License?](https://purchase.aspose.com/temporary-license)
23+
>If you want to test Aspose.PDF for .NET without the evaluation version limitations, you can also request a 30-day Temporary License. Please refer to [How to get a Temporary License?](https://purchase.aspose.com/temporary-license)
2424
2525
## Classic license
2626

@@ -142,6 +142,4 @@ namespace Aspose.Pdf.Examples
142142
}
143143
}
144144
```
145-
### Applying a License Bought Before 2005/01/22
146145

147-
Aspose.PDF for .NET no longer supports the old-style licenses. If you have a license from before 22 January 2005 and you have updated to a more recent version of Aspose.PDF, please contact our Sales team to get a new license file.

net/get-started/supported-file-formats/_index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sitemap:
1111
priority: 0.7
1212
---
1313

14-
The following table indicates the file formats that Aspose.PDF C# can load and Save.
14+
The following table indicates the file formats that Aspose.PDF for .NET can load and save.
1515

1616
|**Format**|**Description**|**Load**|**Save**|**Remarks**|
1717
| :- | :- | :- | :- | :- |
@@ -33,9 +33,12 @@ The following table indicates the file formats that Aspose.PDF C# can load and S
3333
|[PPTX](https://docs.fileformat.com/presentation/pptx/)|Saves the document in the Microsoft PowerPoint Presentations format| |{{< emoticons/tick >}}| |
3434
|[DOC](https://docs.fileformat.com/word-processing/doc/)|Saves the document in the Microsoft Word format| |{{< emoticons/tick >}}| |
3535
|[DOCX](https://docs.fileformat.com/word-processing/docx/)|Saves the document in the Microsoft Word format| |{{< emoticons/tick >}}| |
36+
|[DJVU](https://docs.fileformat.com/image/djvu/)|DjVu is a graphics file format intended for scanned documents and books developed by AT&T Labs|{{< emoticons/tick >}}| | |
37+
|[CDR](https://docs.fileformat.com/image/cdr/)|A CDR file is a vector drawing image file that is natively created with CorelDRAW|{{< emoticons/tick >}}| | |
3638
|[MobiXML](https://docs.fileformat.com/ebook/mobi/)|Saves the document in eBook MobiXML Standard format| |{{< emoticons/tick >}}| |
3739
|[JPEG](https://docs.fileformat.com/image/jpeg/)|Saves the document in JPEG Format|{{< emoticons/tick >}}|{{< emoticons/tick >}}| |
3840
|[EMF](https://docs.fileformat.com/image/emf/)|Enhanced metafile format (EMF)|{{< emoticons/tick >}}|{{< emoticons/tick >}}| |
41+
|[PCL](https://docs.fileformat.com/page-description-language/pcl/)|Printer Command Language which is a Page Description Language introduced by Hewlett Packard (HP)|{{< emoticons/tick >}}| | |
3942
|[PNG](https://docs.fileformat.com/image/png/)|Saves the document in PNG Format|{{< emoticons/tick >}}|{{< emoticons/tick >}}| |
4043
|[BMP](https://docs.fileformat.com/image/bmp/)|Saves the document in BMP Format|{{< emoticons/tick >}}|{{< emoticons/tick >}}| |
4144
|[GIF](https://docs.fileformat.com/image/gif/)|Graphic Interchange Format| |{{< emoticons/tick >}}| |

net/whatsnew/_index.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,102 @@ sitemap:
1111
lastmod: "2024-09-06"
1212
---
1313

14+
## What's new in Aspose.PDF 24.9
15+
16+
Since version 24.9, it has been possible to generate a crash report when the library throws an exception. A crash report includes information about the type of exception, application title, Aspose.Pdf version, OS version, error message, and stack trace.
17+
18+
The following code snippet demonstrates a common scenario for generating a crash report:
19+
20+
```cs
21+
22+
try
23+
{
24+
//some code that generates exception
25+
throw new Exception("message", new Exception("inner message"));
26+
}
27+
catch (Exception ex)
28+
{
29+
PdfException.GenerateCrashReport(new CrashReportOptions(ex));
30+
}
31+
```
32+
33+
Extracting an PDF document layer elements and saving into new PDF stream are available from now. In PDF documents, layers (also known as Optional Content Groups or OCGs) are used for various purposes, primarily to manage and control the visibility of content within the document. This functionality is particularly useful in design, engineering, and publishing. For example: blueprint aspects, complex diagram components, language versions of the same content.
34+
35+
```cs
36+
37+
var documentPath = "";
38+
var resultPdfPath ="";
39+
40+
var inputDocument = new Document(documentPath);
41+
var inputPage = inputDocument.Pages[1];
42+
43+
var layers = inputPage.Layers;
44+
45+
foreach (var layer in layers)
46+
{
47+
var outputPdf = string.Format("{0}_{1}.pdf", resultPdfPath, layer.Id);
48+
49+
using (var stream = File.Create(outputPdf))
50+
{
51+
layer.Save(stream);
52+
}
53+
}
54+
```
55+
56+
The `GraphicalPdfComparer` class is added for the graphic comparison of PDF documents and pages. Graphic comparison deals with document page images. It returns the result as an `ImagesDifference` object or as a PDF document that contains images merged from the original and the differences. Graphic comparison is most useful for documents that have minor differences in text or graphic content.
57+
58+
The following code snippet demonstrates the graphic comparison of two PDF documents and saves an image with the differences into the resultant PDF document:
59+
60+
```cs
61+
62+
var firstDocumentPath = "";
63+
var secondDocumentPath = "";
64+
var resultPdfPath ="";
65+
66+
using (Document doc1 = new Document(firstDocumentPath), doc2 = new Document(secondDocumentPath))
67+
{
68+
GraphicalPdfComparer comparer = new GraphicalPdfComparer()
69+
{
70+
Threshold = 3.0,
71+
Color = Color.Red,
72+
Resolution = new Resolution(300)
73+
};
74+
comparer.CompareDocumentsToPdf(doc1, doc2, resultPdfPath);
75+
}
76+
```
77+
78+
API implemented for integrating FileFormat.HEIC and Aspose.PDF. The HEIC (High-Efficiency Image Coding) is a modern image file format introduced by Apple with iOS 11 in 2017 as the default image format for iPhones and iPads.
79+
80+
To convert HEIC images to PDF user should add the reference to `FileFormat.HEIC` NuGet package and use the following code snippet:
81+
82+
```cs
83+
84+
var heicImagePath = "iphone_photo.heic";
85+
var resultPdfPath ="iphone_photo.pdf";
86+
87+
using (var fs = new FileStream(heicImagePath, FileMode.Open))
88+
{
89+
HeicImage image = HeicImage.Load(fs);
90+
var pixels = image.GetByteArray(PixelFormat.Rgb24);
91+
var width = (int)image.Width;
92+
var height = (int)image.Height;
93+
94+
var document = new Document();
95+
Aspose.Pdf.Page page = document.Pages.Add();
96+
Aspose.Pdf.Image asposeImage = new Aspose.Pdf.Image();
97+
asposeImage.BitmapInfo = new BitmapInfo(pixels, width, height, BitmapInfo.PixelFormat.Rgb24);
98+
page.PageInfo.Height = height;
99+
page.PageInfo.Width = width;
100+
page.PageInfo.Margin.Bottom = 0;
101+
page.PageInfo.Margin.Top = 0;
102+
page.PageInfo.Margin.Right = 0;
103+
page.PageInfo.Margin.Left = 0;
104+
105+
page.Paragraphs.Add(asposeImage);
106+
document.Save(resultPdfPath);
107+
}
108+
```
109+
14110
## What's new in Aspose.PDF 24.8
15111

16112
Converting PDF Documents into PDF/A-4 format

0 commit comments

Comments
 (0)