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

Printing PDF pages from different printer trays

$
0
0
Is it possible to print pages from a PDF document from different printer trays? Let say I want to print first and last page from tray 2 and all the inbetween pages on tray 1. Is that possible with Aspose.PDF?

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.

I want to extract text from PDF but failed. Does your product extract it.

$
0
0

Hi,

 

I copied the dll to bin folder and then the code works. But it cannot

retrieve the text as desired. I want to extract text from PDF but failed. Does your product

extract it. If yes then let us know. 

 

            Document pdfDocument = new Document(@"C:\AA\Maval_Puravani2\Test\A2050015.pdf");

            //create TextAbsorber object to extract text

            TextAbsorber textAbsorber = new TextAbsorber();

            //accept the absorber for all the pages

            pdfDocument.Pages.Accept(textAbsorber);

            //get the extracted text

            string extractedText = textAbsorber.Text;

            // create a writer and open the file

            TextWriter tw = new StreamWriter(@"C:\AA\Maval_Puravani2\Test\extracted-text.txt");

            // write a line of text to the file

            tw.WriteLine(extractedText);

            // close the stream

            tw.Close();

 

This gives output as following

 

Evaluation Only. Created with Aspose.Pdf. 

 

So I cannot test if your component extracts correct text from the PDF.

 

thx,

M.Irfan.

Signing PDF using the X509Certificate2 instead PFX file

$
0
0
We need signing PDF file with timestamp. But PdfFileSignature class support only signing with PFX file. For real using is it not possible (security reasons), because users has private key in crypto service provider or on card and they do not want/can export private key to PFX file.

For signing we need two different ways:

1) use instance of X509Certificate2 similar as used in class PdfDigitalSignatureDetails in Aspose.Words for signing PDF during export to PDF.

2) for signing in WEB browser use "detached" signature. Signing have three phases:
- prepare PDF and compute hash for signing on WEB server (in Aspose)
- signing computed hash on browser (in our Java applet)
- input PKCS7 formated signature with certficate chain to prepared PDF on server (in Aspose)

Do you plan first or first and second our request implement to Aspose.Pdf? If yes, than when?

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.

Create PDF using JSON input

$
0
0

hi,

Can Aspose.PDF Java create a PDF from a JSON input object? Please let us, this will help us a lot in acheiving major requirement.

Thanks,

Rajesh

Adding Files as attachments to PDF

$
0
0

hi,

    How can we add attachments to a PDF using Aspose API? If possible, please share a sample Java progam.

Thanking You

Rajesh

Saving issue

$
0
0
I have a pdf form that was created in Acrobat that I would like to use as a "template" in my custom Intranet application. I want the user to be able to open the template, click the checkboxes and click save to have the system store it in a specific file location. Here is how I'm currently trying to accomplish this. When a user clicks a button in my application, I grab the "template" form and save it to a folder on our network using a specific naming convention based on the user logged in. From there, I display the file located on the network using Response.Redirect. The user can click the checkboxes, etc. but the only save option that shows up when doing it this way is "save as". This requires the user to navigate to the file location. I would like for the user just to click save and have it save over itself. Even if I have the user navigate to the file location (which is not preferred), I come across "file is already open" issues. Does anyone have a java script example I could use to create a custom button that would save the existing file over the old file? Any other ideas??

How do I confirm the file format?

$
0
0
I am seeing InvalidFileFormat exceptions and my execution stops. How may I test a file format before handing it to your conversion tool? Is there a trick to catching run-time eceptions?

Page Orientation Settings for com.aspose.pdf.Document

$
0
0
Hi,

Is there anyway to setup the page orientation for PDF document. In my requirement, i am not creating any new PDF document. I am loading the existing PDF document into com.aspose.pdf.Document object to apply pagesetup

Regards

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.

Problem with Paragraph breaks

$
0
0
Hi,

For all the conversions we are carrying out, a Paragraph break is present at the end of each line. This should not be the case since Paragraph break appears only after the end of a Paragraph.

I am attaching the converted file to this thread. Can you please fix this issue ASAP. We are about to make our release but this is blocking us.


Regards,

Dheeraj

PDF/A does not identify itself as compliant with any standard?

$
0
0
Hi,
We are converting WORD document to a PDF/A-3b document.
You can see blue line on the top which states that PDF file is actually complies with PDF/A.
But below we have another message which states that PDF does not identify itself as compliant with any standard? 
How to fix this issue?

Aspose.PDF

$
0
0
I am trying to use evaluation version of Aspose.PDF for .NET. I downloaded the temporary license and placed it in the same folder as Aspose.PDF.dll. When I am running the application I am getting "Offline key cannot be decrypted, redownload pdf file" error Please let me know or direct me to resources on how to solve this issue. Regards Rajendra
This message was posted using Banckle Live Chat 2 Forum

Supporting large PDF documents

$
0
0
Hi,

I was wondering if you guys support large PDF document (1 MB). The reason I am asking is because I am trying to convert a large PDF, about 1MB, document to HTML and display that HTML on a webpage nothing shows up, just a white screen. However everything works fine with smaller PDF documents.

Conversion from PDF to single html

