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

trying to display Hindi characters with Aspose PDf java

$
0
0

Hi Team

 

We are evaluating Aspose PDF Java for my organisation.

We are trying to display Hindi characters with Aspose PDf java for the last one week but are not successful.

 

Link: http://www.aspose.com/community/forums/thread/557683.aspx

 

The simple characters are displayed but the issue remains with the complex characters i.e. Ligatures.

 

Even posted the issue with your support system.

 

There is no clear date or timeline as till when this issue will be fixed up.  

 

Can somebody help in this regards

 

--

Thanks & Regards,

 M.Irfan.


When converting HTML to PDF does not display Russian characters.

$
0
0
Good afternoon.Library Version9.4.0.0

C#
                   string html = File.ReadAllText(Template_Path + "template.html", Encoding.UTF8);

                    // instantiate Pdf object
                    Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
                    // specify the Character encoding for for HTML file
                    pdf.HtmlInfo.CharSet = "UTF-8";
                    pdf.TextInfo.FontName = "Arial";
                    pdf.HtmlInfo.CharsetApplyingLevelOfForce = Aspose.Pdf.Generator.HtmlInfo.CharsetApplyingForceLevel.UseWhenImpossibleDetectFromContent;
                    pdf.Title = "Название";

                    // bind the source HTML
                    pdf.BindHTML(html, "");
                   
                    // save the PDF file
                    pdf.Save(OutPDF_Path + @"test.pdf");

HTML

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{KEY} Title\ Заголовок</title>
</head>

<body>
<table width="80%" border="0" cellspacing="10" cellpadding="10">
  <tr>
    <td><img src="http://yabs.yandex.ru/count/E8CLIOSkwDu40002gP0088wtJi4x1L6L0fi6QLg8i_tm2WUcXGcAgPwEWQe2fPOOP92abu6caRpGIMG6auKDGQxxCYzlygMm_GIn0RlaWS2tI8mxjhxJ_V0A5m1WUGe0"> </td>
    <td><a href="http://yandex.ru"><img src="http://yabs.yandex.ru/count/E8CLIOSkwDu40002gP0088wtJi4x1L6L0fi6QLg8i_tm2WUcXGcAgPwEWQe2fPOOP92abu6caRpGIMG6auKDGQxxCYzlygMm_GIn0RlaWS2tI8mxjhxJ_V0A5m1WUGe0"></a></td>
  </tr>
  <tr>
    <td><a href="http://yandex.ru">test \ {тест}</a></td>
    <td>{KEY} - test \ тест</td>
  </tr>
</table>
</body>
</html>

Convert PDF to TIF

$
0
0
When converting a PDF to TIF using Adobe, I get a small sizes clear TIF.  When I use Aspose.pdf tools, I get a huge TIF without compression and if I use compression the file size is small but the image is not clear.  Turns out, if I match the resolution to what Adobe creates, the TIF looks fine and is small, not as small as adobe's but ok (Adobe gets me 50k, Aspose 70k).  Question is, how do I get that resolution from the PDF so I can dynamically get those numbers?


Code:
Aspose.Pdf.Facades.PdfConverter converter = new Aspose.Pdf.Facades.PdfConverter();
converter.Resolution = new Resolution(204, 117);
converter.BindPdf(@"C:\PdfFile.pdf");
converter.DoConvert();
converter.SaveAsTIFF(@"C:\TifFile.tif", CompressionType.CCITT4);
converter.Close();

OR

Document pdfDocument = new Document(@"C:\PdfFile.pdf");
TiffDevice tifDevice = new TiffDevice();
tifDevice.Resolution.X = 204;
tifDevice.Resolution.Y = 117;
tifDevice.Settings.Compression = CompressionType.CCITT4;
tifDevice.Process(pdfDocument, @"C:\TifFile.tif");

Cannot view PDF rendered by Aspose.PDF v9.1.0.0 in secured network

