maven repository
Type mismatch between indexed read and indexed write methods
when using your Aspose pdf example - TableInHeaderFooter code, the following error occurs on this line:
-------------------------------------------------
Section sec1 = pdf1.getSections().add()-------------------------------------------------
2014-08-25 11:28:02,920 [http-bio-8080-exec-8] ERROR errors.GrailsExceptionResolver - IntrospectionException occurred when processing request: [GET] /rest.services-is.eis/students/1
type mismatch between indexed read and indexed write methods: _Item. Stacktrace follows:
Message: type mismatch between indexed read and indexed write methods: _Item
Line | Method
->> 387 | findIndexedPropertyType in java.beans.IndexedPropertyDescriptor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 215 | setIndexedReadMethod in ''
| 471 | <init> . . . . . . . . . . in ''
| 647 | processPropertyDescriptors in java.beans.Introspector
| 543 | getTargetPropertyInfo . . in ''
| 418 | getBeanInfo in ''
| 163 | getBeanInfo . . . . . . . in ''
| 19 | createStudentProfilePdf in com.scmt.util.Reporting$$EOnwNrZE
| 79 | $tt__show . . . . . . . . in rest.services.is.eis.StudentController
| 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
--------------------------------------------------------------------------------------------------------------------
As you can see, I am using REST Services under Grails.
I am building an example application which will decide if we use Aspose in our future projects. Thus I still am using the trial version of Aspose.
My setup:
- IntelliJ IDEA 13.1.4
- Java 1.7.0_67
- Grails 2.3.9
Thank you in advance.
Digitally sign PDF file
Is it possible to :
* Change the font of the signature
* modify the order of the rubrics (E=, CN=, O=, OU=, ) into the signature
* go to the line for the first line of the signature
Thank you
Convert PCL to PDF failes
// instantiate LoadOption object using PCL load option
Aspose.Pdf.LoadOptions loadopt = new Aspose.Pdf.PclLoadOptions();
// create Document object
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(@"c:\Aspose\Convert\test2.pcl", loadopt);
extract attachement in a PDF document generated with acrobat XI
PDFFileStamp performance issue for adding Header,Footer and PageNumbers
I am using PDFFileStamp for adding header, footer and page numbers. My pdf file is 5000 pages big and is of 500 MB size. I am adding different page footer on every page and by doing so the final document generation takes 5 minutes. If I remove the code for footer it will get generated in 50 seconds. here is a small code snippet how I am using the PDFFileStamp.
PdfFileStamp pfe = new PdfFileStamp(pdfDocument);
pfe.setPageNumberRotation(1);
pfe.addHeader(new FormattedText("Header"), 10);
for(int i=1; i<pdfDocument.getPages().size; i++)
{
pfe.addFooter(new FormattedText("Footer for page " + i), 10)
}
pfe.addPageNumber(new FormattedText(" Page #"));
If in the above code I comment the footer code the file gets generated with no performance issue and it takes 50 seconds to generate. Can you please let me know if I am doing something wrong.
Thanks
Rajeev Mathur
Splitting Large PDF file into individual file causing outofmemory exception
Hi There,
I have a usecase where we get a large pdf file (of size 700to 800mb) containg 400k pages and the task is split the file into individual pages. I am getting into out of memory exception after splitting files around 100k pages. Please suggest any alternatives or workaround. My code is below:
My code to split pdf file is below:
public int SplitPdfFileByPageDelimiter(string outputFilesDir, string pageDelimiterString, int extractStringLength) { if (string.IsNullOrEmpty(pageDelimiterString)) { throw new ArgumentNullException("pageDelimiterString", "[SplitPdfFileByPageDelimiter()]: delimiterString for spliting pdf file is null or empty."); } // open document var pdfDocument = new Aspose.Pdf.Document(this.InputFileStream); if (string.IsNullOrEmpty(outputFilesDir)) { throw new Exception("OutputFileDirectory missing"); } if (!Directory.Exists(outputFilesDir)) { Directory.CreateDirectory(outputFilesDir); } var outputFileName = Path.GetFileName(this.InputFilePath); if (string.IsNullOrEmpty(outputFileName)) { outputFileName = string.Format("{0}.pdf", Path.GetDirectoryName(outputFilesDir)); } var outputFileFormat = string.Concat(Path.GetFileNameWithoutExtension(outputFileName), "_{0}", Path.GetExtension(outputFileName)); var docCount = 1; var resetCount = 0; var document = new Aspose.Pdf.Document(); // loop through all the pages foreach (Page pdfPage in pdfDocument.Pages) { resetCount++; document.Pages.Add(pdfPage); var textFragmentAbsorber = new TextFragmentAbsorber(); pdfPage.Accept(textFragmentAbsorber); var textFragmentCollection = textFragmentAbsorber.TextFragments; foreach (TextFragment textFragment in textFragmentCollection) { var pdfFileUniqueIdIndex = textFragment.Text.IndexOf(pageDelimiterString); if (pdfFileUniqueIdIndex <= -1) { continue; } pdfFileUniqueIdIndex += pageDelimiterString.Length; var pdfFileUniqueId = extractStringLength > 0 ? textFragment.Text.Mid(pdfFileUniqueIdIndex, extractStringLength).Trim() : docCount.ToString(); if (string.IsNullOrWhiteSpace(pdfFileUniqueId)) { pdfFileUniqueId = string.Format("NoPdfFileUniqueId.{0}", Guid.NewGuid().ToString()); } var pdfFileFullName = Path.Combine(outputFilesDir, string.Format(outputFileFormat, pdfFileUniqueId)); if (!File.Exists(pdfFileFullName)) { document.Save(pdfFileFullName); } document.FreeMemory(); document.Dispose(); docCount += 1; document = new Aspose.Pdf.Document(); break; } pdfPage.FreeMemory(); // After every 200 pages let the process to sleep for couple of secs. if (resetCount >= 200) { pdfDocument.FreeMemory(); Console.WriteLine(string.Format("[SplitPdfFileByPageDelimiter()]: Going to sleep at document count : [{0}]", docCount)); Thread.Sleep(2000); resetCount = 0; } }
Add Page Number Stamp in a PDF File Out of memory Error
I am using vb.net code which you have provided on below link and trying to give page number to PDF which has 15000 pages.
But this gives me out of memory error.
please help me to overcome this.
I am using latest aspose.pdf dll.
http://www.aspose.com/docs/display/pdfnet/Add+Page+Number+Stamp+in+a+PDF+File
how can I save the file in incremental mode like after each 1000 page I want to save.
How to dynamically insert/update rows of a table in a pdf template file
I would like to have a pdf template file with a table
with 2 columns, let us say one column is question number and other one is
Comments. However, the number of rows could be dynamic depend on the data
I get from our database.
For ex: sometimes the data could be something like the
following and sometimes we could have 30 or 40 rows in the table.
Question
Number Comments
2 Q2 comments
5 Comments for Q5.
The question is how do we create this pdf template file
(consider our team don’t have much experience in pdf) and then dynamically
update this table?
Convert PDF to TIFF - File size
http://www.aspose.com/docs/display/pdfjava/Convert+PDF+pages+to+TIFF+Image
The resulting single page TIFF Image is 1.14 mb. A bit large for our database which is used to TIFF images in the 30 - 90 kb range.
I'd like to peruse your API to see if there are any settings to affect the quality of conversion, but your API link holds at "Loading".
Is the API available anywhere else? Or is there a way to reduce the file size of the resulting TIFF?
HTML with multibyte characters don't convert to PDF properly
New conversion engine for inline html
Bold characters not supported
I need to use Arial Uniode MS to support for Chinese characters and still support bold/italics.
var htmlString = "<html><body><div><span style=\"font-size:18px;\">NONBOLD <strong>BOLD</strong></span></div></body></html>";
var text = new Text(htmlString);
text.IsHtmlTagSupported = true;
text.IsHtml5Supported = true;
text.TextInfo.FontName = "Arial Unicode MS";
text.IfHtmlTagSupportedOverwriteHtmlFontNames = true;
document.Sections[0].Paragraphs.Add(text);
document.SetUnicode();
Facades Creates a Hidden Radio Button
Please add <pre> tag support ASAP
Aspose.Pdf.Generator.Text has the property IsHtmlTagSupported
To whom it may concern,
I am using the new namespace "Aspose.Pdf" and I want to write the following html
<font color=red> don't forget to add Centrian to your carrier list </red>
into the PDF and i using the following code:
string detials = " <font color=red> don't forget to add Centrian to your carrier list </red>";
TextFragmenTextFragmen dataInfo = new TextFragment(detials);
Cell cellDetail = new Aspose.Pdf.Cell();
cellDetail.Paragraphs.Add(dataInfo);
It does not recognize the HML tags
I know that namespace has "Aspose.Pdf.Generator" namespace has the object Aspose.Pdf.Generator.Text which has the property IsHtmlTagSupported to convert the text into Html.
Does the "Aspose.Pdf" namespace has something similar to understand the HMTL tags?
thank you
Alvaro
Graphical Interface for editing PDFs
Bryan
Pre-sales question: How many PDFs can you stitch together?
Issue in setting the page size and height
I am trying to set the page size and height of a pdf document but aspose always create the pdf document with same size. Here is the code.
com.aspose.pdf.Document pdfDocument = new Document();
pdfDocument.getPages().add();
pdfDocument.getPageInfo().setHeight(50);
pdfDocument.getPageInfo().setWidth(50);
pdfDocument.save("c:/documents/testdata/size.pdf");
Can you please let me know if there is any way through which I can set the page size in aspose.
Thanks
Rajeev Mathur
Evaluation Only. Created with Aspose.Words. Copyright 2003-2014 Aspose Pty Ltd JAVA issue
I have Aspose.total license for java. I have used aspose-pdf-9.0.0 without any issue. Now, I migrated to Aspose-pdf-9.3.1, It says "Evaluation Only. Created with Aspose.Words. Copyright 2003-2014 Aspose Pty Ltd" but my license is till 2015.
in the document. Please help me as soon as possible. It's Urgent.
Also, I have attached word document that is converted from pdf document.
Regards
Ganesh S Vidharthi
Memeber of Tecnical Staff
Zoho Corporation