$
0
0
Hi,
Did anything changed in latest version ? Am I able to convert pdf file in html file (with embedded images) - a single hmtl file ?
Thank you,

PDF table rows overlap each other if table goes over a page

$
0
0
Hello

I have an issue when a table goes over a page long. The first two rows on the new page seem to render on top of each other (see attached screenshot and Output.pdf).

I don't think I am doing anything to fancy. It seems to be related to setting the PageMarginTop and PageMarginBottom values in the section. If I leave these out it seems to render OK.

Any help appreciated. I just upgraded to the latest version of Aspose.Pdf: 8.9.0.0 (.net 3.5 version).

Cheers,
Dave

Code (XML is attached):
        public bool ExportTestPdf()
        {
            Pdf pdf = new Pdf();
            XmlDocument pdfXml = new XmlDocument();
            pdfXml.LoadXml(Resources.TestPdf);
            pdf.BindXML(pdfXml, null);

            Section sectionMain = pdf.Sections["SectionMain"];
           
            Table questionTable = (Table)sectionMain.Paragraphs["QuestionTable"];

            Row baseHeaderRow = questionTable.Rows["Header"];
            questionTable.Rows.Remove(baseHeaderRow);

            Row baseRow = questionTable.Rows["BaseRow"];
            questionTable.Rows.Remove(baseRow);

            for (int i = 0; i < 80; i++)
            {
                if (i % 20 == 0)
                {
                    Row rowHeader = (Row)baseHeaderRow.CompleteClone();

                    Segment headerText = ((Text)rowHeader.Cells["QuestionHeaderCell"].Paragraphs["QuestionHeaderLabel"]).Segments[0];

                    headerText.Content = "Some Topic: " + i;

                    questionTable.Rows.Add(rowHeader);
                }

                Row row = (Row)baseRow.CompleteClone();

                Segment questionText = ((Text)row.Cells["QuestionCell"].Paragraphs["QuestionLabel"]).Segments[0];

                questionText.Content = "This is a question: " + i;

                questionTable.Rows.Add(row);
            }

            string filename = "Output.pdf";

            pdf.Save(filename, SaveType.OpenInAcrobat, HttpContext.Current.Response);

            return true;
        }

Aspose.Pdf.Drawing.Graph various properties not working

$
0
0
Hi,

I am using following code to add graph to a page. Let me know what is wrong with the code that any property is not reflected in generated pdf except width and height.

 Aspose.Pdf.Page page = pdfDocument.Pages.Add();
            page.PageInfo = new Aspose.Pdf.PageInfo
            {
                IsLandscape =false,
                Width = Aspose.Pdf.PageSize.A4.Width,
                Height = Aspose.Pdf.PageSize.A4.Height,
                           };  

              var root = new Aspose.Pdf.Drawing.Graph(100, 100)
            {
                GraphInfo = new GraphInfo
                {
                    Color = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.RosyBrown),
                    LineWidth = 50.0f,
                    FillColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.RosyBrown),

                },
                Title = "Test by Sandeep",
                HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Left
            };
PdfDocument.Save("Test.pdf");
 
Regards,
Sandeep

Aspose.Pdf converting pdf to tiff

$
0
0
Hello,

   We just bought a license to Aspose.Totals and we are trying to convert a pdf file to tiff.  The problem is some of the pages is not being converted to tiff.  As an example I attached the result tiff file and the source pdf file.  Below is the function we use to do the conversion.

//----------------------------------------------------------------------------------
        private static bool PdfToTiff(string SourceFileName, string DestinationFileName)
        {
            bool ReturnResult = true;
            TiffSettings tiffSettings;
            PdfConverter pdfConverter;
            string WorkDestinationFileName = Path.GetDirectoryName(DestinationFileName) +
                                             @"\con_" + Path.GetFileName(DestinationFileName);
            try
            {
                pdfConverter = new PdfConverter();
                pdfConverter.Resolution = 300;
                pdfConverter.BindPdf(SourceFileName);
                pdfConverter.DoConvert();
                // create TiffSettings object and set ColorDepth
                tiffSettings = new TiffSettings();
                tiffSettings.Depth = ColorDepth.Default;
                tiffSettings.Compression = CompressionType.CCITT4;
                // convert to TIFF image
                pdfConverter.SaveAsTIFF(WorkDestinationFileName, 300, 300, tiffSettings);
                pdfConverter.Close();
            }
            catch (Exception e)
            {
                ReturnResult = false;
                WriteToEventLog(EventLogEntryType.Error,
                                           "{0}\nException occurred during conversion \nFile:{1} \nType:                                                             {2}\nMessage:\n{3}",
                                            @"(PdfToTiff)", SourceFileName, e.GetType().FullName, e.Message);
            }
            finally
            {                
                pdfConverter = null;
                tiffSettings = null;
                if (File.Exists(WorkDestinationFileName)) File.Move(WorkDestinationFileName,                                   DestinationFileName);
            }
    
            return ReturnResult;
        }

this is very urgent so any help would be greatly appreciated.  Thank you !

XSL-FO Footnotes

Viewing all 3131 articles
Browse latest View live