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

FreeTextAnnotation does not appear until it is resized

$
0
0
I am attempting to add a a FreeTextAnnotation to an existing PDF that will only show on the PDF when printing, following the example at the bottom of the page here: http://www.aspose.com/docs/display/pdfnet/Add+Annotation+in+an+Existing+PDF+File

When I printed the PDF, the annotation did not show up, so I removed the AnnotationFlags.NoView flag. After that, the annotation did not show up when opening the file in Acrobat, but if I clicked around where the annotation should have been, a box would be highlighted. If I resized the box, the annotation would then appear.

To make sure this wasn't an issue with my code, I checked the annotation examples in the Aspose Examples Dashboard to see if I experienced the same issue. I ran the example Aspose.Pdf/Programmers Guide/Working with Annotations/Set Formatting of FreeTextAnnotation. The exact same issue occurred. See attachments for pictures of the issue on the file generated by the Aspose example.

I am running Windows Server 2012 and the latest version of Adobe Acrobat XI. Others in my office tried the same file and experienced the same issue. All of them are using Acrobat XI and Server 2012/ Windows 8.1/ Server 2008 R2.

What we need is for a) the FreeTextAnnotation to show up without resizing the box if the NoView flag is not set, and b) the FreeTextAnnotation to show up on printed paper if the Print flag is set.

Apsose pdf introduces space when the pdf document has chinese characters

$
0
0
Hi, 

I am trying to extract text from a pdf document. The pdf document has some chinese characters. So when I use the text absorber, I am seeing that it introduces unnecessary spaces between the characters.

private String extractText(byte[] inputContent) throws IOException{

ByteArrayInputStream stream = new ByteArrayInputStream(inputContent);

Document pdfDocument = new Document(stream);

// Create TextAbsorber object to extract text

TextAbsorber textAbsorber = new TextAbsorber();

// Accept the absorber for all the pages

pdfDocument.getPages().accept(textAbsorber);

// Get the extracted text

String extractedText = textAbsorber.getText();

returnextractedText;

}


I am also attaching the java code and the pdf file.

Applying License issue with Java Web Application - Aspose 10.1.0 version

$
0
0
Hi,

I am using aspose pdf for java 10.1.0 version to generate pdf. I am using the following code to set the license in one of my methods.

License license = new License();
license.setLicense("Aspose.Total.Product.Family.lic");

When I deploy the license in my dev environment it throws License not find exception. When I replace the 10.1.0 jar version with 9.3.0 and redeploy the code works fine.

The jar and license file are in teh same folder under web-in\lib folder.

Can you please guide if something has changed with the 10.1.0 version.

Regards,

Does the java version support redactions?

$
0
0
I could not find the feature if so, search didn't yield anything, only seems to be for the .net platform, but hoping I am incorrect.

If so, a pointer to an example showing usage would be great.  If not, when is it planned?

Thanks
Kenneth Russo
USCA5

Aspose.Pdf Image vs Aspose.Pdf.Generator Image

$
0
0
How can I get an image to be rendered in Aspose.Pdf the same as it was in Aspose.Pdf.Generator?

For example, I loaded an image into a table cell using Aspose.Pdf.Generator, and it displays differently when doing the same in Aspose.Pdf.

I am dealing with png images.

Missing text/Strange text placement when converting pdf document to html

$
0
0
See attached pdf and resulting html file from a conversion from pdf to html on Aspose.pdf version 10.2.0. There appears to be a lot of misplaced/missing text?


How to split pdf into multi pdfs from particular key word

$
0
0
Hello Friends,


We are using Aspose products in our CRM application. we are using Aspose.Pdf for one particular requirement. now we have requirement of reading whole pdf and split that pdf into different pdfs. say for example, there would be one key word in a pdf which will start from #(e.g #Test Word). Now I need to find all the words which starts from the # tag in that pdf and split rest of the thing in different pdfs. So if there are 5 occurrences of # tag then we should have 5 different pdfs containing relevant data after # key word.
Can anyone help me in this? any immediate help with detail step by step code would be highly appreciated.


Thanks & Regards
Ashish Rajguru

PDF file size gets 17 times of the original PDF file size

$
0
0
Hi I am using aspose-pdf-9.7.0-jdk16.jar version jar for converting PDF to PDF/A. 

For one of the document when we converted PDF to PDF/A found the new generated PDF file size gets 17 times of the original. Is there a way this can be minimized and kept close to the original?


Thanks


Set background image for Section composed of multiple pages