$
0
0
We bought Aspose.Total for .NET and deployed Aspose for PDF and MS Word. For MS Word doc rendered by Aspose.Word, we can view the doc regardless of using public WiFi or office secured network. However, Aspose.PDF can only be viewed via Public WiFI but CANNOT be viewed via secured network. Why? is it because of firewall? Is there special port to open for Aspose.PDF? thks

Serious performance issues

$
0
0
Hi,

I'm trying to use Aspose.Pdf for Java to concatenate some PDFs and then save them as a PDF/A.

Merging files seems to be quite slow:

resultPDFDocument.getPages().add(pdfPart.getPages());

but that's nothing comparing to the PDFA conversion which seems to be endless. I'm waiting 20 minutes so far and the following conversion is still not finished.

resultPDFDocument.convert(tempLogFile.getAbsolutePath(), PdfFormat.PDF_A_1B, ConvertErrorAction.Delete);

Thanks in advance for any help,
Mariusz

Text box not allowing more than 500 characters issue

$
0
0
I am converting html to pdf using the below code. But the input textbox in the generated pdf is not allowing to enter more than 500 characters. Is there any way to get rid of this limit?

 var pdf = new Aspose.Pdf.Generator.Pdf();

 var finalHtml = GetHtml("<input  type='text' class='comment-box' />");

         var txt = new Aspose.Pdf.Generator.Text(finalHtml);

        txt.IsHtmlTagSupported = true;

        pdf.Sections.Add().Paragraphs.Add(txt);

 

       var response = System.Web.HttpContext.Current.Response;

        response.Clear();

 

       var filename = "Goals - " + utbEmployee.SelectedItem.Text + ".pdf";

        pdf.Save(filename, Aspose.Pdf.Generator.SaveType.OpenInAcrobat, response);

PDF to DOC problems

$
0
0
Hi, 

There are lot of formatting issues after we convert from PDF to DOC. I am doing it with following lines of code

saveOptions.Mode = DocSaveOptions.RecognitionMode.Flow;
saveOptions.Format = DocSaveOptions.DocFormat.Doc;          
saveOptions.RelativeHorizontalProximity = 2.5f;          
saveOptions.RecognizeBullets = true;
pdfDocument.Save(dataDir + "saveOptionsOutput.doc", saveOptions);

I donot want to use Recognition.Mode.Textbox option because editing the document is difficult with that.

Is there any way to get a clean DOC file? I am attaching the PDF here. 

Thanks in advance

Issue while viewing colored pdf

$
0
0
I have a concern which is about pdf rendering into swings

I have a colored pdf which contains multiple images so i have to get those images on pdf viewer and that images must be performed some indexation

This message was posted using Email2Forum by Tahir Manzoor.

com.aspose.pdf.kit.PdfContentEditor Memory Leak

$
0
0

We're using com.aspose.pdf.kit.PdfContentEditor.replaceText("someString","someString") and experiencing a memory leak with com.aspose.pdf.kit.lj

The heap dump is below for reference.   Please let me know if anyone has seen this before and if this is a known problem thats fixed in a later version or hot fix.

The class "com.aspose.pdf.kit.lj", loaded by"org.jboss.modules.ModuleClassLoader @ 0xaf1adad0", occupies 994,780,440 (87.92%) bytes. The memory is accumulated in one instance of "java.lang.Object[]"loaded by "<system class loader>"

Thanks

Double segment link annotation issue

$
0
0

Hi Aspose Team,

Using below source code we are creating hyperlink on attached PDF file (TransferDocument.pdf).

We are trying to create hyperlink on “Deeds, Leases; official Records and Contracts on page 219” text in the attached PDF file. The below code is considering from “Deeds, Leases; official Records and Contract” is one segment and remaining text “s on page 219” are another segment. Hence, this case 2 link annotation is created for single line text. Refer the Attached image file for more details.   

Please let me know how to create single link annotation for entire text (“Deeds, Leases; official Records and Contracts on page 219”) using Aspose in this case.

NOTE: it’s very high priority task for me. Please let know your feedback ASAP.

