Incrementally Saving PDF
HTML to PDF, data truncated after redering
Can not get temporary license
When i add a image to a PDF, Doc.save() can't catch the exception and don't run and stop there
PDF/A validation fails
We use your product for pdf/a files generation.
Some files have validation issues. For example if we convert html to pdf/a we may have such issues:
Validating file "test.html.pdf" for conformance level pdfa-1b
The value of the key N is 4 but must be 3.
A device-specific color space (DeviceRGB) without an appropriate output intent is used.
The document does not conform to the requested standard.
The document doesn't conform to the PDF reference (missing required entries, wrong value types, etc.).
The document contains device-specific color spaces.
PDF-Tools PDF validator is used for validating (http://www.pdf-tools.com/pdf/validate-pdfa-online.aspx).
We use rather simple code for conversion:
var license = new Aspose.Pdf.License();
license.SetLicense("Aspose.Total.lic");
Aspose.Pdf.Document pdf = new Document(inputFilePath, new HtmlLoadOptions());
pdf.Convert(new MemoryStream(), Aspose.Pdf.PdfFormat.PDF_A_1B, Aspose.Pdf.ConvertErrorAction.Delete);
pdf.Save(outputFilePath);
PS. XLS, TXT, EMF, WMF files also converted to pdf/a with validation issues.
Com.Aspose.Pdf.Image setBlackWhite also adds an Evaluation mark
When adding the following to an image, an evaluation mark is also added to the image while using a valid license file:
com.aspose.pdf.Image image = new com.aspose.pdf.Image();
image.setFile(tempFrameFile);
image.setBlackWhite(true);
I've noticed one post on the forum by an Aspose Staff member mentioning this in January, but no fix has been given in the last updates.
See the mentioning forum post here:
http://www.aspose.com/community/forums/permalink/576952/600526/showthread.aspx#600526
Please let us know when this will be fixed, as saving a black and white image to a color pdf makes the pdf too large. We need the black and white compression in the pdf.
Kind regards,
Cedric
Polygon Annotation with a cloud style
Getting Out of Memory Exception
Optimize Fonts when concatenating pdfs
In our application we have to combine several (eg 100) PDF files.
To optimize the resulting file we use this code:
pdfFileEditor.Concatenate(pdfStreams.ToArray(), packPdf);
packPdf.Seek(0, SeekOrigin.Begin);
var pdfDocument = new Document(packPdf);
foreach (Page page in pdfDocument.Pages)
{
var idx = 1;
foreach (XImage image in page.Resources.Images)
{
using (var imageStream = new MemoryStream())
{
image.Save(imageStream, ImageFormat.Jpeg);
imageStream.Seek(0, SeekOrigin.Begin);
page.Resources.Images.Replace(idx, imageStream);
}
idx = idx + 1;
}
}
// optimize the file size
pdfDocument.Optimize();
pdfDocument.OptimizeSize = true;
pdfDocument.OptimizeResources(new Document.OptimizationOptions
{
RemoveUnusedStreams = true,
RemoveUnusedObjects = true,
LinkDuplcateStreams = true
});
// save updated File
pdfDocument.Save(newPdfFileName);
After this optimization the size of the created pdf file is still too large. The cause of this is due to the fonts used in the source files.
The font definitions (/font-Dictionary and dependent objects) were taken for each original document into the target file.
If the /FileFonts2 streams are identical, only one stream was saved. If the streams are not identical, no union set of all required characters was formed.
The difference in file size, with an average size of the streams of 18.5 KB, is about 3 MB.
Is there a way to summarize the fonts efficiently?
Is such an implementation planed?
Best regards
Kind Regards,
Oliver
convert Chinese Font using jpegdevice
My company Pou Chen have purchased Aspose.Pdf Product Family version 10.5 and we got some problem with Chinese font conversion and I am asking the question for them. The code is as below. We convert a pdf to image using jpegdevice, but the Chinese encoding turns out to be random characters in the image. Is there a way to specify the encoding like for Aspose Txt so the jpegdevice can convert the Chinese font properly?
using (FileStream imageStream = new FileStream(@"C:\Debug\" + filename + ".jpg", FileMode.Create))
{
// Create Resolution object
Resolution resolution = new Resolution(200);
// Create JPEG device with specified attributes (Width, Height, Resolution, Quality)
// where Quality [0-100], 100 is Maximum
JpegDevice jpegDevice = new JpegDevice(resolution, 100);
jpegDevice.RenderingOptions.BarcodeOptimization = true;
//jpegDevice.RenderingOptions.SystemFontsNativeRendering = false;
//Aspose.Pdf.LoadOptions option = new Aspose.Pdf.LoadOptions();
// Convert a particular page and save the image to stream
jpegDevice.Process(pdfDocument.Pages[pageCount], imageStream);
// Close stream
imageStream.Close();
}
Aspose Pdf Dll 10.5.0 and Concurrent Reuqest
Pdf printing: Font quality not as expected
Need to fill a LiveCycle form from a databse
Getting an Out of Memory error when converting PDF to PNG
SQL CLR Out of Memory converting certain PDFs to images (Aspose.pdf 10.5, SQL 2012)
Thread Safety on Html To PDF conversion
Evaluation Version
http://www.aspose.com/docs/display/pdfnet/Concatenate+PDF+Files (and let's just say that working at the page level to merge documents is kind of a sloppy implementation). Anyway, please tell me how to proceed.
OSGI Bunldes - aspose-pdf-9.3.1
Chamal
PCL to PDF conversion
Hi
For our project we are planning to convert PCL file to PDF through Aspose licenced version. But before purchasing the licence we want to check functionality of Aspose PCL to PDF converter. So we have downloaded the evalution version aspose-pdf-10.3.0-java and tried to convert the PCL file to PDF. But we are getting below exception.
Please let us know what is the exact cause for this. The PCL file contains table,images.
The Code we are using for Conevrting PCL to PDF is:
Pdf pdf = new Pdf();
// bind the source PCL file with Pdf object
pdf.bindPCL("sample.pcl");
// save the resultant PDF document
pdf.save("sample.pdf");
Exception We are getting:
Exception in thread "Thread-8" java.lang.NullPointerException
at
java.lang.String.contains(String.java:1881)
at
com.aspose.pdf.internal.p530.z10.m2(Unknown Source)
at
com.aspose.pdf.internal.p530.z10.m1(Unknown Source)
at
com.aspose.pdf.internal.p516.z10.m1(Unknown Source)
at
com.aspose.pcl.composer.PDFComposer.m1(Unknown Source)
at
com.aspose.pcl.composer.PDFComposer.run(Unknown Source)
at
java.lang.Thread.run(Thread.java:736)
Exception in thread "Thread-8" java.lang.NullPointerException
at
java.lang.String.contains(String.java:1881)
at
com.aspose.pdf.internal.p530.z10.m2(Unknown Source)
at
com.aspose.pdf.internal.p530.z10.m1(Unknown Source)
at
com.aspose.pdf.internal.p516.z10.m1(Unknown Source)
at
com.aspose.pcl.composer.PDFComposer.m1(Unknown Source)
at
com.aspose.pcl.composer.PDFComposer.run(Unknown Source)
at
java.lang.Thread.run(Thread.java:736)
Thanks
Agniv Dutta.
Apsose PDF - OSGI Issue
Chamal