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

exception when converting pdf to png on linux with mono

$
0
0
Hi,
the following program runs fine on Windows, but sends an exception when running on linux with mono :

Document pdfDocument = new Document("/media/temp/test.pdf");
using (FileStream imageStream = new FileStream("/media/temp/test.pdfx.png", FileMode.Create))
{
Resolution resolution = new Resolution(70);
PngDevice pngDevice = new PngDevice(resolution);
pngDevice.Process(pdfDocument.Pages[1], imageStream);
imageStream.Close();
}

Attached is the text of the exception.

Thanks in advance for your help.

Output differ from device to device

$
0
0
Hello,
I am using aspose.pdf to convert pdf file to Epub with the following statements in my Java file, and even attaching input and output files, while my problem is that output is not working on a mobile device with the same Epub reader.

packageconvetorEpub;
public class ConvertToEpub {
public static void main(String[] args) {
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("/home/jimit/Desktop/input.pdf");
com.aspose.pdf.EpubSaveOptions options = new com.aspose.pdf.EpubSaveOptions();
options.ContentRecognitionMode = com.aspose.pdf.EpubSaveOptions.RecognitionMode.Fixed;
pdfDocument.save("/home/jimit/Desktop/output.epub", options);
}
}

Convert epub to PDF issue

$
0
0
Hello,

I am trying to convert an epub file to pdf in .NET using Aspose.Pdf, but my images are cut off onto 2 pages. Setting the pdf PageInfo properties does not seem to influence how the image is rendered. Any ideas what the problem is?
Epub
Pdf

private void CreatePDF(string epub)
    {
        Aspose.Pdf.License license = new Aspose.Pdf.License();
        license.SetLicense("Aspose.Pdf.lic");
        if (Aspose.Pdf.Document.IsLicensed)
        {
            string datadir = Server.MapPath("GeneratedFiles/");

            EpubLoadOptions epubload = new EpubLoadOptions();
            PageInfo pageInfo = new PageInfo();
            pageInfo.IsLandscape = false;
            pageInfo.Width = 1024.0;
            pageInfo.Height = 1536.0;

            MarginInfo marginInfo = new MarginInfo(0.0, 0.0, 0.0, 0.0);
            pageInfo.Margin = marginInfo;
           
            Aspose.Pdf.Document pdf = new Aspose.Pdf.Document(datadir + epub + ".epub", epubload);
            pdf.PageInfo = pageInfo;
           
            pdf.Save(datadir + epub + ".pdf");
        }
        else
        {
            Response.Write("Not licensed");
        }
    }

Thanks,
Lucy

PDF to HTML - Single HTML with All Resources Embedded for Cloud

$
0
0
These docs indicate that Aspose.Pdf for .NET and Java support conversion from PDF to a "Single HTML with All Resources Embedded." The analogous docs on the cloud side, however, seem to explicitly indicate "In case of PDF to HTML, Aspose for Cloud service returns the output as a ZIP file because there can be multiple supporting files in the output."

Is there functionality on the cloud platform that supports conversion from a PDF to a single HTML file with embedded resources? If so, is there an example showing how to consume this particular service?

system fatal error!!!

$
0
0
Unbuntu14.10-2015-04-16T08-14-01-756010600Z.webm,this is a record video,you can open it by a video player.
and i attach a .log file.

SSRS Bookmark export in pdf

$
0
0
We are developing pdf report using Microsoft SSRS. Everything works fine export Bookmarks
do not get exported in pdf. Can I use aspose.pdf to export bookmarks in pdf.

Rishikesh S
www.netgainstechnologies.com

How to Insert 2D Graph in PDF????

$
0
0
How can I generate a 2D graph in PDF?  We have a MVC razor view that gets converted to PDF using Aspose.PDF but we need to generate a pie chart from ASP.NET cshtml to pdf.  Please advise, thanks!

I'm not sure if this is the right path but I'm not seeing any inclination as to where the dynamic data will be integrated.

http://www.aspose.com/docs/display/pdfnet/Working+with+Graphs+%28Generator%29


XFA to Standard PDF form field length

$
0
0
Hello,

I have an Adobe LiveCycle form that I am using Aspose.Pdf to convert to a standard PDF form. This results in field names such as "topmostsubform[0].page[0].fieldname[0]". Unfortunately, the next step in my process is to pass the converted document to another 3rd party module, and it has a limit of 32 characters on form field names, which the converted field names sometimes exceed. From what I can tell, the other module looks at the Field.FullName property, which is of course readonly. I'm looking for a way to either shorten all the field names during conversion (I don't need the form or page) or to change the Field.FullName after the fact. 

The closest I have come was using the FormEditor.RenameField function, but that only changes the part of the FullName after "topmostsubform[0].page[0].", which is usually not enough to accommodate the length constraint.

Any help would be appreciated.

Z

StripByteCount in TIF image converted from PDF