foreach (Aspose.Pdf.Page pdfPage in PDFDocument.Pages)
{
 //create TextAbsorber object to find all the phrases matching the regular expression
 TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("<<SearchRegExPartten>>", new TextSearchOptions(true));

 pdfPage.Accept(textFragmentAbsorber);

 //get the extracted text fragments
 TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;

 if (textFragmentCollection.Count > 0)
 {
  foreach (TextFragment textFragment in textFragmentCollection)
  {
   // Use the text segments when the text fragment has a newline char.
   if (textFragment.Text.Contains(Environment.NewLine))
   {
    foreach (TextSegment s in textFragment.Segments)
    {
     s.TextState.ForegroundColor = Aspose.Pdf.Color.Blue;

     // Create the annotation for each segment.
     LinkAnnotation link = new LinkAnnotation(pdfPage, rect);
     Aspose.Pdf.Point start = new Aspose.Pdf.Point(rect.LLX, rect.LLY);
     Aspose.Pdf.Point end = new Aspose.Pdf.Point(rect.LLX + rect.Width, rect.LLY);
     LineAnnotation line = new LineAnnotation(pdfPage, rect, start, end);

     line.Color = Aspose.Pdf.Color.Blue;
     line.Border = new Border(link) { Width = 1 };
     link.Border = new Border(link) { Width = 0 };
     link.Action = new GoToURIAction(url);
     pdfPage.Annotations.Add(link);
     pdfPage.Annotations.Add(line);
    }
   }
   else // Use the whole text fragment.
   {
    textFragment.TextState.ForegroundColor = Aspose.Pdf.Color.Blue;
    LinkAnnotation link = new LinkAnnotation(pdfPage, rect);
    Aspose.Pdf.Point start = new Aspose.Pdf.Point(rect.LLX, rect.LLY);
    Aspose.Pdf.Point end = new Aspose.Pdf.Point(rect.LLX + rect.Width, rect.LLY);
    LineAnnotation line = new LineAnnotation(pdfPage, rect, start, end);

    line.Color = Aspose.Pdf.Color.Blue;
    line.Border = new Border(link) { Width = 1 };
    link.Border = new Border(link) { Width = 0 };
    link.Action = new GoToURIAction(url);
    pdfPage.Annotations.Add(link);
    pdfPage.Annotations.Add(line);
   }
  }
 }
}

 

Regards,

Ganesan. B

Adding javascript to pdf pages

$
0
0
Can you point me to how to inject javascript on a pdf page using the java api?  I want to execute some javascript when a page is viewed.
TIA,
An

.Net Aspose.Pdf not drawing XSL-FO table elements properly

$
0
0
The following XSL-FO section is not being rendered properly by Aspose.Pdf PdfGenerator.BindFO(xmlStream, xsltStream)

It is rendering the content but it isn't rendering the table borders and thus the content is not being held in inside the table bounds.

How can I make the table render with borders and format the content properly?

This is the resulting xml from the xslt:

 <fo:table width="100%" table-layout="fixed">
        <fo:table-column column-width="3in" />
        <fo:table-column column-width="4in" />
        <fo:table-body>
          <fo:table-row>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block text-align="right" font-weight="bold">Site:</fo:block>
            </fo:table-cell>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block id="59327">CEC #1</fo:block>
            </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block text-align="right" font-weight="bold">Subject Identifier:</fo:block>
            </fo:table-cell>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block id="138951">001</fo:block>
            </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block text-align="right" font-weight="bold">Status:</fo:block>
            </fo:table-cell>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block>Enrolled</fo:block>
            </fo:table-cell>
          </fo:table-row>
          <fo:table-row>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block text-align="right" font-weight="bold">Timezone:</fo:block>
            </fo:table-cell>
            <fo:table-cell border-width="1px" border-style="solid" padding-right="2px" padding-left="2px">
              <fo:block>Pacific Standard Time</fo:block>
            </fo:table-cell>
          </fo:table-row>
        </fo:table-body>
      </fo:table>

Problem to validate converted PDF to PDF/A

$
0
0
Hello, 

