Not all value retuned

here result after generate pdf aspose
image.png (403.0 KB)

full text result must be like this

{"CpuPlatform":"Intel Broadwell","Hostname":null,"NetworkInterfaces":[{"accessConfigs":null,"aliasIpRanges":null,"fingerprint":"mBVMobHVGJc=","ipv6Address":null,"kind":"compute#networkInterface","name":"nic0","network":"https://www.googleapis.com/compute/v1/projects/agc0001-gcp-188-qanetcore/global/networks/cmt-30440391","networkIP":"10.194.74.226","nicType":null,"subnetwork":"https://www.googleapis.com/compute/v1/projects/agc0001-gcp-188-qanetcore/regions/asia-southeast1/subnetworks/sn-30440391-jh-intranet","ETag":null}],"Disks":[{"autoDelete":true,"boot":true,"deviceName":"bst-30440391-vm-0440391-ia01-osdisk","diskEncryptionKey":null,"diskSizeGb":100,"guestOsFeatures":[{"type":"MULTI_IP_SUBNET","ETag":null},{"type":"VIRTIO_SCSI_MULTIQUEUE","ETag":null},{"type":"WINDOWS","ETag":null}],"index":0,"initializeParams":null,"interface":"SCSI","kind":"compute#attachedDisk","licenses":["https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-2016-dc"],"mode":"READ_WRITE","shieldedInstanceInitialState":null,"source":"https://www.googleapis.com/compute/v1/projects/agc0001-gcp-188-qanetcore/zones/asia-southeast1-a/disks/vm-0440391-ia01-jumphost-windows","type":"PERSISTENT","ETag":null},{"autoDelete":true,"boot":false,"deviceName":"bst-30440391-vm-0440391-ia01-datadisk","diskEncryptionKey":null,"diskSizeGb":50,"guestOsFeatures":[{"type":"MULTI_IP_SUBNET","ETag":null},{"type":"VIRTIO_SCSI_MULTIQUEUE","ETag":null},{"type":"WINDOWS","ETag":null}],"index":1,"initializeParams":null,"interface":"SCSI","kind":"compute#attachedDisk","licenses":["https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-2016-dc"],"mode":"READ_WRITE","shieldedInstanceInitialState":null,"source":"https://www.googleapis.com/compute/v1/projects/agc0001-gcp-188-qanetcore/zones/asia-southeast1-a/disks/vm-0440391-ia01-jumphost-windows-1","type":"PERSISTENT","ETag":null}],"MachineType":"https://www.googleapis.com/compute/v1/projects/agc0001-gcp-188-qanetcore/zones/asia-southeast1-a/machineTypes/n1-standard-2"}

only separate text that appear on pdf after generate

@yonathan41

Can you please share how you are generating the PDF using this text? Please share complete sample code snippet which you are using so that we can test the scenario in our environment and address it accordingly.