$
0
0
I'm currently trying out Aspose PDF .NET and am converting PDF documents to TIF images.  My company's workflow system requires TIF that are multi-page TIF CCITT Group4 Fax format (1 bit per pixel).  I have successfully converted a PDF to TIF in this format, but when I put into our workflow system it will NOT display it.  I believe our TIF viewer is very old and picky about the TIFs.  I inspected the tags in a TIF that works compared to the TIF that is doesn't work (generated from Aspose).  There are two tags that are different.  The tags "StripByteCounts" (tag #279) and tag "StripOffsets" (tag #273) have a count > 1.  Where as these tags for the TIF that works have a count of 1 (i.e. single strip).  I used this application to inspect the TIF

How can I make Aspose PDF create a TIF that has a single strip (i.e. what properties in the TIF options may I set do get a single strip).  I have looked everywhere and cannot figure out what properites, objects, or methods to use.  Any help would be greatly appreciated!

I found a library called libTIF.NET and was able to convert a TIF to a single strip from one of their examples.  Just hoping Aspose has this capability.  If not, would it possibly be something that could be added in the next release?  We are looking to purchase the Aspose Total .NET solution if we can get this to create the TIFs we need.

Kindest Regards,

Frank

High Charts compatibility

$
0
0
Hi, 

I am currently trying to convert an html document to PDF using the aspose pdf library. However, when I open the PDF file, it does not seem to keep the highcharts that were in the html file. Instead it just has blank spaces on where they are supposed to be. I was wondering if there was a solution to this problem or if this has been addressed yet? 

Aspose PDF Tech Question

$
0
0
Hi there, I am a Aspose.Words customer and am evaluating Aspose.PDF. Can you tell me if Aspose.PDF can update Adobe Livecycle forms ? THanks
This message was posted using Banckle Live Chat 2 Forum

Index was outside the bounds of the array exception and CSS not being applied

$
0
0
I have put together a simple example to illustrate that the CSS is never applied to the PDF file.  But before I could get that issue resolved, I've encountered an exception.  Can you let me know if it is something I'm doing or is something wrong with ASPOSE.PDF. This example expects to be extracted to the C:\TEMP folder.

rectangle Box coordinates are incorrect

$
0
0
Dear support,

I am using attached document (test_esign.pdf) to extract some custom rectangle boxes for a regex text. Notice the text in page 3 that looks like this: {{t:s;r:y;o:"Insured";}}
I noticed that the LLX, LLY,URX,URY appear to be huge like 2498/2101/3316/2207 when they are expected to be under 1000 number.

1. Is this a bug?
2. Why are the coordinates of the textfragment so high and
3. what is a solution for me to solve this and obtain correct coordinates?

-        Rectangle    {2498.736,2101.496,3316.08,2207.096}    Aspose.Pdf.Rectangle
        Height    105.59999999999991    double
        IsEmpty    false    bool
        IsPoint    false    bool
        IsTrivial    false    bool
        LLX    2498.736    double
        LLY    2101.496    double
        URX    3316.08    double
        URY    2207.096    double
        Width    817.344    double

Thank you,
Sireesha

Text exctraction from pdf form produces empty text

$
0
0
Hello,

text extraction from the attached pdf form produces only empty strings.

Aspose.Pdf.dll 10.3.0.0
bugid#7231

Best regards, Martin Pfeifer

Link Annotation text color change issue

$
0
0
Hello,

We have purchased Aspose.PDF license and implementing pdf functionality in one of our project. As per our requirement we need to change link annotation color to red for specific text in the document. After going through one of your reference we have implemented the functionality. But the color is changing for some text in one page but not in another page for same document.

Here is the code we are using.

        Aspose.Pdf.License license = new Aspose.Pdf.License();
        license.SetLicense("Aspose.Pdf.lic");
        Aspose.Pdf.Document doc = new Aspose.Pdf.Document(filePath);
        int noofpages1 = 0;
        noofpages1 = doc.Pages.Count;
        for (int p = 1; p <= noofpages1; p++)
        {
            Aspose.Pdf.Page page = doc.Pages[p];
            AnnotationSelector selector = new AnnotationSelector(new Aspose.Pdf.InteractiveFeatures.Annotations.LinkAnnotation(page, Aspose.Pdf.Rectangle.Trivial));
            int height72Dpi = 792;
            page.Accept(selector);
            IList list = selector.Selected;
            if (list.Count > 0)
            {
                foreach (LinkAnnotation a in list)
                {
                    
                        try
                        {
                            Aspose.Pdf.InteractiveFeatures.Annotations.Border border = new Aspose.Pdf.InteractiveFeatures.Annotations.Border(a);
                            //llx = Convert.ToInt32(a.Rect.LLX);
                            //urx = Convert.ToInt32(a.Rect.URX);
                            //lly = Convert.ToInt32(height72Dpi - a.Rect.LLY);
                            //ury = Convert.ToInt32(height72Dpi - a.Rect.URY);
                            //Aspose.Pdf.InteractiveFeatures.Annotations.LinkAnnotation link = new Aspose.Pdf.InteractiveFeatures.Annotations.LinkAnnotation(page, new Aspose.Pdf.Rectangle(llx, height72Dpi - lly, urx, height72Dpi - ury));
                            TextFragmentAbsorber ta = new TextFragmentAbsorber();
                            Aspose.Pdf.Rectangle rect = a.Rect;
                            rect.LLX -= 10;
                            rect.LLY -= 10;
                            rect.URX += 10;
                            rect.URY += 10;
                            ta.TextSearchOptions = new TextSearchOptions(rect);
                            ta.Visit(doc.Pages[p]);
                            // Change color of the text.

                            foreach (TextFragment tf in ta.TextFragments)
                            {
                                tf.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Red);
                                border.Width = 0;
                            }
                            //}
                        }
                        catch (Exception exp)
                        {
                        }
                    
                }
            }

        }

        doc.Save(filePath);