Aspose.Pdf for.NET acquired to perform the conversion of multiple PDF documents to PDF/A-1b standard. 
We made the conversion procedure and perform validation have the result in error on the date fields. 
We checked all values ​​and are exactly alike, should not present this error, but the error persists! 

Annex sending the result of the validation. 

Any particular date format into these fields? 

Thank you.

Generating self printing PDF files using Aspose.Words - Is it possible?

$
0
0
Hi,
We are using Aspose.Words (version 9.8.0.0) to generate PDF files using Word templates. Now, we need to add the self printing ability (using JavaScript) to the generated PDF files on fly (something like this). However, we found out that there's no Pdf class in that version of Aspose.Total, so we decided to upgrade to the latest version if we make sure that this feature is supported. So basically, (as far as I know, please correct me if I'm wrong) we need to generate the PDF files using Aspose.Words as usual and then feed the stream to Aspose.Pdf to add the JS functionality we need. Is this possible? Would you please provide some code to show such a thing?

Thanks in advance
Joe

Extract vector images from a pdf

$
0
0
I want to extract vector images from a pdf using Aspose
 
is it possible,  if yes then please assist
 
I am able to extract static images but unable to get the vector one

I need to extract all the images separately rather than generating a single image per page


This message was posted using Email2Forum by Tahir Manzoor.

Pdf to Html conversion responsiveness

$
0
0
Hi,

I am working on pdf to html conversion. It is working fine. But what I want is the converted html(web page ) should be responsive in all devices in which we are viewing that. So can u suggest me anything which will help me. Reply asap. Its urgent. I am using bootstrap for responsiveness. But it is not working fine with images.

Regards,
Vasavi.

Where is com.aspose.ms.System.*?

$
0
0
Hello, A few of the constructors of PdfDocument refer to com.aspose.ms.System.IO.Stream. The extractText method uses com.aspose.ms.System.Text.Encoding. In which library are those classes defined? Best regards, Werner.

How to set the version of merged PDF

$
0
0

I'm using the following code to merge list of PDF documents.

Questions:

1> What would be the version of the final merged pdf?

2>Can we set the PDF version of final merged pdf?

 

        public void Merge(IList<Stream> input, Stream output)
        {
            using (Aspose.Pdf.Document finalPdf = new Aspose.Pdf.Document())
            {
                foreach (Stream s in input)
                {
                    using (Aspose.Pdf.Document doc = new Aspose.Pdf.Document(s))
                    {
                        finalPdf.Pages.Add(doc.Pages);
                    }
                }

                finalPdf.Save(output);
            }
        }

Version 9.4 none bugs of HTML to PDF conversion is fixed!

$
0
0
Dear,

I have tested the new version of the library for which you indicate fixing bugs for rendering HTML tags with CSS to PDF...

None bugs has been fixed !

  • The property "line-height" on bullet-list is not taking account...
  • Impossible to set a style of bullet-list to change the padding or the color of the bullet.
  • Big white space added after the first paragraph of each section for none reason...
  • Texts are not rightly splitted between pages... For example, a DIV splitted in 2 pages, the background-color is stopped rightly before the end of the page but the text continues out of the page...!

For the moment, I must redraw list of bullets with my XSL to replace them by several divs with background-image to simulate the list of the bullet!!!! It's totally unacceptable...

You sold a HTML to PDF converter which is unstable!

Please find my PDF example in which bullet-lists are replaced by DIVS... I hope that you have already noticed that list of bullets don't accept style on CSS ... I have already created ticket for all this problems :

PDFNEWNET-37163, PDFNEWNET-37162.

I have used the option HtmlInfo.UseNewHtmlConvertorForEachHtmlTextBlock = True but nothing changes...

See PDF for example:

  • maternity
    • page 1 big white space between first paragraph and the list of bullets at end of the page.
    • page 3 text is out of the box ( end of the page)

thank you.

Create Link annotation with page break

$
0
0

Hi Aspose Team,


   We are trying to create a link annotation with page break (like few text in first page and few text in second page) using below code. but we are failed to create link annotation in 2 different  page same time. Refer the attached PDF file & image file.

Please help to create link annotation with page break.