sorry i can only give you samople code while generating
because its credential

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

        Style style = workbook.CreateStyle();
        style.Font.Name = "DejaVu Sans";
        style.Font.Size = 8;
        style.IsTextWrapped = true;
        workbook.DefaultStyle = style;

        worksheet.PageSetup.Orientation = PageOrientationType.Landscape;
        worksheet.PageSetup.PaperSize = PaperSizeType.PaperA4;
        worksheet.Cells.SetColumnWidthPixel(0, 100);
        worksheet.Cells.SetColumnWidthPixel(1, 110);
        worksheet.Cells.SetColumnWidthPixel(2, 125);
        worksheet.Cells.SetColumnWidthPixel(3, 110);
        worksheet.Cells.SetColumnWidthPixel(4, 90);
        worksheet.Cells.SetColumnWidthPixel(5, 100);
        worksheet.Cells.SetColumnWidthPixel(6, 170);
        worksheet.Cells.SetColumnWidthPixel(7, 100);
        worksheet.Cells.SetColumnWidthPixel(8, 100);
        worksheet.Cells.SetColumnWidthPixel(9, 50);
        worksheet.Cells.SetColumnWidthPixel(10, 180);
        worksheet.Cells.SetColumnWidthPixel(11, 130);
        worksheet.Cells.SetColumnWidthPixel(12, 260);
        worksheet.Cells.SetColumnWidthPixel(13, 90);

        worksheet.Cells[row, 0].SetStyle(subtitleStyle);
        row++;
        _ApplyStyle(worksheet, row, HEADER_STYLE, 14);
        Style headerStyle = worksheet.Cells[row, 0].GetStyle();
        headerStyle.Font.Color = Color.White;
        worksheet.Cells[row, 0].Value = "Created Date";
        worksheet.Cells[row, 1].Value = "Billing Account ID";
        worksheet.Cells[row, 2].Value = "Billing Account Name";
        worksheet.Cells[row, 3].Value = "Assigned Cloud Admin";
        worksheet.Cells[row, 4].Value = "Cloud Admin Name";
        worksheet.Cells[row, 5].Value = "Tenant Code";
        worksheet.Cells[row, 6].Value = "Tenant Name";
        worksheet.Cells[row, 7].Value = "Compartment ID";
        worksheet.Cells[row, 8].Value = "Environment";
        worksheet.Cells[row, 9].Value = "CSP";
        worksheet.Cells[row, 10].Value = "CSP Billing Account Name";
        worksheet.Cells[row, 11].Value = "Hostname";
        worksheet.Cells[row, 12].Value = "Configuration";
        worksheet.Cells[row, 13].Value = "Asset Type";
        for (int i = 0; i < 14; i++)
        {
            worksheet.Cells[row, i].SetStyle(headerStyle);
        }
        row++;

        Style bodyStyle = worksheet.Cells[row, 0].GetStyle();
        bodyStyle.VerticalAlignment = TextAlignmentType.Top;

        foreach (var i in reportList)
        {
            worksheet.Cells[row, 0].Value = CommonUtility.UTCtoSGTDatetoString( i.AssetCreationDate);
            worksheet.Cells[row, 1].Value = i.BillingAccountID;
            worksheet.Cells[row, 2].Value = i.BillingAccountName;
            worksheet.Cells[row, 3].Value = i.CloudAdmin;
            worksheet.Cells[row, 4].Value = i.CloudAdminName;
            worksheet.Cells[row, 5].Value = i.TenantCode;
            worksheet.Cells[row, 6].Value = i.TenantName;
            worksheet.Cells[row, 7].Value = i.CompartmentId;
            worksheet.Cells[row, 8].Value = i.Environment;
            worksheet.Cells[row, 9].Value = i.CSP;
            worksheet.Cells[row, 10].Value = i.CSPBillingAccount;
            worksheet.Cells[row, 11].Value = i.HostName;
            worksheet.Cells[row, 12].Value = i.Configuration;
            worksheet.Cells[row, 13].Value = i.AssetType;
            for (int j = 0; j < 14; j++)
            {
                worksheet.Cells[row, j].SetStyle(bodyStyle);
            }
            row++;
        }

        worksheet.AutoFitRows();

        worksheet.PageSetup.FitToPagesWide = 1;
        worksheet.PageSetup.FitToPagesTall = 0;
        worksheet.PageSetup.BottomMargin = 1;
        worksheet.PageSetup.TopMargin = 1;
        worksheet.PageSetup.LeftMargin = 1;
        worksheet.PageSetup.RightMargin = 1;

workbook.Save($"{directory}/{referenceCode}.pdf", SaveFormat.Pdf);

@yonathan41

It seems like your inquiry is more related to Aspose.Cells. We are moving this thread to the respective forum category where you will be assisted accordingly.

@yonathan41,

I think you are talking about the long text “{“CpuPlatform”:“Intel Broadwell”,“Hostname”:null,“NetworkInterfaces”:… -southeast1-a/machineTypes/n1-standard-2”}” does not fit into the cell and is cut from the bottom, is not it? This is MS Excel’s behavior and limit where you cannot extent height more than 409.50 points (546 pixels). To cope with it you got to extend the column (which contains this long text) width first (say you set it to “91 points (641 pixels)” which is reasonable to get it to fit properly. Then set the wrapping text on (if you have not done it already). Now auto-fit the row(s), it will display this long string fully in the big cell.

Do as directed and let us know if you still find any issue. Hopefully this will fix your issue.

By the way you may confirm this issue in MS Excel (manually) by entering this long string/text into cells with minimal column width and auto-fit the row (after wrapping-text on), you will notice the same issue in MS Excel as well.