I've created label using fedex API.
and I save that PDF Image into AWS. Below is url.
https://s3-ap-northeast-2.amazonaws.com/gmp01/temp/tmp-137164OTxA4P5MVJ1.pdf
This label has 4X6 size. but you can see pdf size is A4 in that link.
I've tried to find How can I remove this white space but I can't find in Fedex API Document.
If you have had this similar issue, please help me.
I am using Angular.js 1.x and Node.js
We get the 4x6 PDF label for FedEx and trim the white space by getting the PNG file first. Below you can find the parameter.
LabelFormatType = COMMON2D
ImageType = PNG
LabelStockType = PAPER_4X6
If you want to save time, you can use RESTful shipping API like Postmen which simplifies the API request for label generation.
Related
I want to capture the tooltip text of the URLs that Google sheet shows.
I've this link in the Google sheet:
https://www.vingle.net/
When I hover over this URL, this text is shown:
Create an account or log in - Vingle is an interest-based community platform available via mobile and web, where users can connect with people who love what they love!
Like this:
This is what I want to do:
Copy whatever text is shown in the popup/tooltip of the URL and paste it in the cell next to it. From this:
To this:
FYI, this is actually the meta tag. Most of you might offer IMPORT functions but the I don't want to use import function for some reason. I just want the text that Google sheet is already capturing. Is it possible?
Copy whatever text is shown in the popup/tooltip of the URL and paste it in the cell next to it.
I do not think that can be done in Google Sheets. There are no methods in the Sheets API nor in SpreadsheetApp to capture contents of a pop-up info panel. You would have to retrieve the meta tag through an importdata() formula or a script that uses UrlFetchApp().
how to change default color of column graph using GemBox version 37.3.30.1160.
If I create a .xlsx template and save the same it will work but I am trying to save the file as PDF and that's where its not working.
EDIT 2019-11-15:
In newer versions of GemBox.Spreadsheet (version 4.5 and above) we added support for chart formatting, see the version history page.
You can find Excel Chart Formatting example here. Also, here is another example in C# that shows how to change color of various chart parts like series, background, text, etc.
ColumnChart chart = ...
chart.SelectData(worksheet.Cells.GetSubrangeAbsolute(0, 0, 12, 1), true);
var red = DrawingColor.FromName(DrawingColorName.Red);
var green = DrawingColor.FromName(DrawingColorName.Green);
var blue = DrawingColor.FromName(DrawingColorName.Blue);
chart.Series[0].Fill.SetSolid(blue);
chart.Series[0].Outline.Fill.SetSolid(red);
chart.Fill.SetSolid(green);
chart.PlotArea.Outline.Fill.SetSolid(red);
chart.Outline.Fill.SetSolid(red);
ORIGINAL ANSWER:
GemBox.Spreadsheet currently does not have an API support for chart components styles. This information is currently supported only through a preservation and that is why it works for XLSX file, but the preserved information is lost when the input and output file format are not the same and that is why it does not work for PDF files.
However note that we do intend to implement this sometime in the future and if interested please feel free to vote for this feature in order to boost its priority.
But at this moment I cannot tell you exactly when it will be implemented.
I need do extract the text from the PDF file.With the help of Poppler API i can able to extract all text available in that page . even i can able to get the font information like Bold and italic .But i cant able to get the size of the text.Please let me know the way to get the size of text.
Thanks
Although late by an eternity, take a look at TextWord::getFontSize().
So I'm wondering if there is a way to do the following:
1. Upload an image
2. Remove the 20 pixel lower border the image has
3. Save the image
Well, I can already do the easy steps (1 and 3) but I have no Idea how to do the third one. I was thinking maby using a Transform but Im not sure how to.
You need to use the crop() method.
Your steps are:
Upload the image
Get the image size
Call crop()
Save the data
What function in Drupal gets file attachment path?
Edit: the attachments provided by Upload module in system section. But since you mentioned there may be another way around it. Maybe I could achieve may goals using FileField module so if you could tell me how to get a direct link of a file uploaded by FileField module that may also be very helpful.
Edit 2:
Ok I will start from my main and final objective:
It is to get an image linking to a file which visibility I could be managed using CCK module.
I am doing this step by step. So now I have written a code which generates the needed image and I have added that image to one of content types teaser. I found a way to warp my image in a tag and I had dug up simple attachments url. So my next step is to advance from simple upload attachment to the one added by FileFields and from odd looking HTML pace in all PHP document into beautifully managed CCK field.
How to fetch file path of a file uploaded FileFields?
Some plain and at the same time rich tutorials for making custom fields for CCK module.
Assuming you know how to get the $node object for a node containing a file attachment, this is super easy:
Upload (core)
$file = upload_load($node);
echo $file[1]->filepath;
Where 1 is the index of the file. Upload can let you upload more than one file, so file 2 would have an index of 2 and so on. If there's only one file, it'll always be 1.
More info: upload_load() API reference.
FileField
echo $node->field_fieldname[0]['filepath'];
Where field_filename is the short name you've used for the field, and 0 is the index of the field. CCK fields let you have multiple values in one field, so 0 would be the first, 1 would be the second, etc. If you only have one value, it'll always be 0.
Note: if you want to get the rendered output of the FileField using its formatters, you can just use $field_fieldname in your node template, or if you want to store the rendered output, you can use:
echo content_format('field_fieldname', $node->field_fieldname[0]);
More info: content_format() API reference.
Upload is a sad little module, and has been completely replaced with a core implementation of FileField in Drupal 7. If you have the option to use FileField, you should.
Don't direct links of file attachments appear below the uploaded file for the core Upload module?
Since you are trying to use images, you should use http://drupal.org/project/imagefield CCK module in order to add images to specified content type. After that using the Display fields tab in Content type configuration you can specify how image would be presented (as a link, image, image with link to node...) both in teaser and body view.