These are the scenarios we have tested.

1) The attachment document "bookmarks.pdf" contains some links with blue color which we wanted to change the color to red. But it is not happening. 

2)The document "DVI-7310_Data.PDF" first page right side cornor text "DVI-7310" is getting updated with red color but remaining text "Single-Link DVI Fiber Optic Extender" is not getting updated. We have made some other links also on the same page those are working fine. 

Could you please let us know the resolution for this problem.

We have tested this code with the latest version of Aspose.PDF i.e. 10.3.0. But the same issue exist.

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

Aspose.PDF

$
0
0
Hi we have recently purchased Aspose.PDF and i was wondering if you can provide me an example to edit PDF file from c# windows app. i want to add some comments to PDF file at some specific line/location selected by the user.
This message was posted using Banckle Live Chat 2 Forum

Can you stamp HTML header/footer to existing PDF

$
0
0
I'm trying out Aspose.PDF to see if I can add a header and footer to an existing PDF.  I want to create these headers/footers from HTML.

I found PdfFileStamp, which allows me to add a header using FormattedText, but FormattedText doesn't support HTML.

Is there any other way to do this with Aspose.PDF or any of your other components?

Convert a PDF Page to Image Error

$
0
0
Hi,

I'm trying the example you have here using node.js
http://www.aspose.com/docs/display/pdfcloud/Convert+a+PDF+Page+to+Image+with+Default+Size

but the image is not created. Instead i'm getting this error:
{"Message":"Error 'The specified file does not exist.', Bucket 'afc-filestorage', FilePath '9441/65994b98-088d-4aca-b51d-ba2c724ef04f/3.pdf'"}

I've seen another post related to this...but one of the last answers says it was fixed already?

Thanks!

The code i'm talking about is this one:
var fs = require("fs");var AsposeCloud = require("asposecloud");var aspose = new AsposeCloud({
  appSID: "Get it from https://cloud.aspose.com",  appKey: "Get it from https://cloud.aspose.com",  baseURI: "http://api.aspose.com/v1.1/"});var pdf = aspose.Pdf();var file = "Document1.pdf";var page = 1;var format = "png";var outputFile = "Page1.png";

pdf.convertToImage(file, page, format, function(result) {
  fs.writeFileSync(outputFile, result);
  console.log("File saved:", outputFile);
});


Save Image Html to PDF

$
0
0

Hello Aspose Team,

Do any one know how to add image htmls to the pdf document using aspose.pdf

Im my .aspx page I have 3 div's. I need to display each div content in a separate page of pdf. im succesful with this.But im searching code to convert each div content to an image html and then save it to pdf.

Please find the sample code below.

            Dim SB1 As New StringBuilder
            Dim SW1 As New StringWriter(SB1)
            Dim htmlTW1 As New HtmlTextWriter(SW1)
            ShowValuesDiv.RenderControl(htmlTW1)
            Dim dataGridHTML1 As String = SB1.ToString()
            Dim sec2 As Aspose.Pdf.Generator.Section = pdf1.Sections.Add()
            Dim text2 As New Aspose.Pdf.Generator.Text(sec2, dataGridHTML1)
            text2.IsHtmlTagSupported = True
            sec2.Paragraphs.Add(text2)

            Dim SB2 As New StringBuilder
            Dim SW2 As New StringWriter(SB2)
            Dim htmlTW2 As New HtmlTextWriter(SW2)
            ShowValuesDiv2.RenderControl(htmlTW2)
            Dim dataGridHTML2 As String = SB2.ToString()
            Dim sec3 As Aspose.Pdf.Generator.Section = pdf1.Sections.Add()
            Dim text3 As New Aspose.Pdf.Generator.Text(sec3, dataGridHTML2)
            text3.IsHtmlTagSupported = True
            sec3.Paragraphs.Add(text3)

            sSavePath = ""
            pdf1.Save(sSavePath)

Viewing all 3131 articles
Browse latest View live