Quantcast
Channel: Aspose.Pdf Product Family
Viewing all 3131 articles
Browse latest View live

maven repository

$
0
0
Hi,

Do you have a maven repository?

Thanks,
Bojan

Type mismatch between indexed read and indexed write methods

$
0
0
Hey there,

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
Any idea why this happens? I even updated to the latest JDK.

Thank you in advance.

Digitally sign PDF file

$
0
0

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

$
0
0
Evaluating Aspose.pdf for .net. Converting document fails when trying to open.

// 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

$
0
0
Hi,
Is it normal that Java Aspose library can not get attachements from a PDF document generated with Acrobat 11? (pdfDocument.getEmbeddedFiles().size() returns me 0 ). Or do I need an license to do this ? I'haven't got any evaluation License. How can I get one and how should I install It?
Thanks in advance

Richard

P.S. I was sucessfull executing "getAllAttachementsFromPDF.java" example code using your data but not when I replace the input.pdf file by an input.pdf file generated with acrobat XI.

PDFFileStamp performance issue for adding Header,Footer and PageNumbers

$
0
0
Hi,

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

$
0
0

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

$
0
0
Hi Team,

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

$
0
0

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

$
0
0
I'm trying to convert a PDF to TIFF using the example listed here:
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

$
0
0
When I create a pdf document from html string, multibyte characters are missing in saved document,  see code below:

                    var pdf = new Aspose.Pdf.Generator.Pdf();
                    pdf.SetUnicode();
                    string html1 = " <div >TEST_中文文档资料_TEXT</div>";
                    pdf.ParseToPdf(html1);
                    //AsposePdfCreator.ConvertToWordDoc(pdf, html1, pdftype);
                    pdf.SetUnicode();
                    pdf.Save(@"c:\test2.pdf");

SetUnicode() does not help
I am using Aspose.pdf version 9.1
Am I doing somethisg wrong?
Thank you,
Alexei

New conversion engine for inline html

$
0
0
Hi,

we are currently using inline html for some tables in our generated documents.

e.g.
var table = new Text("<html>...");
table.IsHtmlTagSupported  = true;

The problem with this approach is that the table overflows the right side of the document instead of being wrapped.
Like stated in the thread below it works with the new conversion engine.

http://www.aspose.com/community/forums/516084/table-and-text-syles-problem/showthread.aspx

Is there a way to use the new conversion engine together with the inline html feature?

Best regards

Bold characters not supported

$
0
0
Hi, I'm using Aspose.Pdf 9.1. I have the following code below but when I export to PDF the bold characters do not appear. Is there a way to support multiple fonts names or another solution to getting this to work with still using "Arial Unicode MS".

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

$
0
0
I am running into similar problem as:
http://www.aspose.com/community/forums/thread/247866/radio-button-hidden-item.aspx

I tried running a slightly modified version of:
http://www.aspose.com/docs/display/pdfnet/Add+Form+Field+in+an+Existing+PDF+file+(Facades)
to generate the pdf.  I opened up the pdf using the Adobe acrobat and went to edit the fields in the pdf.
Trying to do so made the acrobat crash, and when it didn't crash, it didn't show the field list that I normally see. It also generated an extra field.

How do I go about not generating this extra field?

I have also included a sample C# file I wrote using Window Forms Application.
I am using .net 3.5 and Aspose.Pdf 9.2.1.0

Please add <pre> tag support ASAP

$
0
0
Since using IsHtmlTagSupported strips text formatting,  it is imperative that the <pre> tag is added to supported HTML tags so that basic text formatting can be preserved.
The lack of this tag prevents basic and common usage of this tool,  and prevents us from using it for the only reason we purchased this library in the first place.

Aspose.Pdf.Generator.Text has the property IsHtmlTagSupported

$
0
0

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

$
0
0
We already edit PDF programmatically using Aspose.PDF.  But we have customers that want to be able to annotate PDFs in a GUI.  Is there anything in the Aspose family that would facilitate this, and if not, is there a recommended product/approach to use?  

Thanks!

Bryan

Pre-sales question: How many PDFs can you stitch together?

$
0
0
Could you let me know what limits exist on stitching together multiple PDF files, i.e. how many files can you stitch together? 

We are thinking of merging our monthly invoice run (thousands of PDF files) into a single PDF if this would be possible using your .Net PDF library.

If it is possible, could you let me know your recommended approach to achieving this?

Many thanks,
Rob

Issue in setting the page size and height

$
0
0
Hi,

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

$
0
0
Hii,

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
Viewing all 3131 articles
Browse latest View live