$
0
0
The documentation here (http://www.aspose.com/docs/display/pdfnet/Set+Page+Background+Image) says the following:

"

Aspose.Pdf for .NET feature's list also include to set the background image for a [Section]. In Aspose.Pdf for .NET a [Section] can be composed of multiple pages. So, if we set the background image for a [Section] then that background image will be displayed on all pages (that belong to the same [Section]).

"

How does one do this? Specifically, I would like to take an existing PDF, put all of the pages in a Section, and then set the background image for that section.

So much MemoryError.............................Aspose.Total for Java

$
0
0
    Document pdfDocument = new Document(new FileInputStream(
                System.getProperty("user.dir") + "\\1.pdf"));
        HtmlSaveOptions saveOptions = new HtmlSaveOptions();
        saveOptions.setFixedLayout(true);
saveOptions.setSplitIntoPages(true);
        pdfDocument.save(System.getProperty("user.dir") + "\\1.html",
                saveOptions);



Pattern dimensions: 78.1865x78.1865, coeff: 1
Exception in thread "main" java.lang.OutOfMemoryError: Argument path cannot be empty
    at com.aspose.pdf.internal.p245.z44.m1(Unknown Source)
    at com.aspose.pdf.internal.p245.z44.<init>(Unknown Source)
    at com.aspose.pdf.internal.p514.z6.m1(Unknown Source)
    at com.aspose.pdf.internal.p452.z1.m1(Unknown Source)
    at com.aspose.pdf.internal.p445.z40.m2(Unknown Source)
    at com.aspose.pdf.internal.p445.z40.m4(Unknown Source)
    at com.aspose.pdf.internal.p445.z13.m2(Unknown Source)
    at com.aspose.pdf.internal.p445.z13.m2(Unknown Source)
    at com.aspose.pdf.internal.p447.z11.m1(Unknown Source)
    at com.aspose.pdf.internal.p447.z11.m1(Unknown Source)
    at com.aspose.pdf.internal.p445.z40.m2(Unknown Source)
    at com.aspose.pdf.internal.p445.z40.m4(Unknown Source)
    at com.aspose.pdf.internal.p445.z13.m2(Unknown Source)
    at com.aspose.pdf.internal.p445.z13.m2(Unknown Source)
    at com.aspose.pdf.internal.p519.z3.m1(Unknown Source)
    at com.aspose.pdf.internal.p519.z3.m1(Unknown Source)
    at com.aspose.pdf.internal.p519.z3.m2(Unknown Source)
    at com.aspose.pdf.internal.p444.z5.m2(Unknown Source)
    at com.aspose.pdf.internal.p444.z1.m1(Unknown Source)
    at com.aspose.pdf.internal.p445.z40.m2(Unknown Source)
    at com.aspose.pdf.internal.p445.z40.m4(Unknown Source)
    at com.aspose.pdf.internal.p445.z13.m2(Unknown Source)
    at com.aspose.pdf.internal.p445.z13.m2(Unknown Source)
    at com.aspose.pdf.ApsUsingConverter.m1(Unknown Source)
    at com.aspose.pdf.z77.m1(Unknown Source)
    at com.aspose.pdf.ADocument.save(Unknown Source)
    at com.aspose.pdf.Document.save(Unknown Source)
    at personal.lixp.demo.aspose.pdf.MainTest.pdfToHTML(MainTest.java:86)
    at personal.lixp.demo.aspose.pdf.MainTest.main(MainTest.java:19)

Issue with vertical line spacing

$
0
0
I am using the .Net version Apose.PDF to render a PDF from some dynamically generated html for a current project. After I ran into some issues with the creation of columns using divs I tried using tables as an alternative. 

The problem I am having is that although the spacing is correct on the html the PDF has what appears to be random spacing when there is a significant amount of text within the cell of a table.

I have included an example html  file with the corresponding css for style and I am using the new method of  PDF generation as suggested in many of the recent posts and I am using the latest version as of 3/12/15

Is there a known issue with vertical spacing - if so is there a fix scheduled? 
Is there anything else I can do to resolve this issue?

Thank you

Here is the code for the conversion (the HTML is passed as a string to the html variable and the absolute base file path is passed to the externalFilePath variable):

// set the html options
HtmlLoadOptions htmlOptions = null;
if (externalFilePath == null)
htmlOptions = new HtmlLoadOptions();
else
        htmlOptions = new HtmlLoadOptions(externalFilePath);

htmlOptions.PageInfo.Margin.Top = 20;
htmlOptions.PageInfo.Margin.Right = 20;
htmlOptions.PageInfo.Margin.Bottom = 20;
htmlOptions.PageInfo.Margin.Left = 20;
htmlOptions.PageInfo.IsLandscape = false;
htmlOptions.PageInfo.Width = Aspose.Pdf.PageSize.A4.Width;
htmlOptions.PageInfo.Height = Aspose.Pdf.PageSize.A4.Height;

// Pass the HTML into a new Document object
Document doc = new Document(new                          MemoryStream(System.Text.Encoding.UTF8.GetBytes(html)), htmlOptions);                    

 // Save PDF stream
 doc.Save(outputPdfStream);

PDF Export with both Portrait and Landscape SSRS 2012

$
0
0
I have a report called DualOrientation containing 2 sub reports. The 1st sub report (Portrait) has portrait orientation and the 2nd (Landscape) had landscape orientation using the IsLandscape parameter. When I use the "PDF via Apose.Pdf" extension to export the DualOrientation report all pages in the PDF are portrait. I need the PDF to have the Portrait sub report as portrait and the Landscape sub report as Landscape.

When I export the Portrait report the PDF is portrait.

When I export the Landscape report the PDF is landscape.

What do I need to do to get the Dual Orientation working ?

I have attached all RDL files and examples of PDFs

Unable to parse the attached pdf to valid Excel

$
0
0
Hi Aspose support team,

i was trying to parse the attached PDF to Valid Excel using aspose pdf in linux OS.iam getting the below exception.
"Tagged PDF Expected."

the process i followed is i have converted the PDF to XML and from XML i am doing Valid Excel conversion using aspose Cells

please find my code below for converting PDF to XML using aspose PDF.


pdfDocument = new Document(directoryName +file.getName());

ExcelSaveOptions excelsave = new ExcelSaveOptions();

pdfDocument.save(directoryName + absFileName +".xml",excelsave)

here only iam getting the exception.


please Help me for parsing the attached pdf.

thanks
Surya

Flatten PDF layers

$
0
0
Need to flatten PDF layers as part of redacting files to assure that the redacted info is no longer available. I have not found the functionality in the documentation. Is it possible?

PDF to TIFF conversion is too slow on larger documents

$
0
0
I am converting a 45 page pdf to tiff and taking a long time.

This is the code I am using
Dim pdfDocument As New Aspose.Pdf.Document(file)
        'Create Resolution object
        Dim resolution As New Resolution(300)
        Dim imagefilename As String
        'Create TiffSettings object
        Dim tiffSettings As New TiffSettings()
        tiffSettings.Compression = CompressionType.CCITT4
        tiffSettings.Depth = ColorDepth.Default
        tiffSettings.SkipBlankPages = False
        tiffSettings.Depth = ColorDepth.Format8bpp   'Format8bpp
        'Create TIFF device
        Dim tiffDevice As New TiffDevice(resolution, tiffSettings)

        Try
            imagefilename = Program.imagepath + System.IO.Path.GetFileNameWithoutExtension(file) + Guid.NewGuid().ToString + ".TIFF"
            tiffDevice.Process(pdfDocument, imagefilename)
            Program.NoOfPages = pdfDocument.Pages.Count
        Catch ex As System.Exception
            MsgBox(ex.Message)
        End Try


I also tried this and the image it produced was too small to read
        'create PdfConverter object and bind input PDF file
        'Dim pdfConverter As New PdfConverter()
        'pdfConverter.Resolution = New Aspose.Pdf.Devices.Resolution(300)
        'pdfConverter.BindPdf(file)
        'pdfConverter.DoConvert()
        ''create TiffSettings object and set ColorDepth
        'Dim tiffSettings As New TiffSettings()
        ''tiffSettings.Depth = ColorDepth.Format1bpp
        'tiffSettings.Compression = CompressionType.None
        'tiffSettings.Depth = ColorDepth.Default
        'tiffSettings.SkipBlankPages = False
        'tiffSettings.Depth = ColorDepth.Format8bpp

        'convert to TIFF image
        'pdfConverter.SaveAsTIFF(imagefilename, 300, 300, tiffSettings)
        'pdfConverter.Close()


Thank you for your help.


Justify only seems to work with one sub report

$
0
0
Hi I have a report that has several different sub-reports on it.

When I have a single instance of a sub report that will justify the text it seems to work fine - If I place another copy of this report into the main report neither this sub-report or the previously justifying sub report now justify!


I really need to get this working - It's been nearly a year and a half trying to get this working 

Regards
Andy

Unable to read pdf file contents.

$
0
0
I am trying to read the text from a pdf file. I am using the evaluation version of asponse to test. I get the following output regardless of the input file. 

Evaluation Only. Created with Aspose.Pdf. Copyright 2002-2015 Aspose Pty Ltd.

Is there a limitation on what the api can do when using the evaluation version. My code looks like this.

  Document pdfDocument = new Document("C:\\docs\\input.pdf");
TextAbsorber textAbsorber = new TextAbsorber();
pdfDocument.getPages().accept(textAbsorber);
String extractedText = textAbsorber.getText();
System.out.println(extractedText) ;

Another test I did was to add text to existing pdf. That did not work either.

Any help will be appreciated.

Reading TOC from a pdf in Java

$
0
0
I am trying to read the TOC from a pdf and create bookmarks based on it. I was not able to find any example on how to read the TOC, the examples mentioned in this forum use classes which are no longer there.

Any suggestions on how to read TOC from an input pdf file.

Thanks

Aspose.Pdf vs Aspose.Generator.Pdf generation times

$
0
0
Hi,

Is it normal for the same Pdf written in the Aspose.Pdf namespace to take longer to generate than when written in the Aspose.Pdf.Generator namespace?

How i can specify DefaultFontName for Document class

$
0
0
Hi,

In Aspose.Pdf.Generator.Pdf class we were using following properties. 

1. DefaultFontName
2. IsCoreFontUsed
3. IsTruetypeFontMapCached
4.TruetypeFontMapPath

How we can achieve similar functionality in Aspose.Pdf.Document class object.

Regards,
Sandeep
Viewing all 3131 articles
Browse latest View live