NOTE: its very high priority. Please help me ASAP

 

TextFragmentCollection textFragmentCollection;
   Document doc = new Document(pdf);
   TextFragmentAbsorber textFragmentAbsorber;
textFragmentAbsorber = new TextFragmentAbsorber(kv.Key, new TextSearchOptions(true));

                doc.Pages.Accept(textFragmentAbsorber);

                //get the extracted text fragments
                textFragmentCollection = textFragmentAbsorber.TextFragments;

                if (textFragmentCollection.Count > 0)
                {
                    foreach (TextFragment textFragment in textFragmentCollection)
                    {
                        // Use the text segments when the text fragment has a newline char.
                        if (textFragment.Text.Contains(Environment.NewLine))
                        {
                            foreach (TextSegment s in textFragment.Segments)
                            {
                                // Create the annotation for each segment.
                                s.TextState.ForegroundColor = Aspose.Pdf.Color.Blue;
                                LinkAnnotation link = new LinkAnnotation(textFragment.Page, s.Rectangle);
                                Aspose.Pdf.Point start = new Aspose.Pdf.Point(s.Rectangle.LLX, s.Rectangle.LLY);
                                Aspose.Pdf.Point end = new Aspose.Pdf.Point(s.Rectangle.LLX + s.Rectangle.Width, s.Rectangle.LLY);
                                LineAnnotation line = new LineAnnotation(textFragment.Page, s.Rectangle, start, end);

                                line.Color = Aspose.Pdf.Color.Blue;
                                line.Border = new Border(link) { Width = 1 };
                                link.Border = new Border(link) { Width = 0 };
                                s.TextState.ForegroundColor = Aspose.Pdf.Color.Blue;
                                link.Action = new GoToURIAction(kv.Value);
                                textFragment.Page.Annotations.Add(link);
                                textFragment.Page.Annotations.Add(line);
                            }
                        }
                    }
                }


Regards,
Ganesan. BHi Aspose Team,


   We are trying to create a link annotation with page break (like few text in first page and few text in second page) using below code. but we are failed to create link annotation in 2 different  page same time. Refer the attached PDF file & image file.

 

TextFragmentCollection textFragmentCollection;
   Document doc = new Document(pdf);
   TextFragmentAbsorber textFragmentAbsorber;
textFragmentAbsorber = new TextFragmentAbsorber(kv.Key, new TextSearchOptions(true));

                doc.Pages.Accept(textFragmentAbsorber);

                //get the extracted text fragments
                textFragmentCollection = textFragmentAbsorber.TextFragments;

                if (textFragmentCollection.Count > 0)
                {
                    foreach (TextFragment textFragment in textFragmentCollection)
                    {
                        // Use the text segments when the text fragment has a newline char.
                        if (textFragment.Text.Contains(Environment.NewLine))
                        {
                            foreach (TextSegment s in textFragment.Segments)
                            {
                                // Create the annotation for each segment.
                                s.TextState.ForegroundColor = Aspose.Pdf.Color.Blue;
                                LinkAnnotation link = new LinkAnnotation(textFragment.Page, s.Rectangle);
                                Aspose.Pdf.Point start = new Aspose.Pdf.Point(s.Rectangle.LLX, s.Rectangle.LLY);
                                Aspose.Pdf.Point end = new Aspose.Pdf.Point(s.Rectangle.LLX + s.Rectangle.Width, s.Rectangle.LLY);
                                LineAnnotation line = new LineAnnotation(textFragment.Page, s.Rectangle, start, end);

                                line.Color = Aspose.Pdf.Color.Blue;
                                line.Border = new Border(link) { Width = 1 };
                                link.Border = new Border(link) { Width = 0 };
                                s.TextState.ForegroundColor = Aspose.Pdf.Color.Blue;
                                link.Action = new GoToURIAction(kv.Value);
                                textFragment.Page.Annotations.Add(link);
                                textFragment.Page.Annotations.Add(line);
                            }
                        }
                    }
                }


Regards,
Ganesan. B

Viewing all 3131 articles
Browse latest View live